Commit Graph

19157 Commits (216243eee299a973e4504fc210e07c168376934e)

Author SHA1 Message Date
metiftikci 84d2159ef6
fix: add missing locale (#33641)
this removed in #23113 but still using in `head_navbar.tmpl`
2025-02-18 16:29:17 -08:00
Kerwin Bryant ce65613690
Fix Untranslated Text on Actions Page (#33635)
Fix the problem of untranslated text on the actions page

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-18 11:29:08 +00:00
Guillaume 748b731612
Improve button layout on small screens (#33633)
Fix #33160 

Better "New Repository" & "New Migration" buttons on home page.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-18 11:02:40 +00:00
yp05327 241f799edf
Update README screenshots (#33347)
@lunny @techknowlogick
Wait for the update of https://dl.gitea.com/screenshots
Can you move all old screenshots into
https://dl.gitea.com/screenshots/old ?
Then run the action to upload new screenshots to
https://dl.gitea.com/screenshots

Follow #33149.
As I mentioned here:
https://github.com/go-gitea/gitea/pull/33149#issuecomment-2581787057,
the prepare process is almost finished.
The backend technical is using newly added `workflow_dispatch` feature
for Gitea Action to take the screenshots automatically.
Then we can easily sync the screenshots to the latest version without
annoying manual work.
Get more information from https://gitea.com/gitea/deployment
2025-02-18 00:10:30 -08:00
Lunny Xiao 9f560d47c9
Make actions URL in commit status webhooks absolute (#33620)
Gitea Actions generated target url doesn't contain host and port. So we
need to include them for external webhook visiting.

Fix #33603

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-18 02:20:18 +00:00
wxiaoguang 15e020eec8
Refactor error system (#33626) 2025-02-17 12:41:03 -08:00
Lunny Xiao 7df09e31fa
Move issue pin to an standalone table for querying performance (#33452)
Noticed a SQL in gitea.com has a bigger load. It seems both `is_pull`
and `pin_order` are not indexed columns in the database.

```SQL
SELECT `id`, `repo_id`, `index`, `poster_id`, `original_author`, `original_author_id`, `name`, `content`, `content_version`, `milestone_id`, `priority`, `is_closed`, `is_pull`, `num_comments`, `ref`, `pin_order`, `deadline_unix`, `created_unix`, `updated_unix`, `closed_unix`, `is_locked`, `time_estimate` FROM `issue` WHERE (repo_id =?) AND (is_pull = 0) AND (pin_order > 0) ORDER BY pin_order
```

I came across a comment
https://github.com/go-gitea/gitea/pull/24406#issuecomment-1527747296
from @delvh , which presents a more reasonable approach. Based on this,
this PR will migrate all issue and pull request pin data from the
`issue` table to the `issue_pin` table. This change benefits larger
Gitea instances by improving scalability and performance.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-17 11:28:37 -08:00
silverwind f5a81f9636
Run spellcheck on tools directory (#33627)
Add `tools` files to spellcheck and fixed one issue.
2025-02-17 18:39:12 +01:00
wxiaoguang f35850f48e
Refactor error system (#33610) 2025-02-16 22:13:17 -08:00
Lunny Xiao 69de5a65c2
Fix project issues list and counting (#33594)
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-17 05:14:56 +00:00
Lunny Xiao 5df9fd3e9c
Add API to support link package to repository and unlink it (#33481)
Fix #21062

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
2025-02-16 19:18:00 -08:00
GiteaBot 50a5d6bf5d [skip ci] Updated translations via Crowdin 2025-02-17 00:33:47 +00:00
silverwind 3bbacac62c
Update JS and PY dependencies (#33587)
- Update all dependencies excluding `tailwindcss` and `idiomorph`
- Tested citation, asciinema, pdf, swagger

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-16 14:14:23 +01:00
Sandro Santilli 37c4f3760c
[chore] add git mailmap for proper attribution of authorship (#33612) 2025-02-16 20:49:28 +08:00
Lunny Xiao 58c124cc4f
Move commits signature and verify functions to service layers (#33605)
No logic change, just move functions.
2025-02-16 12:24:07 +00:00
Sveinn Thorarinsson 62389dd08b
add spacing between sign in button's icon and text (#33609)
This pull request edits the head_navbar template and adds spacing
between the icon and the text inside the sign in button of the navbar
(button which displays at the top right of Gitea's pages when the user
is not signed in).

It bugged me that there was no spacing between the button's contents so
I test ran this change quickly on my server and thought it looked a lot
better, so decided to make this pull request. Up to you to decide if you
agree that it looks better :)
2025-02-16 11:27:31 +00:00
Darren Hoo 950abfe8ee
enable literal string for code search (#33590)
Close: #33588

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-02-16 11:28:06 +01:00
GiteaBot fc1b383da9 [skip ci] Updated translations via Crowdin 2025-02-16 00:34:48 +00:00
ChristopherHX 2b8cfb557d
Artifacts download api for artifact actions v4 (#33510)
* download endpoint has to use 302 redirect
* fake blob download used if direct download not possible
* downloading v3 artifacts not possible

New repo apis based on GitHub Rest V3
- GET /runs/{run}/artifacts (Cannot use run index of url due to not
being unique)
- GET /artifacts
- GET + DELETE /artifacts/{artifact_id}
- GET /artifacts/{artifact_id}/zip
- (GET /artifacts/{artifact_id}/zip/raw this is a workaround for a http
302 assertion in actions/toolkit)
- api docs removed this is protected by a signed url like the internal
artifacts api and no longer usable with any token or swagger
  - returns http 401 if the signature is invalid
    - or change the artifact id
    - or expired after 1 hour

Closes #33353
Closes #32124

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-16 08:32:54 +08:00
Lunny Xiao 01bf8da02e
Fix bug when get commit (#33602)
Fix #33595
2025-02-15 15:16:19 -08:00
ericLemanissier 57997f1518
Fix mirror bug (#33597)
follows-up be4e961240

Fix https://github.com/go-gitea/gitea/issues/33200

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2025-02-15 18:29:44 +08:00
silverwind 1ba7cbbfd6
Fix typo in HTML attribute (#33599) 2025-02-14 10:59:37 -05:00
Zettat123 8aede14b1d
Use default Git timeout when checking repo health (#33593) 2025-02-14 15:13:56 +00:00
Lunny Xiao 70327d6a92
Improve commits list performance to reduce unnecessary database queries (#33528)
When listing commits, Gitea attempts to retrieve the actual user based
on the commit email. Querying users one by one from the database is
inefficient. This PR optimizes the process by batch querying users by
email, reducing the number of database queries.
2025-02-14 00:05:55 -08:00
Lunny Xiao f232d8f530
Performance optimization for pull request files loading comments attachments (#33585) 2025-02-14 06:49:58 +00:00
wxiaoguang b426e383fe
Fix PR's target branch dropdown (#33589)
Fix #33586

It only moves `PrepareBranchList` and `retrieveAssigneesData` to before
the `CanModifyIssueOrPull` check, and adds more comments
2025-02-14 05:21:31 +00:00
techknowlogick d88b012525
go1.24 (#33562)
update to use go1.24

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-13 18:00:00 +08:00
Exploding Dragon fba365b425
Only show the latest version in the Arch index (#33262)
Only show the latest version of the package in the arch repo.

closes #33534

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-13 01:24:44 +00:00
GiteaBot 42d817e814 [skip ci] Updated translations via Crowdin 2025-02-13 00:31:39 +00:00
silverwind 3e39583bb5
Enable eslint for commonjs (#33575) 2025-02-12 22:47:54 +00:00
wxiaoguang e741448a14
Fix various problems (artifact order, api empty slice, assignee check, fuzzy prompt, mirror proxy, adopt git) (#33569)
* Make artifact list output a stable order
* Fix #33506
* Fix #33521
* Fix #33288
* Fix #33196
* Fix #33561
2025-02-13 03:26:27 +08:00
silverwind bcd1317d17
Switch to `@vitest/eslint-plugin` (#33573)
Package has been renamed and now also provides the globals so we can
replace two dependencies with one.

Ref: https://github.com/vitest-dev/eslint-plugin-vitest/issues/537
2025-02-12 11:08:34 -05:00
wxiaoguang f58f5bb3d8
Avoid duplicate SetContextValue call (#33564)
And fix FIXME and TODO
2025-02-12 14:25:46 +08:00
Zettat123 06f1065636
Add a transaction to `pickTask` (#33543)
In the old `pickTask`, when getting secrets or variables failed, the
task could get stuck in the `running` status (task status is `running`
but the runner did not fetch the task). To fix this issue, these steps
should be in one transaction.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-12 00:09:43 +08:00
wxiaoguang 245ac321c3
Fix context usage (#33554)
Some old code use direct type-casting to get context, it causes
problems.

This PR fixes all legacy problems and use correct `ctx.Value` to get
low-level contexts.

Fix #33518
2025-02-11 16:46:03 +08:00
Jason Song e9b98aef44
Enhance routers for the Actions runner operations (#33549)
- Find the runner before deleting
- Move the main logic from `routers/web/repo/setting/runners.go` to
`routers/web/shared/actions/runners.go`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-11 01:39:10 +00:00
GiteaBot 217ffe5492 [skip ci] Updated translations via Crowdin 2025-02-11 00:32:23 +00:00
silverwind b3302748fa
Run yamllint with strict mode, fix issue (#33551)
Previously yamllint would issue warnings for certain things, while still
exiting with zero. Now warnings are treated like errors and will cause
non-zero exit:

```
  -s, --strict          return non-zero exit code on warnings as well as errors
```
2025-02-10 22:33:40 +00:00
Jason Song c422f179dd
Enhance routers for the Actions variable operations (#33547)
- Find the variable before updating or deleting
- Move the main logic from `routers/web/repo/setting/variables.go` to
`routers/web/shared/actions/variables.go`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-02-11 04:44:04 +08:00
jason19970210 e3adb686bb
enhancement: add additional command hints for PowerShell & CMD (#33548)
- resolving wrong signature calculations for SSH key verification

Fixed #22693

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-02-11 04:14:37 +08:00
wxiaoguang 30993e9508
Feature: Support workflow event dispatch via API (#33545)
Fix: https://github.com/go-gitea/gitea/issues/31765 (Re-open #32059)

---------

Co-authored-by: Bence Santha <git@santha.eu>
Co-authored-by: Bence Sántha <7604637+bencurio@users.noreply.github.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
2025-02-11 03:05:42 +08:00
Kerwin Bryant 085f273d19
Optimize the dashboard (#32990)
before:

![image](https://github.com/user-attachments/assets/d0b432e4-a521-4540-a489-d18b9c265674)

after:

![image](https://github.com/user-attachments/assets/dbb8b387-d150-41e2-b12b-f9d8450e36d7)
-----

![image](https://github.com/user-attachments/assets/40dcd71e-344b-4043-9811-77227c71aed9)
-----

Optimize the dashboard by adding welcoming messages or quick action
entry points (such as adding a new repository or organization) to ensure
that new users are not greeted by a blank page upon logging in.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-11 01:24:34 +08:00
Lunny Xiao 72518a8dab
Rework suggestion backend (#33538)
Fix #33522 

The suggestion backend logic now is

- If the keyword is empty, returned the latest 5 issues/prs with index
desc order
- If the keyword is digital, find all issues/prs which `index` has a
prefix with that, with index asc order
- If the keyword is non-digital or if the queried records less than 5,
searching issues/prs title with a `like`, with index desc order

## Empty keyword
<img width="310" alt="image"
src="https://github.com/user-attachments/assets/1912c634-0d98-4eeb-8542-d54240901f77"
/>

## Digital
<img width="479" alt="image"
src="https://github.com/user-attachments/assets/0356a936-7110-4a24-b21e-7400201bf9b8"
/>

## Digital and title contains the digital
<img width="363" alt="image"
src="https://github.com/user-attachments/assets/6e12f908-28fe-48de-8ccc-09cbeab024d4"
/>

## non-Digital
<img width="435" alt="image"
src="https://github.com/user-attachments/assets/2722bb53-baa2-4d67-a224-522a65f73856"
/>
<img width="477" alt="image"
src="https://github.com/user-attachments/assets/06708dd9-80d1-4a88-b32b-d29072dd1ba6"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-10 16:24:05 +00:00
wxiaoguang 704b65e012
Revert "Feature: Support workflow event dispatch via API (#32059)" (#33541)
This reverts commit 523751dc82.
2025-02-10 17:44:42 +08:00
Bence Sántha 523751dc82
Feature: Support workflow event dispatch via API (#32059)
ref: https://github.com/go-gitea/gitea/issues/31765

---------

Signed-off-by: Bence Santha <git@santha.eu>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
2025-02-10 05:23:57 +08:00
wxiaoguang 06088ec672
Remove "class-name" from svg icon (#33540)
Only use "class" attribute
2025-02-09 22:39:54 +02:00
Kerwin Bryant a52720b5b4
Add "No data available" display when list is empty (#33517)
Add a "No data available" message to be displayed when the list has no
data. This improves the user experience by providing clear feedback in
an empty state.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-09 00:13:41 +08:00
mscherer 063c23e1bc
Add a option "--user-type bot" to admin user create, improve role display (#27885)
Partially solve #13044

Fix #33295

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-07 08:41:55 +00:00
TheFox0x7 1ec8d80fa3
refactor: decouple context from migration structs (#33399)
Use context as much as possible.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-07 05:37:32 +00:00
Lunny Xiao 466cc725bc
Move gitgraph from modules to services layer (#33527)
Just move, no code change.
2025-02-07 03:05:25 +00:00