Commit Graph

19118 Commits (4adb7cad8b75b0d6154c91de1a64582ada2e300e)
 

Author SHA1 Message Date
wxiaoguang 4adb7cad8b
Improve swagger generation (#33664)
Remove most "sed" tricks

---------

Co-authored-by: silverwind <me@silverwind.io>
3 days ago
Lunny Xiao f2fbb897f3
Deleting repository should unlink all related packages (#33653)
Fix #33634

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
4 days ago
Lunny Xiao a25081f380
Fix omitempty bug (#33663)
Fix #33660
4 days ago
wxiaoguang 3ee5ee2029
Upgrade golangci-lint to v1.64.5 (#33654)
Use `usetesting` instead of deprecated `tenv`.
1. Follow up #33648
2. Make lint pass and add some comments
4 days ago
wxiaoguang cd225d7034
Fix mCaptcha bug (#33659)
Fix #33658
4 days ago
wxiaoguang e6759f356d
Update Go dependencies (skip blevesearch, meilisearch) (#33655) 4 days ago
TheFox0x7 cc1fdc84ca
Use test context in tests and new loop system in benchmarks (#33648)
Replace all contexts in tests with go1.24 t.Context()

---------

Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
4 days ago
Lunny Xiao 3bbc482879
Add missed changelogs (#33649)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
4 days ago
GiteaBot 21af8150b7 [skip ci] Updated translations via Crowdin 5 days ago
ericLemanissier 40faa6dc78
git graph: don't show detached commits (#33645)
Current git graph is not usable for mirrors of repos having a lot of
PRs, as can be seen at
https://demo.gitea.com/ericLemanissier/conan-center-index/graph

![image](https://github.com/user-attachments/assets/ace40dd2-3eea-4d69-8e19-10fb7224e326)


Manually running `git log --graph --date-order --all` on such a repo
indeed shows:
```
*   commit c4a34bd39d7977c8630177c5f88507000ea3e943
|\  Merge: a4bbd3ad6b 35a102c77c
| | Author: toge <toge.mail@gmail.com>
| | Date:   Wed Feb 19 08:36:41 2025 +0000
| |
| |     Merge 35a102c77cbc38d84baca0ca63466fb410336ea8 into a4bbd3ad6bb5a0f8e5117a897d8c55941f533d98
| |
| * commit 35a102c77cbc38d84baca0ca63466fb410336ea8
| | Author: toge <toge.mail@gmail.com>
| | Date:   Wed Feb 19 17:36:35 2025 +0900
| |
| |     update 4.4.2
| |
| | * commit 5d610f4fd3c0428731e402a2f618fad9ce055875
| |/| Merge: a4bbd3ad6b fe916fb70a
|/| | Author: Antony Peacock <ant.peacock@gmail.com>
| | | Date:   Wed Feb 19 08:31:30 2025 +0000
| | |
| | |     Merge fe916fb70a8bf49503cce70a5c7124bcc4314ddc into a4bbd3ad6bb5a0f8e5117a897d8c55941f533d98
| | |
| | * commit fe916fb70a8bf49503cce70a5c7124bcc4314ddc
| | | Author: Antony Peacock <ant.peacock@gmail.com>
| | | Date:   Wed Feb 19 08:31:18 2025 +0000
| | |
| | |     Remove parquet cmakelist patch
| | |
| | | * commit 9f6d2759d650ec3c86d01bb940e829e7e14220c2
| |_|/| Merge: a4bbd3ad6b f0963429b0
|/| | | Author: Thomas Sedlmair <thomas.sedlmair@googlemail.com>
| | | | Date:   Wed Feb 19 08:03:08 2025 +0100
| | | |
| | | |     Merge f0963429b0952499da0da7e559f8d53387097307 into a4bbd3ad6bb5a0f8e5117a897d8c55941f533d98
| | | |
| | | * commit f0963429b0952499da0da7e559f8d53387097307
| |_|/  Author: Thomas Sedlmair <thomas.sedlmair@googlemail.com>
|/| |   Date:   Wed Feb 19 08:01:43 2025 +0100
| | |
| | |       added cwt-cucumber 2.5
| | |
```

On the other hand, running `git log --graph --date-order --branches
--tags` returns the expected:
```
* commit a4bbd3ad6bb5a0f8e5117a897d8c55941f533d98 (HEAD -> master)
| Author: Dan <mstr.danila@gmail.com>
| Date:   Fri Feb 14 18:46:11 2025 +0200
|
|     grpc: add version 1.69.0 (#26446)
|
|     * grpc: add version 1.69.0
|
|     * add cmake tool requires
|
|     ---------
|
|     Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com>
|
* commit a7868807cb2e21206ebf95278cb588f29a3e2205
| Author: Guillaume Egles <gegles@users.noreply.github.com>
| Date:   Thu Feb 13 05:44:35 2025 -0800
|
|     openssl: add versions `3.0.16`, `3.1.8`, `3.2.4`, `3.3.3`, `3.4.1`, stop publishing revisions for version `3.0.15` (#26578)
|
* commit 86057d3e63ac71e2fe48c07bb301f2d54187044d
| Author: Luis Caro Campos <3535649+jcar87@users.noreply.github.com>
| Date:   Thu Feb 13 13:34:41 2025 +0000
|
|     android-ndk: dont set LD and AS variables (#26581)
|
|     * android-ndk: dont set LD and AS variables
|
|     * android-ndk: refactor test package
|
* commit 123e382fafd2f5e811e10faac02efc275c45ec2a
| Author: Nikita <root.kidik@gmail.com>
| Date:   Thu Feb 13 12:29:39 2025 +0300
|
|     libffi: fix conditionals when building on Windows (#26500)
|
|     * fix: add missing or `clang`
|
|     * fix: libffi - always require as tool `automake`
```
5 days ago
wxiaoguang c2e23d3301
Fix PR web route permission check (#33636)
See the FIXME comment in code. Otherwise, if a repo's issue unit is
disabled, then the PRs can't be edited anymore.

By the way, make the permission log output look slightly better.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: metiftikci <metiftikci@hotmail.com>
6 days ago
metiftikci 84d2159ef6
fix: add missing locale (#33641)
this removed in #23113 but still using in `head_navbar.tmpl`
6 days ago
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>
6 days ago
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>
6 days ago
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
6 days ago
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>
7 days ago
wxiaoguang 15e020eec8
Refactor error system (#33626) 7 days ago
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>
7 days ago
silverwind f5a81f9636
Run spellcheck on tools directory (#33627)
Add `tools` files to spellcheck and fixed one issue.
1 week ago
wxiaoguang f35850f48e
Refactor error system (#33610) 1 week ago
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>
1 week ago
Lunny Xiao 5df9fd3e9c
Add API to support link package to repository and unlink it (#33481)
Fix #21062

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
1 week ago
GiteaBot 50a5d6bf5d [skip ci] Updated translations via Crowdin 1 week ago
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>
1 week ago
Sandro Santilli 37c4f3760c
[chore] add git mailmap for proper attribution of authorship (#33612) 1 week ago
Lunny Xiao 58c124cc4f
Move commits signature and verify functions to service layers (#33605)
No logic change, just move functions.
1 week ago
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 :)
1 week ago
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>
1 week ago
GiteaBot fc1b383da9 [skip ci] Updated translations via Crowdin 1 week ago
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>
1 week ago
Lunny Xiao 01bf8da02e
Fix bug when get commit (#33602)
Fix #33595
1 week ago
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>
1 week ago
silverwind 1ba7cbbfd6
Fix typo in HTML attribute (#33599) 1 week ago
Zettat123 8aede14b1d
Use default Git timeout when checking repo health (#33593) 1 week ago
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.
1 week ago
Lunny Xiao f232d8f530
Performance optimization for pull request files loading comments attachments (#33585) 2 weeks ago
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
2 weeks ago
techknowlogick d88b012525
go1.24 (#33562)
update to use go1.24

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 weeks ago
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>
2 weeks ago
GiteaBot 42d817e814 [skip ci] Updated translations via Crowdin 2 weeks ago
silverwind 3e39583bb5
Enable eslint for commonjs (#33575) 2 weeks ago
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
2 weeks ago
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
2 weeks ago
wxiaoguang f58f5bb3d8
Avoid duplicate SetContextValue call (#33564)
And fix FIXME and TODO
2 weeks ago
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>
2 weeks ago
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
2 weeks ago
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>
2 weeks ago
GiteaBot 217ffe5492 [skip ci] Updated translations via Crowdin 2 weeks ago
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
```
2 weeks ago
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>
2 weeks ago