0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-05-23 08:32:23 +02:00

19449 Commits

Author SHA1 Message Date
NorthRealm
038990e0ff
Fix ephemeral runner deletion (#34447) (#34513) 2025-05-21 18:02:34 -04:00
Giteabot
03ff09870d
Fix edithook api can not update package, status and workflow_job events (#34495) (#34499)
Backport #34495 by @ChristopherHX

* the origin of this problem is duplicated code

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2025-05-18 21:18:19 -07:00
Giteabot
8bf4f2cc8f
Fix url validation in webhook add/edit API (#34492) (#34496)
Backport #34492 by @lunny

Fix #34491

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-05-17 15:31:36 -07:00
Giteabot
21731c1370
Fix get / delete runner to use consistent http 404 and 500 status (#34480) (#34488)
Backport #34480 by @ChristopherHX

* previously deleting an already deleted runner returned http 500
* previously any database error for the get endpoint was http 404 and
never 500

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2025-05-16 16:59:29 +00:00
Giteabot
a0e272d95a
Add missing setting load in dump-repo command (#34479) (#34489)
Backport #34479 by @lunny

Fix #34465

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-05-16 16:33:04 +00:00
NorthRealm
47537a8361
Add a button editing action secret #34348 (#34462)
Backport #34348

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-16 15:26:21 +00:00
Giteabot
d018c1b4b1
nix flake update (#34476) (#34490)
Backport #34476 by techknowlogick

Co-authored-by: techknowlogick <techknowlogick@gitea.com>
2025-05-16 23:00:18 +08:00
Giteabot
d2cbe2fba0
Add migrations tests (#34456) (#34483)
Backport #34456 by @lunny

Fix #34455

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-16 10:37:06 -04:00
Giteabot
d6233c25b5
Fix project board view (#34470) (#34475)
Backport #34470 by wxiaoguang

Fix #34469

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-16 01:32:53 +08:00
Giteabot
2bf2d00c8a
When updating comment, if the content is the same, just return and not update the databse (#34422) (#34464)
Backport #34422 by @lunny

Fix #34318

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-14 21:48:49 -07:00
Giteabot
9bd56a8ba0
Fix Workflow run Not Found page (#34459) (#34466)
Backport #34459 by NorthRealm

Co-authored-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com>
2025-05-15 11:55:39 +08:00
Giteabot
a1dc3c9bd1
Fix remove org user failure on mssql (#34449) (#34453)
Backport #34449 by @ChristopherHX

* mssql does not support fetching 0 repositories
* remove paging by NumRepos that might be 0
* extend admin api test to purge user 2

Fixes #34448

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-13 13:28:26 -07:00
Giteabot
47ee84d1f3
Fix repo broken check (#34444) (#34452)
Backport #34444 by wxiaoguang

Fix #34424

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-13 19:02:24 +00:00
Giteabot
89f1df033a
Fix comment textarea scroll issue in Firefox (#34438) (#34446)
Backport #34438 by @silverwind

In the comment editor, there is a bug in Firefox where the scroll
position unexpectedly moves up, which is annoying. This is not
reproducible in Chrome and Safari. To reproduce here are some steps:

- Go into an editable issue
- Scroll page to bottom
- Focus the textarea and press Return many times, causing the textarea
to get a scrollbar
- Scroll page to bottom again
- Press Return once more
- Page should not scroll up.

This fixes the bug by adding a temporary margin, and I verified it works
in all browsers.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-13 18:39:02 +02:00
Giteabot
94b67f1967
Fix releases sidebar navigation link (#34436) (#34440)
Backport #34436 by @badhezi

Resolves https://github.com/go-gitea/gitea/issues/34435

Co-authored-by: badhezi <zlilaharon@gmail.com>
2025-05-12 14:41:24 -07:00
Giteabot
0a9a84df11
Fix bug webhook milestone is not right. (#34419) (#34428)
Backport #34419 by @lunny

Fix #34400

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-05-12 00:21:14 +00:00
Giteabot
cdac263bb8
Only git operations should update last changed of a repository (#34388) (#34427)
Backport #34388 by @lunny

Try to fix #32046

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-05-11 23:23:12 +02:00
Giteabot
a5c7df7a4c
Fix GetUsersByEmails (#34423) (#34425)
Backport #34423 by wxiaoguang

Fix #34418, fix #34353

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-11 04:42:59 +08:00
Giteabot
6d738fecc4
Fix a bug when uploading file via lfs ssh command (#34408) (#34416)
Backport #34408 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-10 02:03:37 +00:00
Giteabot
38cc7453e2
Merge and tweak markup editor expander CSS (#34409) (#34415)
Backport #34409 by @silverwind

- Merge the CSS for the two expanders (text-expander-element and
tribute.js) into one file
- Fix overflow issues
- Remove min-width
- Various other tweaks like borders, colors, padding, gaps.

text-expander:

<img width="645" alt="Screenshot 2025-05-09 at 02 21 24"
src="https://github.com/user-attachments/assets/33276dc4-38e8-45e1-8216-2a4baa9bc039"
/>

tribute:

<img width="624" alt="Screenshot 2025-05-09 at 02 21 37"
src="https://github.com/user-attachments/assets/91fbcd1a-9bfc-40fd-93f0-a05b4bd4c98d"
/>

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-09 18:58:19 +02:00
Giteabot
b44175c071
Refactor commit message rendering and fix bugs (#34412) (#34414)
Backport #34412 by wxiaoguang

Fix #34398, fix #33308

Remove all `repo.ComposeCommentMetas` from templates,
only use `repo` to render commit message.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-09 13:08:23 +00:00
Giteabot
947358dffe
Fix incorrect divergence cache after switching default branch (#34370) (#34406)
Backport #34370 by @GWDx

Issue: After switching the default branch, other branches are still
compared against the old default branch due to outdated divergence
cache.

Change: Clear the divergence cache in SetRepoDefaultBranch to ensure
correct comparisons against the new default branch.

Fixes #34369

Co-authored-by: GWDx <gwdx@mail.ustc.edu.cn>
2025-05-09 01:31:34 +02:00
Giteabot
be1090cb2d
Grey out expired artifact on Artifacts list (#34314) (#34404)
Backport #34314 by @NorthRealm

Grey out expired artifact on Artifacts list.


![1](https://github.com/user-attachments/assets/79c00e39-29f5-4264-b7b2-7ed638ab71c1)

![2](https://github.com/user-attachments/assets/686b745f-d6d7-4921-8e1b-3472ac8b6c17)

Co-authored-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-08 10:56:51 -07:00
Giteabot
c8f3402841
Fix LFS file not stored in LFS when uploaded/edited via API or web UI (#34367) (#34396)
Backport #34367 by bytedream

Files that should be stored in LFS and are uploaded/edited from the API
or web UI aren't stored in LFS. This may be a regression from #34154.

Co-authored-by: bytedream <bytedream@protonmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-08 05:33:19 +00:00
Giteabot
a3a95a0b67
Upgrade go-github v61 -> v71 (#34385) (#34387)
Backport #34385 by @lunny

There will be a possible bug when migrating from Github
https://github.com/google/go-github/issues/3229
This PR upgrades go-github from v61 to v71 to resolve that problem.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-05-07 10:05:41 -07:00
Giteabot
ed527b664d
Fix only text/* being viewable in web UI (#34374) (#34378)
Backport #34374 by @bytedream

Regression from #34356, files like SVGs should be editable too
(https://github.com/go-gitea/gitea/pull/34356#discussion_r2072766240).

Co-authored-by: bytedream <bytedream@protonmail.com>
2025-05-06 05:18:12 +00:00
Giteabot
e4717d426e
Fix bug when visiting comparation page (#34334) (#34365)
Backport #34334 by @lunny

The `ci.HeadGitRepo` was opened and closed in the function
`ParseCompareInfo` but reused in the function `PrepareCompareDiff`.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-05-04 20:43:42 +00:00
Giteabot
16f15d2f7b
Fix bug when API get pull changed files for deleted head repository (#34333) (#34366)
Backport #34333 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-05-04 20:18:11 +00:00
Giteabot
b3f5196241
Fix LFS files being editable in web UI (#34356) (#34362)
Backport #34356 by @bytedream

It's possible to edit "raw" lfs files in the web UI when accessing the path manually.

![image](https://github.com/user-attachments/assets/62610e9e-24db-45ec-ad04-28062073164c)

Co-authored-by: bytedream <git@bytedream.dev>
2025-05-04 12:38:23 -07:00
Giteabot
6c5f0af45d
feat: return time of last usage for public keys and access tokens in the api (#34323) (#34339)
Backport #34323 by @tobiasbp

In the Gitea GUI, the user can see the time that _AccessTokens_ and
_PublicKeys_ were last used. This information is not returned by the
_/users/{username}/tokens_ and _/user/keys_ endpoints in the API. This
PR adds the missing data.

The time of last usage for for _tokens_ & _keys_ seem to be stored in
the _Updated_ field of the structs internally. For consistency, I have
used the name _updated_at_ for the new field returned by the _API_.
However, for the _API_ user, I don't think that name reflects the data
returned, as I believe it is the time of last usage. I propose that we
use the name _last_used_at_ instead. Let's hear reviewers opinion on
that.

* PublicKey
  1. _last_used_at_: string($date-time)
* AccessToken
  1. _created_at_: string($date-time) (for parity with public keys)
  2. _last_used_at_: string($date-time)

Fix #34313

Co-authored-by: Tobias Balle-Petersen <tobiasbp@gmail.com>
2025-05-01 14:45:08 -07:00
Giteabot
c95cb7c7e2
fix: do not return archive download URLs in API if downloads are disabled (#34324) (#34338)
Backport #34324 by @tobiasbp

If archive downloads are are disabled using
_DISABLE_DOWNLOAD_SOURCE_ARCHIVES_, archive links are still returned by
the API.

This PR changes the data returned, so the fields _zipball_url_ and
_tarball_url_ are omitted if archive downloads have been disabled.

Resolve #32159

Co-authored-by: Tobias Balle-Petersen <tobiasbp@gmail.com>
2025-05-01 12:18:43 -07:00
Giteabot
6747e3e0eb
Fix some dropdown problems on the issue sidebar (#34308) (#34327)
Backport #34308 by wxiaoguang

Also fix #34300

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-01 09:24:18 -07:00
Lunny Xiao
a12b5b3640
Add release notes for 1.24.0rc0 (#34305) v1.24.0-rc0 2025-04-29 21:45:47 +00:00
Giteabot
834dad8cef
Fix the ci build (#34309) (#34310)
Backport #34309 by @lunny

Fix
https://github.com/go-gitea/gitea/actions/runs/14722306878/job/41318217870

A fork has been created under https://gitea.com/gitea/go-xsd-duration

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-28 22:48:55 -07:00
Lunny Xiao
44d7d2973a
Fix wrong review requests when updating the pull request (#34286)
Fix #34224

The previous implementation in #33744 will get the pushed commits
changed files. But it's not always right when push a merged commit. This
PR reverted the logic in #33744 and will always get the PR's changed
files and get code owners.
v1.25.0-dev
2025-04-28 22:57:56 +00:00
wxiaoguang
0148d03f21
Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187)
Fix #880

Design:

1. A global setting `security.TWO_FACTOR_AUTH`.
* To support org-level config, we need to introduce a better "owner
setting" system first (in the future)
2. A user without 2FA can login and may explore, but can NOT read or
write to any repositories via API/web.
3. Keep things as simple as possible.
* This option only aggressively suggest users to enable their 2FA at the
moment, it does NOT guarantee that users must have 2FA before all other
operations, it should be good enough for real world use cases.
* Some details and tests could be improved in the future since this
change only adds a check and seems won't affect too much.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-28 15:31:59 -07:00
ChristopherHX
4ed07244b9
actions artifacts api list/download check status upload confirmed (#34273)
* fixes a fixture status to upload confirmed
* add another fixture as noise to break tests as soon they are exposed
to api
* v4 delete test added check that artifact is no longer visible in
internal api with status pending delete
* removal of http 404 on empty list: actions/upload-artifact@v4 now
backoff on http 404 of ListArtifacts endpoint
* fixes artifacts with pending delete etc. are able to be found and
downloaded if the storage is not freed
2025-04-28 16:31:53 +00:00
Kerwin Bryant
533b8b2d3d
Fix button alignments (#34276)
Continue with #34206.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-27 19:39:03 +00:00
Lunny Xiao
0376c09fc2
Update token creation API swagger documentation (#34288)
Fix #34231
2025-04-27 05:32:15 +00:00
GiteaBot
bf8f111f53 [skip ci] Updated translations via Crowdin 2025-04-27 00:38:03 +00:00
Lunny Xiao
44ece1e6f3
Explicitly not update indexes when sync database schemas (#34281)
Fix #34275

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-26 09:50:45 -07:00
silverwind
27ff5e2e84
Introduce --page-space-bottom at 64px (#30692)
Previously we would always leave 80px space before the page footer, but
this is problematic with small viewport heights on projects page for
example. I think it' ideal that we use `--page-spacing` which is already
in use for spacing on top of the page.

The `secondary-nav` margin is also adjusted as I see no value why this
shouldn't be the same value.
2025-04-25 10:53:26 -07:00
GiteaBot
8cea1aeea5 [skip ci] Updated translations via Crowdin 2025-04-25 00:35:36 +00:00
Brecht Van Lommel
a9343896f4
Option to delay conflict checking of old pull requests until page view (#27779)
`[repository.pull-request] DELAY_CHECK_FOR_INACTIVE_DAYS` is a new
setting to delay the mergeable check for pull requests that have been
inactive for the specified number of days.

This avoids potentially long delays for big repositories with many pull
requests. and reduces system load overall when there are many
repositories or pull requests.

When viewing the PR, checking will start immediately and the PR merge
box will automatically reload when complete. Accessing the PR through
the API will also start checking immediately.

The default value of `7` provides a balance between system load, and
keeping behavior similar to what it was before both for users and API
access. With `0` all conflict checking will be delayed, while `-1`
always checks immediately to restore the previous behavior.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-24 19:26:57 +00:00
wxiaoguang
d1ad8e1e80
Update unrs-resolver (#34279) 2025-04-24 14:02:38 +02:00
Lunny Xiao
e73c1139ac
Fix panic when comment is nil (#34257)
Fix #34254
2025-04-24 01:58:00 +00:00
wxiaoguang
e625250ffc
Fix various trivial frontend problems (#34263)
1. Fix #20606
2. Fix #34246
3. Fix missing spaces, fix misspells, no visual change.
4. Fix missing "not-mobile", fix #34265

---------

Co-authored-by: silverwind <me@silverwind.io>
2025-04-24 09:11:54 +08:00
wxiaoguang
58d2a87c6c
update go&js dependencies (#34262) 2025-04-23 21:22:40 +00:00
wxiaoguang
b758241f28
Fix runner list tmpl (#34270)
Fix  #34269

And fix some layout problems.
2025-04-23 15:34:18 +00:00
wxiaoguang
8aee07a064
Improve "not found" error messages for API (#34267)
Make the message clear, for example: #34266
2025-04-23 17:42:50 +08:00