]> source.dussan.org Git - gitea.git/log
gitea.git
6 months agoRefactor sha1 and time-limited code (#31023) (#31030)
Giteabot [Mon, 20 May 2024 16:58:21 +0000 (00:58 +0800)]
Refactor sha1 and time-limited code (#31023) (#31030)

Backport #31023 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoReturn `access_denied` error when an OAuth2 request is denied (#30974) (#31029)
Giteabot [Mon, 20 May 2024 14:49:04 +0000 (22:49 +0800)]
Return `access_denied` error when an OAuth2 request is denied (#30974) (#31029)

Backport #30974 by Zettat123

Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
6 months agoFix incorrect "blob excerpt" link when comparing files (#31013) (#31026)
Giteabot [Mon, 20 May 2024 07:40:14 +0000 (15:40 +0800)]
Fix incorrect "blob excerpt" link when comparing files (#31013) (#31026)

Backport #31013 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoAvoid 500 panic error when uploading invalid maven package file (#31014) (#31027)
Giteabot [Mon, 20 May 2024 07:10:27 +0000 (15:10 +0800)]
Avoid 500 panic error when uploading invalid maven package file (#31014) (#31027)

Backport #31014 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix project column title overflow (#31011) (#31025)
Giteabot [Mon, 20 May 2024 06:17:21 +0000 (14:17 +0800)]
Fix project column title overflow (#31011) (#31025)

Backport #31011 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix data-race during testing (#30999) (#31024)
Giteabot [Mon, 20 May 2024 05:49:24 +0000 (13:49 +0800)]
Fix data-race during testing (#30999) (#31024)

Backport #30999 by wxiaoguang

Fix #30992

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix bug on avatar (#31008) (#31019)
Giteabot [Mon, 20 May 2024 02:54:53 +0000 (10:54 +0800)]
Fix bug on avatar (#31008) (#31019)

Backport #31008 by @lunny

Extract from #30995

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
6 months agoFix "force private" logic (#31012) (#31021)
Giteabot [Mon, 20 May 2024 02:27:52 +0000 (10:27 +0800)]
Fix "force private" logic (#31012) (#31021)

Backport #31012 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoImprove reverse proxy documents and clarify the AppURL guessing behavior (#31003...
Giteabot [Sun, 19 May 2024 15:22:54 +0000 (23:22 +0800)]
Improve reverse proxy documents and clarify the AppURL guessing behavior (#31003) (#31020)

Backport #31003 by wxiaoguang

Fix #31002

1. Mention Make sure `Host` and `X-Fowarded-Proto` headers are correctly passed to Gitea
2. Clarify the basic requirements and move the "general configuration" to the top
3. Add a comment for the "container registry"
4. Use 1.21 behavior if the reverse proxy is not correctly configured

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
6 months agoSimplify mirror repository API logic (#30963) (#31009)
Giteabot [Sat, 18 May 2024 08:26:20 +0000 (16:26 +0800)]
Simplify mirror repository API logic (#30963) (#31009)

Backport #30963 by wxiaoguang

Fix #30921

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix JS error when editing a merged PR's title (#30990) (#31001)
Giteabot [Fri, 17 May 2024 01:07:09 +0000 (09:07 +0800)]
Fix JS error when editing a merged PR's title (#30990) (#31001)

Backport #30990 by @wxiaoguang

Regression of Fix issue/PR title edit (#30858)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoUpgrade `tqdm` dependency (#30996) (#31000)
Giteabot [Fri, 17 May 2024 00:39:39 +0000 (08:39 +0800)]
Upgrade `tqdm` dependency (#30996) (#31000)

Backport #30996 by @silverwind

Result of `make update-py`

Fixes: https://github.com/go-gitea/gitea/security/dependabot/65
Co-authored-by: silverwind <me@silverwind.io>
6 months agotemplate: `label` fix correct input id (#30987) (#30997)
Giteabot [Thu, 16 May 2024 13:45:52 +0000 (21:45 +0800)]
template: `label` fix correct input id (#30987) (#30997)

Just a small commit to fix a wrong label for id.
Thanks and cheers!

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
Co-authored-by: Frank Villaro-Dixon <frank@vi-di.fr>
6 months agoPut web editor into a segment (#30966) (#30993)
Giteabot [Thu, 16 May 2024 07:03:45 +0000 (15:03 +0800)]
Put web editor into a segment (#30966) (#30993)

Backport #30966 by silverwind

Co-authored-by: silverwind <me@silverwind.io>
6 months agoCheck if the release is converted from the tag when updating the release (#30984...
Giteabot [Wed, 15 May 2024 21:34:38 +0000 (05:34 +0800)]
Check if the release is converted from the tag when updating the release (#30984) (#30986)

We should call `notify_service.NewRelease` when a release is created
from an existing tag.

Co-authored-by: Zettat123 <zettat123@gmail.com>
6 months agoRemove unnecessary double quotes on language file (#30977) (#30979)
Giteabot [Wed, 15 May 2024 09:00:58 +0000 (17:00 +0800)]
Remove unnecessary double quotes on language file (#30977) (#30979)

Backport #30977 by @lunny

The double quotes and the prefix/suffix space are unnecessary.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
6 months agoAlways load or generate oauth2 jwt secret (#30942) (#30978)
Giteabot [Tue, 14 May 2024 15:00:38 +0000 (23:00 +0800)]
Always load or generate oauth2 jwt secret (#30942) (#30978)

Backport #30942 by @wxiaoguang

 Fix #30923

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFilter out duplicate action(activity) items for a repository (#30957) (#30976)
Giteabot [Tue, 14 May 2024 14:14:39 +0000 (22:14 +0800)]
Filter out duplicate action(activity) items for a repository (#30957) (#30976)

Backport #30957

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoProtected tag is no internal server error (#30962) (#30970)
Giteabot [Tue, 14 May 2024 07:15:36 +0000 (15:15 +0800)]
Protected tag is no internal server error (#30962) (#30970)

Backport #30962 by @KN4CK3R

Fixes #30959

Adds an API test for protected tags.
Fix existing tag in combination with fixtures.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
6 months agoRestyle release list, fix branch dropdown (#30837) (#30968)
Giteabot [Mon, 13 May 2024 22:00:52 +0000 (06:00 +0800)]
Restyle release list, fix branch dropdown (#30837) (#30968)

Backport #30837 by @silverwind

Fixes https://github.com/go-gitea/gitea/issues/30821 and restyles the
release list.

Desktop:

<img width="1199" alt="Screenshot 2024-05-02 at 20 46 10"
src="https://github.com/go-gitea/gitea/assets/115237/bee92423-d4a9-4b26-8301-3a1e09eef4cd">

Mobile:

<img width="443" alt="Screenshot 2024-05-02 at 20 46 21"
src="https://github.com/go-gitea/gitea/assets/115237/42ecbae5-bdb6-4b16-a0ee-9c64daede68d">

Co-authored-by: silverwind <me@silverwind.io>
6 months agofix: change npm scope registry (#30964) (#30965)
Giteabot [Mon, 13 May 2024 16:14:31 +0000 (00:14 +0800)]
fix: change npm scope registry (#30964) (#30965)

Backport #30964 by @llxlr

https://docs.npmjs.com/cli/v10/using-npm/scope#associating-a-scope-with-a-registry

Co-authored-by: james yang <yanghongday369@gmail.com>
6 months agoSupport using label names when changing issue labels (#30943) (#30958)
Giteabot [Mon, 13 May 2024 06:28:11 +0000 (14:28 +0800)]
Support using label names when changing issue labels (#30943) (#30958)

Backport #30943 by @Zettat123

Resolve #30917

Make the APIs for adding labels and replacing labels support both label
IDs and label names so the
[`actions/labeler`](https://github.com/actions/labeler) action can work
in Gitea.

<img width="600px"
src="https://github.com/go-gitea/gitea/assets/15528715/7835c771-f637-4c57-9ce5-e4fbf56fa0d3"
/>

Co-authored-by: Zettat123 <zettat123@gmail.com>
6 months agoFix file path width in repo non-homepage view (#30951) (#30952)
Giteabot [Sun, 12 May 2024 12:07:16 +0000 (20:07 +0800)]
Fix file path width in repo non-homepage view (#30951) (#30952)

Backport #30951 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/30940
<img width="1310" alt="Screenshot 2024-05-11 at 20 48 41"
src="https://github.com/go-gitea/gitea/assets/115237/f163dfd4-1299-421f-a99e-cd0c793e0e3d">

Co-authored-by: silverwind <me@silverwind.io>
6 months agoRemove If Exist check on migration for mssql because that syntax required SQL server...
Giteabot [Sun, 12 May 2024 03:15:01 +0000 (11:15 +0800)]
Remove If Exist check on migration for mssql because that syntax required SQL server 2016 (#30894) (#30946)

Backport #30894 by @lunny

Fix #30872

We will assume the database is consistent before executing the
migration. So the indexes should exist. Removing `IF EXIST` then is safe
enough.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
6 months agoMove reverproxyauth before session so the header will not be ignored even if user...
Giteabot [Sun, 12 May 2024 02:25:55 +0000 (10:25 +0800)]
Move reverproxyauth before session so the header will not be ignored even if user has login (#27821) (#30948)

Backport #27821 by @lunny

When a user logout and then login another user, the reverseproxy auth
should be checked before session otherwise the old user is still login.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
6 months agoFix some UI regressions for commit list (#30920) (#30937)
Giteabot [Fri, 10 May 2024 14:36:06 +0000 (22:36 +0800)]
Fix some UI regressions for commit list (#30920) (#30937)

Backport #30920 by wxiaoguang

Close #30919

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
6 months agoCheck if reverse proxy is correctly configured (#30890) (#30935)
Giteabot [Fri, 10 May 2024 12:34:04 +0000 (20:34 +0800)]
Check if reverse proxy is correctly configured (#30890) (#30935)

Backport #30890 by wxiaoguang

Follow #27011
Follow #30885

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
6 months agoFix incorrect default branch when adopt a repository (#30912) (#30928)
yp05327 [Fri, 10 May 2024 12:00:01 +0000 (21:00 +0900)]
Fix incorrect default branch when adopt a repository (#30912) (#30928)

Backport #30912

ps: removed useless `u *user_model.User` for `adoptRepository`

6 months agoRemove deprecated stuff for runners (#30930) (#30931)
Giteabot [Fri, 10 May 2024 08:57:30 +0000 (16:57 +0800)]
Remove deprecated stuff for runners (#30930) (#30931)

Backport #30930 by @wolfogre

It's time (maybe somewhat late) to remove some deprecated stuff for the
runner.

- `x-runner-version`: runners needn't to report version in every
request, they will call `Declare`.
- `AgentLabels`: runners will report them as `Labels`.

Co-authored-by: Jason Song <i@wolfogre.com>
6 months agoUpdate issue indexer after merging a PR (#30715) (#30903)
Giteabot [Thu, 9 May 2024 05:51:57 +0000 (13:51 +0800)]
Update issue indexer after merging a PR (#30715) (#30903)

Backport #30715 by @Zettat123

Fix #30684

Co-authored-by: Zettat123 <zettat123@gmail.com>
6 months agoAdd missing menu active item background back (#30897) (#30907)
Giteabot [Wed, 8 May 2024 23:53:02 +0000 (07:53 +0800)]
Add missing menu active item background back (#30897) (#30907)

Backport #30897 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix incorrect issue form (#30881) (#30904)
Giteabot [Wed, 8 May 2024 23:26:53 +0000 (07:26 +0800)]
Fix incorrect issue form (#30881) (#30904)

Backport #30881 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix misspelling of mergable (#30896) (#30905)
Giteabot [Wed, 8 May 2024 16:38:46 +0000 (00:38 +0800)]
Fix misspelling of mergable (#30896) (#30905)

Backport #30896 by @yp05327

https://github.com/go-gitea/gitea/pull/25812#issuecomment-2099833692
Follow #30573

Co-authored-by: yp05327 <576951401@qq.com>
6 months agoFix various problems around projects board view (#30696) (#30902)
Giteabot [Wed, 8 May 2024 15:46:21 +0000 (23:46 +0800)]
Fix various problems around projects board view (#30696) (#30902)

Backport #30696 by @lunny

# The problem
The previous implementation will start multiple POST requests from the
frontend when moving a column and another bug is moving the default
column will never be remembered in fact.

# What's changed

- [x] This PR will allow the default column to move to a non-first
position
- [x] And it also uses one request instead of multiple requests when
moving the columns
- [x] Use a star instead of a pin as the icon for setting the default
column action
- [x] Inserted new column will be append to the end
- [x] Fix #30701 the newly added issue will be append to the end of the
default column
- [x] Fix when deleting a column, all issues in it will be displayed
from UI but database records exist.
- [x] Add a limitation for columns in a project to 20. So the sorting
will not be overflow because it's int8.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix wrong transfer hint (#30889) (#30900)
Giteabot [Wed, 8 May 2024 15:12:37 +0000 (23:12 +0800)]
Fix wrong transfer hint (#30889) (#30900)

Backport #30889 by @lunny

Fix #30187

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
6 months agoMove database operations of merging a pull request to post receive hook and add a...
Giteabot [Wed, 8 May 2024 14:17:18 +0000 (22:17 +0800)]
Move database operations of merging a pull request to post receive hook and add a transaction (#30805) (#30888)

Backport #30805 by @lunny

Merging PR may fail because of various problems. The pull request may
have a dirty state because there is no transaction when merging a pull
request. ref
https://github.com/go-gitea/gitea/pull/25741#issuecomment-2074126393

This PR moves all database update operations to post-receive handler for
merging a pull request and having a database transaction. That means if
database operations fail, then the git merging will fail, the git client
will get a fail result.

There are already many tests for pull request merging, so we don't need
to add a new one.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoRefactor AppURL usage (#30885) (#30891)
wxiaoguang [Wed, 8 May 2024 13:34:43 +0000 (21:34 +0800)]
Refactor AppURL usage (#30885) (#30891)

Backport #30885
Fix #30883
Fix #29591

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
6 months agoRepository explore alphabetically order respect owner name (#30882)
6543 [Tue, 7 May 2024 16:35:02 +0000 (18:35 +0200)]
Repository explore alphabetically order respect owner name (#30882)

similar to #30784 but only for the repo explore page

is covered by #30876 for the main branch

6 months agoFix missing migrate actions artifacts (#30874) (#30886)
Giteabot [Tue, 7 May 2024 13:59:00 +0000 (21:59 +0800)]
Fix missing migrate actions artifacts (#30874) (#30886)

Backport #30874 by @lunny

The actions artifacts should be able to be migrate to the new storage
place.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
6 months agoMake sure git version&feature are always prepared (#30877) (#30879)
wxiaoguang [Tue, 7 May 2024 02:07:33 +0000 (10:07 +0800)]
Make sure git version&feature are always prepared (#30877) (#30879)

Backport #30877

6 months agoMake "sync branch" also sync object format and add tests (#30878) (#30880)
Giteabot [Tue, 7 May 2024 00:33:28 +0000 (08:33 +0800)]
Make "sync branch" also sync object format and add tests (#30878) (#30880)

Backport #30878 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoGet repo list with OrderBy alpha should respect owner too (#30784) (#30875)
Giteabot [Mon, 6 May 2024 15:06:45 +0000 (23:06 +0800)]
Get repo list with OrderBy alpha should respect owner too (#30784) (#30875)

Backport #30784 by @6543

instead of:
- zowner/gcode
- awesome/nul
- zowner/nul
- zowner/zzz

we will get:
- awesome/nul
- zowner/gcode
- zowner/nul
- zowner/zzz

Co-authored-by: 6543 <6543@obermui.de>
6 months agoFix some UI problems (dropdown/container) (#30849) (#30871)
Giteabot [Mon, 6 May 2024 07:45:04 +0000 (15:45 +0800)]
Fix some UI problems (dropdown/container) (#30849) (#30871)

Backport #30849 by wxiaoguang

Follow #30345
Follow #30547

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix some UI problems (install/checkbox) (#30854) (#30870)
Giteabot [Mon, 6 May 2024 06:58:42 +0000 (14:58 +0800)]
Fix some UI problems (install/checkbox) (#30854) (#30870)

Backport #30854 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoHave time.js use UTC-related getters/setters (#30857) (#30869)
Giteabot [Mon, 6 May 2024 02:01:22 +0000 (10:01 +0800)]
Have time.js use UTC-related getters/setters (#30857) (#30869)

Backport #30857 by kemzeb

Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
Co-authored-by: Sam Fisher <fisher@3echelon.local>
6 months agoDo not show monaco JS errors (#30862) (#30866)
Giteabot [Sun, 5 May 2024 16:53:09 +0000 (00:53 +0800)]
Do not show monaco JS errors (#30862) (#30866)

Backport #30862 by wxiaoguang

Fix #30861

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix issue/PR title edit (#30858) (#30865)
Giteabot [Sun, 5 May 2024 13:53:12 +0000 (21:53 +0800)]
Fix issue/PR title edit (#30858) (#30865)

Backport #30858 by wxiaoguang

1. "enter" doesn't work (I think it is the last enter support for #14843)
2. if a branch name contains something like `&`, then the branch selector doesn't update

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoAdd result check in TestAPIEditUser (#29674) (#30860)
Giteabot [Sun, 5 May 2024 13:17:03 +0000 (21:17 +0800)]
Add result check in TestAPIEditUser (#29674) (#30860)

Backport #29674 by @yp05327

Fix #29514
there are too many usage of `NewRequestWithValues`, so there's no need
to check all of them.
Just one is enough I think.

Co-authored-by: yp05327 <576951401@qq.com>
6 months agoFix markdown URL parsing for commit ID (#30812) (#30855)
Giteabot [Sat, 4 May 2024 04:04:05 +0000 (12:04 +0800)]
Fix markdown URL parsing for commit ID (#30812) (#30855)

Backport #30812 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix no edit history after editing issue's title and content (#30814) (#30845)
Giteabot [Fri, 3 May 2024 14:43:16 +0000 (22:43 +0800)]
Fix no edit history after editing issue's title and content (#30814) (#30845)

Backport #30814 by @yp05327

Fix #30807

reuse functions in services

Co-authored-by: yp05327 <576951401@qq.com>
6 months agoImprove grep search (#30843) (#30850)
Giteabot [Fri, 3 May 2024 09:59:33 +0000 (17:59 +0800)]
Improve grep search (#30843) (#30850)

Backport #30843 by wxiaoguang

Reduce the context line number to 1, make "git grep" search respect the
include/exclude patter, and fix #30785

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoDon't only list code-enabled repositories when using repository API (#30817) (#30848)
Giteabot [Fri, 3 May 2024 08:52:38 +0000 (16:52 +0800)]
Don't only list code-enabled repositories when using repository API (#30817) (#30848)

Backport #30817 by kemzeb

We should be listing all repositories by default.

Fixes #28483.

Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
6 months agoIgnore useless error message "broken pipe" (#30801) (#30842)
Giteabot [Fri, 3 May 2024 04:20:34 +0000 (12:20 +0800)]
Ignore useless error message "broken pipe" (#30801) (#30842)

Backport #30801 by wxiaoguang

Fix #30792

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix JS error on pull request page (#30838) (#30841)
Giteabot [Fri, 3 May 2024 02:17:11 +0000 (10:17 +0800)]
Fix JS error on pull request page (#30838) (#30841)

Backport #30838 by silverwind

Fix this error seen on PR page, regression from
https://github.com/go-gitea/gitea/pull/30803:

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoImprove repo button row layout (#30668) (#30839)
Giteabot [Thu, 2 May 2024 19:38:37 +0000 (03:38 +0800)]
Improve repo button row layout (#30668) (#30839)

Backport #30668 by @silverwind

Since there is now a second `<input>` in the repo buttons, we can make a
better-looking layout with no empty space, except on mobile.

Also I fixed one bug with focus border on clone panel.

## Large

<img width="1163" alt="Screenshot 2024-04-23 at 22 25 22"
src="https://github.com/go-gitea/gitea/assets/115237/8135a572-aa67-4672-ad49-b76b06890b52">

## Medium
<img width="870" alt="Screenshot 2024-04-23 at 22 25 34"
src="https://github.com/go-gitea/gitea/assets/115237/9e93f61c-3315-4a78-8328-8cefad5b50fa">

## Mobile
<img width="416" alt="Screenshot 2024-04-23 at 22 25 52"
src="https://github.com/go-gitea/gitea/assets/115237/859e341f-807a-48e6-8bcf-31715963216c">

Co-authored-by: silverwind <me@silverwind.io>
6 months agoPrevent automatic OAuth grants for public clients (#30790) (#30836)
Giteabot [Thu, 2 May 2024 19:06:32 +0000 (03:06 +0800)]
Prevent automatic OAuth grants for public clients (#30790) (#30836)

Backport #30790 by archer-321

This commit forces the resource owner (user) to always approve OAuth 2.0
authorization requests if the client is public (e.g. native
applications).

As detailed in [RFC 6749 Section
10.2](https://www.rfc-editor.org/rfc/rfc6749.html#section-10.2),

> The authorization server SHOULD NOT process repeated authorization
requests automatically (without active resource owner interaction)
without authenticating the client or relying on other measures to ensure
that the repeated request comes from the original client and not an
impersonator.

With the implementation prior to this patch, attackers with access to
the redirect URI (e.g., the loopback interface for
`git-credential-oauth`) can get access to the user account without any
user interaction if they can redirect the user to the
`/login/oauth/authorize` endpoint somehow (e.g., with `xdg-open` on
Linux).

Fixes #25061.

Co-authored-by: Archer <archer@beezig.eu>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoCatch and handle unallowed file type errors in issue attachment API (#30791) (#30834)
Giteabot [Thu, 2 May 2024 17:45:45 +0000 (01:45 +0800)]
Catch and handle unallowed file type errors in issue attachment API (#30791) (#30834)

Backport #30791 by kemzeb

Before, we would just throw 500 if a user passes an attachment that is
not an allowed type. This commit catches this error and throws a 422
instead since this should be considered a validation error.

Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
6 months agoFix incorrect message id for release email (#30825) (#30833)
Giteabot [Thu, 2 May 2024 16:00:29 +0000 (00:00 +0800)]
Fix incorrect message id for release email (#30825) (#30833)

Backport #30825 by wxiaoguang

Make generateMessageIDForRelease outputs the same format as
generateMessageIDForIssue (old `createReference`)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoAdd hover outline to heatmap squares (#30828) (#30832)
Giteabot [Thu, 2 May 2024 15:01:07 +0000 (23:01 +0800)]
Add hover outline to heatmap squares (#30828) (#30832)

Backport #30828 by @silverwind

Makes it easier to use because you see which square is currently
hovered:

<img width="314" alt="Screenshot 2024-05-02 at 15 38 20"
src="https://github.com/go-gitea/gitea/assets/115237/3a15dad1-2259-4f28-9fae-5cf6ad3d8798">

I did try a `scoped` style for this, but that did not work for some
reason.

Co-authored-by: silverwind <me@silverwind.io>
6 months agoUpgrade chi-binding (#30826) (#30830)
Giteabot [Thu, 2 May 2024 14:50:10 +0000 (22:50 +0800)]
Upgrade chi-binding (#30826) (#30830)

Backport #30826 by @lunny

Front port #30742

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
6 months agoImprove context popup rendering (#30824) (#30829)
Giteabot [Thu, 2 May 2024 13:47:32 +0000 (21:47 +0800)]
Improve context popup rendering (#30824) (#30829)

Backport #30824 by @silverwind

Before, lot of empty space when no labels or body:

<img width="281" alt="Screenshot 2024-05-02 at 13 51 29"
src="https://github.com/go-gitea/gitea/assets/115237/8a980ccd-d53c-43a3-a059-dc8c614621e1">

After, empty space collapsed:

<img width="306" alt="Screenshot 2024-05-02 at 13 51 16"
src="https://github.com/go-gitea/gitea/assets/115237/8d9c154d-5de1-43d0-8536-afd9194d99b3">

All `<p>` (unsuitable) and `<small>` (discouraged in favor of css) tags
are removed.

Co-authored-by: silverwind <me@silverwind.io>
6 months agoFix activity heat map padding & locale (#30823) (#30827)
Giteabot [Thu, 2 May 2024 13:27:45 +0000 (21:27 +0800)]
Fix activity heat map padding & locale (#30823) (#30827)

Backport #30823 by wxiaoguang

Fix #30808

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
6 months agoFix rounded border for segment followed by pagination (#30809) (#30818)
Giteabot [Thu, 2 May 2024 13:06:02 +0000 (21:06 +0800)]
Fix rounded border for segment followed by pagination (#30809) (#30818)

Backport #30809 by @silverwind

Fixes https://github.com/go-gitea/gitea/issues/30673, specifically
https://github.com/go-gitea/gitea/issues/30673#issuecomment-2085329812.

Co-authored-by: silverwind <me@silverwind.io>
6 months agoFix issue card layout (#30800) (#30820)
Giteabot [Thu, 2 May 2024 12:10:32 +0000 (20:10 +0800)]
Fix issue card layout (#30800) (#30820)

Backport #30800 by wxiaoguang

Fix #30788

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix branch selector UI (#30803) (#30819)
Giteabot [Thu, 2 May 2024 11:12:43 +0000 (19:12 +0800)]
Fix branch selector UI (#30803) (#30819)

Backport #30803 by wxiaoguang

Fix  #30802

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoSkip gzip for some well-known compressed file types (#30796) (#30813)
Giteabot [Thu, 2 May 2024 06:50:24 +0000 (14:50 +0800)]
Skip gzip for some well-known compressed file types (#30796) (#30813)

Backport #30796 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
6 months agoFix markdown rendering when mentioning users (#30795) (#30810)
Giteabot [Thu, 2 May 2024 01:48:24 +0000 (09:48 +0800)]
Fix markdown rendering when mentioning users (#30795) (#30810)

Backport #30795 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix bleve fuzziness (#30799) (#30804)
Giteabot [Wed, 1 May 2024 12:59:59 +0000 (20:59 +0800)]
Fix bleve fuzziness (#30799) (#30804)

Backport #30799 by wxiaoguang

Fix #30797
Fix #30317

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix duplicate status check contexts (#30660) (#30779)
Zettat123 [Wed, 1 May 2024 02:10:37 +0000 (10:10 +0800)]
Fix duplicate status check contexts (#30660) (#30779)

Backport #30660.

Caused by #30076.

There may be some duplicate status check contexts when setting status
checks for a branch protection rule. The duplicate contexts should be
removed.

Before:
<img

src="https://github.com/go-gitea/gitea/assets/15528715/97f4de2d-4868-47a3-8a99-5a180f9ac0a3"
width="600px" />

After:
<img

src="https://github.com/go-gitea/gitea/assets/15528715/ff7289c5-9793-4090-ba31-e8cb3c85f8a3"
width="600px" />

6 months agoRework and fix stopwatch (#30732) (#30787)
Giteabot [Tue, 30 Apr 2024 21:46:45 +0000 (05:46 +0800)]
Rework and fix stopwatch (#30732) (#30787)

Backport #30732 by @silverwind

Fixes https://github.com/go-gitea/gitea/issues/30721 and overhauls the
stopwatch. Time is now shown inside the "dot" icon and on both mobile
and desktop. All rendering is now done by `<relative-time>`, the
`pretty-ms` dependency is dropped.

Desktop:
<img width="557" alt="Screenshot 2024-04-29 at 22 33 27"
src="https://github.com/go-gitea/gitea/assets/115237/3a46cdbf-6af2-4bf9-b07f-021348badaac">

Mobile:
<img width="640" alt="Screenshot 2024-04-29 at 22 34 19"
src="https://github.com/go-gitea/gitea/assets/115237/8a2beea7-bd5d-473f-8fff-66f63fd50877">

Note for tippy:
Previously, tippy instances defaulted to "menu" theme, but that theme is
really only meant for `.ui.menu`, so it was not optimal for the
stopwatch popover.

This introduces a unopinionated `default` theme that has no padding and
should be suitable for all content. I reviewed all existing uses and
explicitely set the desired `theme` on all of them.

Co-authored-by: silverwind <me@silverwind.io>
6 months agoImprove logout from worker (#30775) (#30789)
Giteabot [Tue, 30 Apr 2024 21:19:13 +0000 (05:19 +0800)]
Improve logout from worker (#30775) (#30789)

Backport #30775 by wxiaoguang

A quick fix for #30756

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoGet repo assignees and reviewers should ignore deactivated users (#30770) (#30782)
6543 [Tue, 30 Apr 2024 15:36:28 +0000 (17:36 +0200)]
Get repo assignees and reviewers should ignore deactivated users (#30770) (#30782)

Backport  #30770

If an user is deactivated, it should not be in the list of users who are
suggested to be assigned or review-requested.

old assignees or reviewers are not affected.

---
*Sponsored by Kithara Software GmbH*

6 months agoFix dashboard commit status null access (#30771) (#30786)
Giteabot [Tue, 30 Apr 2024 12:53:20 +0000 (20:53 +0800)]
Fix dashboard commit status null access (#30771) (#30786)

Backport #30771 by wxiaoguang

Fix #30768

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix cross-compilation errors when CGO_CFLAGS/CGO_LDFLAGS is set (#30749) (#30774)
Giteabot [Tue, 30 Apr 2024 10:51:38 +0000 (18:51 +0800)]
Fix cross-compilation errors when CGO_CFLAGS/CGO_LDFLAGS is set (#30749) (#30774)

Backport #30749 by @sryze

When you cross-compile Gitea and you specify one of the envrionment
variables related to C flags, cgo will fail to build the generator
programs (e.g. generate-bindata) because GOOS and GOARCH are unset, but
those additional flags variables are not unset together with those.

To solve this issue, the simplest way that I've found is to disable cgo
in the `go generate` command as it's not really used there.

For example, I've had this problem with cross-compiling Gitea on FreeBSD
x86_64 to ARMv7 where it's necessary to pass `--target` to `clang` via
`CGO_CFLAGS`:
```
GOOS=freebsd \
GOARCH=arm \
GGOARM=7 \
CGO_ENABLED=1 \
SYSROOT=/usr/local/freebsd-sysroot/armv7 \
CC=clang \
CGO_CFLAGS="--target=armv7-unknown-freebsd13.2-gnueabihf" \
TAGS="bindata sqlite sqlite_unlock_notify" \
make SHELL='sh -x' build
```

```
Running go generate...
# runtime/cgo
In file included from gcc_freebsd_amd64.c:9:
In file included from /usr/include/signal.h:42:
/usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t'
modules/migration/schemas_bindata.go:8: running "go": exit status 1
# runtime/cgo
In file included from gcc_freebsd_amd64.c:9:
In file included from /usr/include/signal.h:42:
/usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t'
modules/options/options_bindata.go:8: running "go": exit status 1
# runtime/cgo
In file included from gcc_freebsd_amd64.c:9:
In file included from /usr/include/signal.h:42:
/usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t'
modules/public/public_bindata.go:8: running "go": exit status 1
# runtime/cgo
In file included from gcc_freebsd_amd64.c:9:
In file included from /usr/include/signal.h:42:
/usr/include/sys/_ucontext.h:44:2: error: unknown type name 'mcontext_t'
modules/templates/templates_bindata.go:8: running "go": exit status 1
gmake[1]: *** [Makefile:781: generate-go] Error 1
*** Error code 2

Stop.
```

But with this fix Gitea compiles successfully.

Co-authored-by: Sergey Zolotarev <4525736+sryze@users.noreply.github.com>
6 months agoFix issue label rendering in the issue popup (#30763) (#30773)
Giteabot [Tue, 30 Apr 2024 09:40:47 +0000 (17:40 +0800)]
Fix issue label rendering in the issue popup (#30763) (#30773)

Backport #30763 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoRight align the "Settings" menu item in overflow-menu (#30764) (#30777)
Giteabot [Tue, 30 Apr 2024 08:40:09 +0000 (16:40 +0800)]
Right align the "Settings" menu item in overflow-menu (#30764) (#30777)

Backport #30764 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoRename CodeIndexerEnabled to IsRepoIndexerEnabled (#30762) (#30767)
Giteabot [Mon, 29 Apr 2024 21:57:48 +0000 (05:57 +0800)]
Rename CodeIndexerEnabled to IsRepoIndexerEnabled (#30762) (#30767)

Backport #30762 by @wxiaoguang

Fix  #30761

Most places use `IsRepoIndexerEnabled` but not `CodeIndexerEnabled`, so
it should always use `IsRepoIndexerEnabled` for consistency.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix all rounded borders, change affected tab menus to pills (#30707) (#30769)
Giteabot [Mon, 29 Apr 2024 21:19:44 +0000 (05:19 +0800)]
Fix all rounded borders, change affected tab menus to pills (#30707) (#30769)

Backport #30707 by @silverwind

Fixes https://github.com/go-gitea/gitea/issues/30673, all 23 issues.
Notes:

- Tab bar menus had to change to pills because of unsolvable issue with
the border-radius as tab bar renders a overlapping border onto the box
below. And I think pills look better.
- Added padding to code editor empty preview message
- Hide monaco's built-in blue focus border, we don't need it and it
never showed before either.
- Label add menu is simplified, removing the nested segment.

<img width="1322" alt="Screenshot 2024-04-25 at 22 26 19"
src="https://github.com/go-gitea/gitea/assets/115237/7e394e0c-b7ad-417d-8e9f-12f1dea93ed1">
<img width="1326" alt="Screenshot 2024-04-25 at 22 28 00"
src="https://github.com/go-gitea/gitea/assets/115237/66c8499f-aa9f-4d95-8cca-ef13dfa82c65">
<img width="997" alt="Screenshot 2024-04-25 at 22 36 53"
src="https://github.com/go-gitea/gitea/assets/115237/07896102-c71d-4246-8173-c2bc2e1d3cae">
<img width="832" alt="Screenshot 2024-04-25 at 22 56 09"
src="https://github.com/go-gitea/gitea/assets/115237/d83afc96-08ca-4adc-baf4-3d02804be57c">
<img width="361" alt="Screenshot 2024-04-25 at 22 57 12"
src="https://github.com/go-gitea/gitea/assets/115237/c7371a68-00b5-47d8-84d0-ddc5268b2b2c">

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
6 months agoFix nil dereference on error (#30740) (#30746)
wxiaoguang [Mon, 29 Apr 2024 00:23:35 +0000 (08:23 +0800)]
Fix nil dereference on error (#30740) (#30746)

Backport #30740 manually

Co-authored-by: Chongyi Zheng <git@zcy.dev>
6 months agoGitea with first upper case + typos (#30739) (#30747)
Giteabot [Sun, 28 Apr 2024 23:51:42 +0000 (07:51 +0800)]
Gitea with first upper case + typos (#30739) (#30747)

Backport #30739 by @mainboarder

* Corrected gitea to Gitea
* fixed some typos

Co-authored-by: mainboarder <git@mainboarder.de>
6 months agoFix documentation build problems because of MDX syntax conflicts (#30744) (#30745)
Giteabot [Sun, 28 Apr 2024 13:02:38 +0000 (21:02 +0800)]
Fix documentation build problems because of MDX syntax conflicts (#30744) (#30745)

Backport #30744 by @lunny

Documentation building has encountered a problem like below. This is
because MDX syntax doesn't allow `{customPath}`, we have to use
\`{customPath}\`

```
Error: Can't render static file for pathname "/next/administration/config-cheat-sheet"
            at generateStaticFile (/workspace/gitea/gitea-docusaurus/node_modules/@docusaurus/core/lib/ssg.js:119:15)
            at runNextTicks (node:internal/process/task_queues:60:5)
            at process.processImmediate (node:internal/timers:449:9)
            at async /workspace/gitea/gitea-docusaurus/node_modules/p-map/index.js:57:22 {
          [cause]: ReferenceError: CustomPath is not defined
              at _createMdxContent (server.bundle.js:4406:106)
              at MDXContent (server.bundle.js:10745:8)
              at Uc (server.bundle.js:264171:44)
              at Xc (server.bundle.js:264173:253)
              at Z (server.bundle.js:264179:89)
              at Yc (server.bundle.js:264182:98)
              at $c (server.bundle.js:264181:140)
              at Z (server.bundle.js:264179:345)
              at Xc (server.bundle.js:264177:231)
              at Z (server.bundle.js:264179:89)
```

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
7 months agoMake Ctrl+Enter work for issue/comment edit (#30720) v1.22.0-rc1
wxiaoguang [Sat, 27 Apr 2024 14:32:00 +0000 (22:32 +0800)]
Make Ctrl+Enter work for issue/comment edit (#30720)

Fix #30710

7 months agoRename migration package name for 1.22-rc1 (#30730)
wxiaoguang [Sat, 27 Apr 2024 14:02:07 +0000 (22:02 +0800)]
Rename migration package name for 1.22-rc1 (#30730)

Ref: Propose to restart 1.22 release #30501

7 months agoIssue card improvements (#30687)
silverwind [Sat, 27 Apr 2024 13:35:26 +0000 (15:35 +0200)]
Issue card improvements (#30687)

Fixes https://github.com/go-gitea/gitea/issues/30682 and does a few
improvements:

- Use gap instead of margin/padding
- Don't render empty image div
- Remove `right floated` class that did nothing

<img width="406" alt="Screenshot 2024-04-24 at 20 21 20"
src="https://github.com/go-gitea/gitea/assets/115237/2fa88707-c2c4-40df-aee7-a684c3097ed0">

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
7 months agoDon't show loading indicators when refreshing the system status (#30712)
Yarden Shoham [Sat, 27 Apr 2024 13:05:06 +0000 (16:05 +0300)]
Don't show loading indicators when refreshing the system status (#30712)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
7 months agoAdd some tests to clarify the "must-change-password" behavior (#30693)
wxiaoguang [Sat, 27 Apr 2024 12:23:37 +0000 (20:23 +0800)]
Add some tests to clarify the "must-change-password" behavior (#30693)

Follow  #30472:

When a user is created by command line `./gitea admin user create`:

Old behavior before #30472: the first user (admin or non-admin) doesn't
need to change password.

Revert to the old behavior before #30472

7 months agoPrevent allow/reject reviews on merged/closed PRs (#30686)
Kemal Zebari [Sat, 27 Apr 2024 11:55:03 +0000 (04:55 -0700)]
Prevent allow/reject reviews on merged/closed PRs (#30686)

Resolves #30675.

7 months agoUpdate JS dependencies (#30713)
silverwind [Sat, 27 Apr 2024 11:28:28 +0000 (13:28 +0200)]
Update JS dependencies (#30713)

- Update all JS dependencies
- Remove
[now-unnecessary](https://github.com/microsoft/monaco-editor/issues/4325)
monaco workaround
- Update stylelint config for new rule
- Tested Monaco, Swagger UI, Mermaid

7 months agoImprove diff stats bar (#30669)
silverwind [Sat, 27 Apr 2024 11:22:55 +0000 (13:22 +0200)]
Improve diff stats bar (#30669)

Minor tweaks:

- Remove unnecessary `item` class which was causing unwanted padding to
be added.
- Add some padding and prevent wrapping so it looks better on mobile.
- Increase width by 4px.

<img width="116" alt="Screenshot 2024-04-24 at 00 15 07"
src="https://github.com/go-gitea/gitea/assets/115237/1f1cf54c-8053-4297-b309-71d9c2ceb9ee">
<img width="441" alt="Screenshot 2024-04-24 at 00 14 57"
src="https://github.com/go-gitea/gitea/assets/115237/2f3a33dc-edad-4b97-b64c-6812aae513cb">

7 months agoRemove unused parameter for some functions in `services/mirror` (#30724)
Chongyi Zheng [Sat, 27 Apr 2024 10:44:49 +0000 (06:44 -0400)]
Remove unused parameter for some functions in `services/mirror` (#30724)

Suggested by gopls `unusedparams`

7 months agoUpdate misspell to 0.5.1 and add `misspellings.csv` (#30573)
silverwind [Sat, 27 Apr 2024 08:03:49 +0000 (10:03 +0200)]
Update misspell to 0.5.1 and add `misspellings.csv` (#30573)

Misspell 0.5.0 supports passing a csv file to extend the list of
misspellings, so I added some common ones from the codebase. There is at
least one typo in a API response so we need to decided whether to revert
that and then likely remove the dict entry.

7 months agoSuppress browserslist warning in webpack target (#30571)
silverwind [Sat, 27 Apr 2024 07:21:07 +0000 (09:21 +0200)]
Suppress browserslist warning in webpack target (#30571)

1. Set
[`BROWSERSLIST_IGNORE_OLD_DATA`](https://github.com/browserslist/browserslist/blob/c6ddf7b3870a4585822d06ec77e8dd2401b8e1ed/node.js#L400)
to avoid warning on outdated browserslist data which the end user can
likely not do anything about and which is currently visible in the v1.21
branch.
2. Suppress all command echoing and add a "Running webpack..." message
in place.

Warning in question was this:

```
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
```

7 months ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 27 Apr 2024 00:24:31 +0000 (00:24 +0000)]
[skip ci] Updated translations via Crowdin

7 months agoDiff color enhancements, add line number background (#30670)
silverwind [Fri, 26 Apr 2024 19:37:21 +0000 (21:37 +0200)]
Diff color enhancements, add line number background (#30670)

1. Bring back the background on line numbers. This feature was lost a
long time ago.

<img width="457" alt="Screenshot 2024-04-24 at 01 36 09"
src="https://github.com/go-gitea/gitea/assets/115237/76a7f5a9-c22a-4c72-9f0a-ebf16a66513e">
<img width="473" alt="Screenshot 2024-04-24 at 01 22 47"
src="https://github.com/go-gitea/gitea/assets/115237/eef06cf2-f1b9-40e3-947d-dd5852ec12a3">
<img width="457" alt="Screenshot 2024-04-24 at 02 13 18"
src="https://github.com/go-gitea/gitea/assets/115237/59e317d4-76a7-468c-8a19-10d88c675cc3">
<img width="459" alt="Screenshot 2024-04-24 at 01 23 21"
src="https://github.com/go-gitea/gitea/assets/115237/f1a46f8d-8846-4d78-a9d7-8b7dc18ac6e4">

2. Expanded lines background is now full-line, including line numbers:

<img width="1303" alt="Screenshot 2024-04-24 at 01 37 12"
src="https://github.com/go-gitea/gitea/assets/115237/271eefe2-0869-424e-93fb-ccd8adc87806">

3. Sort affected colors alphabetically in the CSS

Fixes #14603

7 months agofeat(api): enhance Actions Secrets Management API for repository (#30656)
Bo-Yi Wu [Fri, 26 Apr 2024 13:11:49 +0000 (21:11 +0800)]
feat(api): enhance Actions Secrets Management API for repository (#30656)

- Add endpoint to list repository action secrets in API routes
- Implement `ListActionsSecrets` function to retrieve action secrets
from the database
- Update Swagger documentation to include the new
`/repos/{owner}/{repo}/actions/secrets` endpoint
- Add `actions` package import and define new routes for actions,
secrets, variables, and runners in `api.go`.
- Refactor action-related API functions into `Action` struct methods in
`org/action.go` and `repo/action.go`.
- Remove `actionAPI` struct and related functions, replacing them with
`NewAction()` calls.
- Rename `variables.go` to `action.go` in `org` directory.
- Delete `runners.go` and `secrets.go` in both `org` and `repo`
directories, consolidating their content into `action.go`.
- Update copyright year and add new imports in `org/action.go`.
- Implement `API` interface in `services/actions/interface.go` for
action-related methods.
- Remove individual action-related functions and replace them with
methods on the `Action` struct in `repo/action.go`.

---------

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Signed-off-by: appleboy <appleboy.tw@gmail.com>
7 months agoFix code search input for different views (#30678)
wxiaoguang [Fri, 26 Apr 2024 11:21:04 +0000 (19:21 +0800)]
Fix code search input for different views (#30678)

Now only show the "code search" on the repo home page, because it only
does global search.
So do not show it when viewing file or directory to avoid misleading
users (it doesn't search in a directory)

7 months agoFix incorrect object id hash function (#30708)
wxiaoguang [Fri, 26 Apr 2024 09:49:48 +0000 (17:49 +0800)]
Fix incorrect object id hash function (#30708)

Great thanks to @oliverpool for figuring out the problem and proposing a
fix.

Regression of #28138

Incorrect hash causes the user's LFS files get all deleted when running
`doctor fix all`

(by the way, remove unused/non-standard comments)

Co-authored-by: Giteabot <teabot@gitea.io>
7 months agoAdd route handler info for debugging purpose (#30705)
wxiaoguang [Fri, 26 Apr 2024 09:09:49 +0000 (17:09 +0800)]
Add route handler info for debugging purpose (#30705)

Follow #30519

7 months agoBump htmx version to 1.9.12 (#30711)
Yarden Shoham [Fri, 26 Apr 2024 07:27:34 +0000 (10:27 +0300)]
Bump htmx version to 1.9.12 (#30711)

There are no breaking changes. I tested and everything works as before.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
7 months agoDeduplicate lfs common code (#30704)
wxiaoguang [Fri, 26 Apr 2024 02:53:30 +0000 (10:53 +0800)]
Deduplicate lfs common code (#30704)