1
1
mirror of https://github.com/go-gitea/gitea synced 2025-02-24 14:02:34 +00:00

19126 Commits

Author SHA1 Message Date
wxiaoguang
555d64d024
Always show the "rerun" button for action jobs (#33692)
And improve the mock code.
2025-02-24 08:40:46 +00:00
Arif Er
adf7018bfd
Fix OCI image.version annotation for releases to use full semver (#33698)
This commit fixes the docker build workflow such that semver-tagged
releases use the full semver for the OCI
`org.opencontainers.image.version` annotation, instead of using the
major version only.

This is done by changing the order of the tags that the
`docker/metadata-action` action is told to generate. Since the tags that
the action is told to generate are all of the same priority, the first
in the list will be used to set the annotation.

There is no need to fix the other two docker build workflows, i.e., (i)
the nightly releases and (ii) the rc-tagged releases. This is because
(i) the nightly releases do not get tagged with a semver, so the issue
does not exist, and (ii) rc-tagged releases only get built with one tag,
so the issue of needing to set an order of how tags are generated is
irrelevant.

Resolves go-gitea/gitea#33697.
2025-02-24 01:37:37 -05:00
wxiaoguang
56a0a9c750
Fix git empty check and HEAD request (#33690) 2025-02-24 02:11:29 +00:00
wxiaoguang
8ae46d9684
Fix some user name usages (#33689)
1. GetUserOrgsList should "order by" lower_name
2. GetIssuePostersWithSearch should search in-case-sensitive-ly
3. LoginName should not be used as username

By the way, remove unnecessary "onGiteaRun"
2025-02-23 12:33:43 +00:00
wxiaoguang
f991807f7e
Try to fix ACME path when renew (#33668)
Try to fix #32191
2025-02-23 13:12:08 +08:00
GiteaBot
9e75c54559 [skip ci] Updated translations via Crowdin 2025-02-23 00:34:45 +00:00
wxiaoguang
ead716d204
Improve Open-with URL encoding (#33666)
Fix #33665
2025-02-21 17:46:05 +00:00
Diana
a61014ea47
Fix for Maven Package Naming Convention Handling (#33678)
Make legacy package names could be listed and add tests

---------

Co-authored-by: diana.strebkova@t-systems.com <diana.strebkova@t-systems.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-22 01:38:49 +08:00
wxiaoguang
4adb7cad8b
Improve swagger generation (#33664)
Remove most "sed" tricks

---------

Co-authored-by: silverwind <me@silverwind.io>
2025-02-21 00:04:30 -08:00
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>
2025-02-21 04:17:56 +00:00
Lunny Xiao
a25081f380
Fix omitempty bug (#33663)
Fix #33660
2025-02-20 12:39:21 -08:00
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
2025-02-21 00:05:40 +08:00
wxiaoguang
cd225d7034
Fix mCaptcha bug (#33659)
Fix #33658
2025-02-20 22:53:38 +08:00
wxiaoguang
e6759f356d
Update Go dependencies (skip blevesearch, meilisearch) (#33655) 2025-02-20 22:10:54 +08:00
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>
2025-02-20 09:57:40 +00:00
Lunny Xiao
3bbc482879
Add missed changelogs (#33649)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-02-20 17:31:07 +08:00
GiteaBot
21af8150b7 [skip ci] Updated translations via Crowdin 2025-02-20 00:32:10 +00:00
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`
```
2025-02-19 10:35:08 -08:00
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>
2025-02-19 00:55:19 +00:00
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 be4e961240883778c44d9651eaaf9ab8723bbbb0

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