0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-11 08:44:40 +01:00

19978 Commits

Author SHA1 Message Date
Dimitri John Ledkov
24e5d2c2bb
pnpm-lock: upgrade deps to address vulnerabilities
There are a few vulnerabilities reported with:

```
npx pnpm audit
...
6 vulnerabilities found
Severity: 2 moderate | 3 high | 1 critical
```

Fix them by upgrading.
2025-12-07 17:23:44 +00:00
Giteabot
b1b35e934e
Fix the bug when ssh clone with redirect user or repository (#36039) (#36090)
Backport #36039 by @lunny

Fix #36026 

The redirect should be checked when original user/repo doesn't exist.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-12-04 20:06:14 -08:00
Giteabot
544450a212
fix some file icon ui (#36078) (#36088)
Backport #36078 by @a1012112796

fix #36071

looks that's because if an svg in hiden env, it's color added by
`fill="url(#a)"` will become not usefull. by ai helping, I think moving
it out of page by position is a good solution. fell free creat a new
pull request if you have a better soluton. Thanks.
<img width="2198" height="1120" alt="image"
src="https://github.com/user-attachments/assets/bbf7c171-0b7f-412a-a1bc-aea3f1629636"
/>

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-04 19:39:35 +00:00
Giteabot
0ab447005d
Use Golang net/smtp instead of gomail's smtp to send email (#36055) (#36083)
Backport #36055 by @lunny

Replace #36032
Fix #36030

This PR use `net/smtp` instead of gomail's smtp. Now
github.com/wneessen/go-mail will be used only for generating email
message body.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-12-04 18:58:01 +00:00
Giteabot
52902d4ece
Fix edit user email bug in API (#36068) (#36081)
Backport #36068 by @lunny

Follow #36058 for API edit user bug when editing email.

- The Admin Edit User API includes a breaking change. Previously, when
updating a user with an email from an unallowed domain, the request
would succeed but return a warning in the response headers. Now, the
request will fail and return an error in the response body instead.
- Removed `AdminAddOrSetPrimaryEmailAddress` because it will not be used
any where.

Fix https://github.com/go-gitea/gitea/pull/36058#issuecomment-3600005186

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-12-04 18:25:52 +00:00
silverwind
0e91c8a068
Bump toolchain to go1.25.5, misc fixes (#36082)
Backport toolchain change into 1.25. This is needed because of the
govulncheck issue
[present](https://github.com/go-gitea/gitea/actions/runs/19921920886/job/57112316941)
in the branch.

---------

Signed-off-by: silverwind <me@silverwind.io>
2025-12-04 17:57:59 +00:00
Giteabot
45cdc5d8fd
Fix bug when updating user email (#36058) (#36066)
Backport #36058 by @lunny

Fix #20390 

We should use `ReplacePrimaryEmailAddress` instead of
`AdminAddOrSetPrimaryEmailAddress` when modify user's email from admin
panel. And also we need a database transaction to keep deletion and
insertion succeed at the same time.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-12-02 02:57:21 +01:00
Zettat123
b276849cd8
Fix Actions pull_request.paths being triggered incorrectly by rebase (#36045) (#36054)
Backport #36045

Partially fix #34710

The bug described in #34710 can be divided into two parts: `push.paths`
and `pull_request.paths`. This PR fixes the issue related to
`pull_request.paths`. The root cause is that the check for whether the
workflow can be triggered happens **before** updating the PR’s merge
base. This causes the file-change detection to use the old merge base.
Therefore, we need to update the merge base first and then check whether
the workflow can be triggered.
2025-11-29 05:45:30 +00:00
Giteabot
46d1d154e8
Fix error handling in mailer and wiki services (#36041) (#36053)
Backport #36041 by @hamkido

- Updated error message in `incoming.go` to remove unnecessary wrapping
of the error.
- Corrected typo in error message in `wiki.go` for clarity.

Co-authored-by: hamkido <hamki.do2000@gmail.com>
2025-11-28 20:34:38 -08:00
Giteabot
f164e38e04
Fix incorrect viewed files counter if file has changed (#36009) (#36047)
Backport #36009 by @bytedream

File changes since last review didn't decrease the viewed files counter

---
<img width="440" height="178" alt="image"
src="https://github.com/user-attachments/assets/da34fcf4-452f-4f71-8da2-97edbfc31fdd"
/>

Also reported here ->
https://github.com/go-gitea/gitea/issues/35803#issuecomment-3567850285

Co-authored-by: bytedream <me@bytedream.dev>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-11-28 11:33:37 +01:00
Giteabot
d4d338f1c1
Fix container registry error handling (#36021) (#36037)
Backport #36021 by wxiaoguang

1. the `if` check in `handleCreateManifestResult` didn't handler err
correctly
2. add more error details for debugging

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-26 08:01:35 -08:00
Giteabot
f6895f632e
Add "site admin" back to profile menu (#36010) (#36013)
Backport #36010 by @wxiaoguang

Fix #35904

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-23 14:07:44 -08:00
Lunny Xiao
eaa916a786
release notes for 1.25.2 (#35986)
~Wait #35988~

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
v1.25.2
2025-11-22 11:05:00 -08:00
Lunny Xiao
91901c2a60
Allow empty commit when merging pull request with squash style (#35989) (#36003) 2025-11-22 09:17:28 -08:00
Lunny Xiao
20cf4b7849
Fix various permission & login related bugs (#36002) (#36004)
Backport #36002 

Permission & protection check:

- Fix Delete Release permission check
- Fix Update Pull Request with rebase branch protection check
- Fix Issue Dependency permission check
- Fix Delete Comment History ID check

Information leaking:

- Show unified message for non-existing user and invalid password
    - Fix #35984
- Don't expose release draft to non-writer users.
- Make API returns signature's email address instead of the user
profile's.

Auth & Login:

- Avoid GCM OAuth2 attempt when OAuth2 is disabled
    - Fix #35510

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-22 12:33:48 +00:00
Lunny Xiao
5e7207d428
upgrade golang.org/x/crypto to 0.45.0 (#35988) 2025-11-20 17:25:35 -05:00
Giteabot
e3bfee80dd
Change project default column icon to 'star' (#35967) (#35979)
Backport #35967 by @DrMaxNix

Consistently use a `star` icon to highlight the default column of a
project.
The icon is both shown while viewing the project, as well as while
changing the default status of this column.

<img width="1065" height="370" alt="image"
src="https://github.com/user-attachments/assets/1ca5773d-8eec-4b90-ad0b-22b1f4bd4cfd"
/>

Co-authored-by: DrMaxNix <git@drmaxnix.de>
2025-11-19 10:43:48 +01:00
Giteabot
f93e2cf301
Misc CSS fixes (#35888) (#35981)
Backport #35888 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/35913
Fixes: https://github.com/go-gitea/gitea/issues/35942

Contains a number of minor CSS fixes.

Fix missing border on targeted speech bubble
<img width="158" height="90" alt="Screenshot 2025-11-06 at 22 43 31"
src="https://github.com/user-attachments/assets/94696191-353a-4782-a998-2a3d5552ab71"
/>

Add padding to inline comments, slightly more padding around emoji
button
<img width="823" height="301" alt="Screenshot 2025-11-06 at 22 38 39"
src="https://github.com/user-attachments/assets/3ed8f113-13d2-4fad-9d12-81a670540e0b"
/>

Center text on header in code search results
<img width="1328" height="295" alt="Screenshot 2025-11-06 at 22 08 01"
src="https://github.com/user-attachments/assets/41e3d279-8504-4435-9347-e9b969cdfaa2"
/>

Tweak emoji selector, reducing font size primarily
<img width="251" height="219" alt="Screenshot 2025-11-06 at 22 29 46"
src="https://github.com/user-attachments/assets/e892646e-129f-44fd-8333-7a8e14863f03"
/>

Minor tweaks to repo sidebar, reduce font size by 1px, center "Release"
text with label.
<img width="390" height="586" alt="image"
src="https://github.com/user-attachments/assets/397dc36b-11e6-42df-bcdf-e97f4280a90e"
/>

Fix issue comment buttons being misaligned on mobile
<img width="757" height="160" alt="Screenshot 2025-11-06 at 22 50 19"
src="https://github.com/user-attachments/assets/1609d104-1bfe-4913-bfa0-6f4739716d61"
/>

Add highlight to actions re-run icon
<img width="116" height="106" alt="Screenshot 2025-11-06 at 23 04 30"
src="https://github.com/user-attachments/assets/0daed0ac-ef59-432a-b534-b4256d38393b"
/>

Fix actions re-run button overflow
<img width="214" height="125" alt="image"
src="https://github.com/user-attachments/assets/d5c79ce6-ad31-4c06-a411-d79eefb72d02"
/>

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-19 08:16:54 +01:00
Giteabot
1b01d6de82
Fix container push tag overwriting (#35936) (#35954)
Backport #35936 by wxiaoguang

Fix #35853

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-14 12:22:23 +08:00
Giteabot
d67cd622d0
Fix corrupted external render content (#35946) (#35950)
Backport #35946 by wxiaoguang

Fix #35944

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-14 02:15:36 +00:00
Giteabot
15f3e9d5a5
Don't show unnecessary error message to end users for DeleteBranchAfterMerge (#35937) (#35941)
Backport #35937 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-12 23:31:05 +00:00
Giteabot
01fa8b2b7e
Limit read bytes instead of ReadAll (#35928) (#35934)
Backport #35928 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-13 02:26:27 +08:00
Giteabot
1d9ae7ac23
Load jQuery as early as possible to support custom scripts (#35926) (#35929)
Backport #35926 by wxiaoguang

Fix #35923

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-12 07:24:21 +08:00
Giteabot
01873a99c1
Allow to display embed images/pdfs when SERVE_DIRECT was enabled on MinIO storage (#35882) (#35917)
Backport #35882 by lifegpc

Co-authored-by: lifegpc <g1710431395@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-11 02:24:06 +00:00
Giteabot
ce70863793
Use correct form field for allowed force push users in branch protection API (#35894) (#35908)
Backport #35894 by zorrobiwan

Signed-off-by: Alberty Pascal <github@albertyorban.be>
Co-authored-by: Alberty Pascal <github@albertyorban.be>
2025-11-11 01:39:35 +00:00
Giteabot
327f2207dc
Make OAuth2 issuer configurable (#35915) (#35916)
Backport #35915 by wxiaoguang
2025-11-10 16:12:25 +00:00
Giteabot
db876d8f17
Fix #35763: Add proper page title for project pages (#35773) (#35909)
Backport #35773 by @mithileshgupta12

Co-authored-by: Mithilesh Gupta <mithileshgupta059@gmail.com>
Co-authored-by: Mithilesh Gupta <guptamithilesh@protonmail.com>
2025-11-10 09:42:14 +02:00
Giteabot
2b71bf283b
Display source code downloads last for release attachments (#35897) (#35903)
Backport #35897 by lutinglt

Typically, you want to download the binaries, not the source code.

Co-authored-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-11-09 14:51:36 +08:00
Giteabot
1ca4fef611
Fix team member access check (#35899) (#35905)
Backport #35899 by wxiaoguang

Fix #35499

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-09 03:44:53 +00:00
Giteabot
70ee6b9029
Fix conda null depend issue (#35900) (#35902)
Backport #35900 by Luohaothu

This fixes issue #35895

Co-authored-by: Luohao Wang <luohaothu@live.com>
2025-11-08 16:37:00 +00:00
wxiaoguang
e5b404ec53
Fix avatar upload error handling (#35887) (#35890)
Backport #35887
2025-11-07 11:25:34 +08:00
Giteabot
5842cd23a6
Contribution heatmap improvements (#35876) (#35880)
Backport #35876 by @silverwind

1. Set a fixed height on the element, preventing the content after the
element from shifting on page load. This uses CSS [container query
length
units](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries#container_query_length_units)
as I saw no other way because of the non-linear scaling of the element.
2. Move the "total-contributions" text into the existing vue slot,
eliminating the need for absolute positioning.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-06 08:51:49 +00:00
Giteabot
289bd9694b
Remove padding override on .ui .sha.label (#35864) (#35873)
Backport #35864 by @silverwind

Since upgrading to v1.25, I noticed the SHA labels have slightly
different padding than before. I can't pinpoint exactly which change it
was. Fix it by removing the padding override on `.ui .sha.label` and
make the one on`.ui.label` (`2px 6px`) take effect which matches 1.24
rendering.

Before:

<img width="135" height="172" alt="image"
src="https://github.com/user-attachments/assets/2781a854-be08-4a11-bde0-d3699b2b7454"
/>

After:

<img width="139" height="162" alt="image"
src="https://github.com/user-attachments/assets/5c864fa3-c1f9-4452-ae58-5411dd445865"
/>

Co-authored-by: silverwind <me@silverwind.io>
2025-11-06 06:06:36 +00:00
Giteabot
154d7521a5
fix(api/repo/contents): set the dates to now when not specified by the caller (#35861) (#35874)
Backport #35861 by @divyun

Since 1.25.0, the dates get set to `2001-01-01T00:00:00Z`, when not
specified by the caller.

Fixes #35860

Co-authored-by: Divyun Raje Vaid <mail@divyun.com>
2025-11-06 13:08:06 +08:00
Giteabot
24189dcced
Fix pull description code label background (#35865) (#35870)
Backport #35865 by @silverwind

Fix visual regression from https://github.com/go-gitea/gitea/pull/35567:

Before:

<img width="612" height="33" alt="image"
src="https://github.com/user-attachments/assets/aee4017c-b8b9-4ac2-9809-9d3eb3fda56c"
/>

After:

<img width="613" height="32" alt="image"
src="https://github.com/user-attachments/assets/ee6624da-b417-4e3b-8773-88c77c2cd672"
/>

Co-authored-by: silverwind <me@silverwind.io>
2025-11-05 17:29:06 +00:00
wxiaoguang
f84bf259ad
Fix gogit ListEntriesRecursiveWithSize (#35862)
It needs to use full git path. Fix #35852.
2025-11-05 19:19:47 +02:00
Lunny Xiao
470b21056a
Add changelog for 1.25.1 and add missing chagnelog for 1.24.x (#35838) v1.25.1 2025-11-04 11:17:59 -08:00
Zettat123
61011f1648
Add a doctor command to fix inconsistent run status (#35840) (#35845)
Backport #35840

#35783 fixes an actions rerun bug. Due to this bug, some runs may be
incorrectly marked as `StatusWaiting` even though all the jobs are in
done status. These runs cannot be run or cancelled. This PR adds a new
doctor command to fix the inconsistent run status.

```
gitea doctor check --run fix-actions-unfinished-run-status --fix
```
2025-11-04 11:16:36 -08:00
Giteabot
7ea9722c1d
Make ACME email optional (#35849) (#35857)
Backport #35849 by @wxiaoguang

Fix a regression from #33668

Fix #35847

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-04 10:22:26 -08:00
Giteabot
297f63af42
Remove wrong code (#35846) (#35856)
Backport #35846 by @lunny

Follow #35821
Fix https://github.com/go-gitea/gitea/pull/35844#issuecomment-3483521045

The reviewed file numbers and progress have been set from backend so
that we don't need to update the numbers when clicking `load more`.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-11-04 20:04:08 +02:00
Lunny Xiao
6a55749359
Fix incorrect pull request counter (#35819) (#35841)
Fix #35781, #27472
Backport #35819 

The PR will not correct the wrong numbers automatically.

There is a cron task `check_repo_stats` which will be run when Gitea
start or midnight. It will correct the numbers.
2025-11-04 01:49:47 +00:00
Lunny Xiao
8116742e2d
Fix viewed files number is not right if not all files loaded (#35821) (#35844)
Fix #35803
Backport #35821

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
2025-11-03 17:19:50 -08:00
Giteabot
0a9cbf3228
upgrade go mail to 0.7.2 and fix the bug (#35833) (#35837)
Backport #35833 by @lunny

patch from
https://github.com/wneessen/go-mail/issues/504#issuecomment-3477890515.
Thanks to @wneessen

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-11-03 20:28:12 +00:00
Giteabot
74dfadb543
Fix circular spin animation direction (#35785) (#35823)
Backport #35785 by @lutinglt

Wait for the status icon to rotate clockwise instead of counterclockwise

before:
![GIF 2025-10-30
10-50-07](https://github.com/user-attachments/assets/3771b0bf-44e4-45a0-bde5-1b2b3dd8ba2a)

after:
![GIF 2025-10-30
10-50-43](https://github.com/user-attachments/assets/c45307fe-39a4-4e60-b48e-9d922c407565)

This can be merged to 1.25

Signed-off-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-03 09:37:01 +00:00
Giteabot
8ffc1fbfbf
Revert gomail to v0.7.0 to fix sending mail failed (#35816) (#35824)
Backport #35816 by @lunny

Revert gomail to the last work version to fix #35794

There is a problem between go mail v0.7.1 to prevent sending email work.
https://github.com/wneessen/go-mail/compare/v0.7.0...v0.7.1

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-11-03 09:08:13 +00:00
Giteabot
e95378329b
Fix clone mixed bug (#35810) (#35822) 2025-11-02 10:20:27 -08:00
Giteabot
fddf6cd63f
Fix cli "Before" handling (#35797) (#35808)
Backport #35797 by @wxiaoguang

Regression of #34973

Fix #35796

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-31 22:00:14 +01:00
Giteabot
d253e2055b
Fix file extension on gogs.png (#35793) (#35799)
Backport #35793 by @silverwind

During https://github.com/go-gitea/gitea/issues/35790, it was noticed
that this PNG image had the wrong file extension. I also verified
`dingtalk.ico` and that one is actually an `.ico`.

Co-authored-by: silverwind <me@silverwind.io>
2025-10-31 03:33:27 +01:00
Giteabot
e194d89c74
Improve and fix markup code preview rendering (#35777) (#35787)
Backport #35777 by @silverwind

1. Add the color on the link to the referenced file, which is the more
likely thing the user wants to click
2. Use monospace font on the SHA
3. Tweak text colors
4. Change SHA link to go to the commit instead of the repo root with
commit filter set
5. Added the repo name to the file link text
6. Fix broken line numbering rendering

The only major difference to GitHub is now the missing line numbers.

Before:

<img width="286" height="162" alt="Screenshot 2025-10-29 at 19 09 59"
src="https://github.com/user-attachments/assets/f16b4eec-caf2-4c31-a2b5-ae5f41747d4b"
/>

After:

<img width="378" height="157" alt="image"
src="https://github.com/user-attachments/assets/0c91dfd3-0910-4b2d-a43b-8c87cfbb933e"
/>

For comparison, GitHub rendering:

<img width="286" height="177" alt="image"
src="https://github.com/user-attachments/assets/8a9a07b7-9153-4415-9d7a-5685853e472a"
/>

Co-authored-by: silverwind <me@silverwind.io>
2025-10-30 09:06:44 +00:00
Zettat123
04b6f90889
Fix actions rerun bug (#35783) (#35784)
Backport #35783

Fix #35780, fix #35782 

Rerunning a job or a run is only allowed when the job is done and the
run is done.

Related PR: #34970


98ff7d0773/routers/web/repo/actions/view.go (L239)

We don't need to check run status again in `rerunJob` because the run
status has been changed before `rerunJob`.

---

In fact, the bug described in the above issues will not occur on the
main branch. Because `getRunJobs` is called before updating the run.


98ff7d0773/routers/web/repo/actions/view.go (L425-L435)

So the run status that `rerunJob` checks is the old status.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-30 09:31:42 +01:00