0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-08 12:47:32 -05:00
Commit Graph

19997 Commits

Author SHA1 Message Date
techknowlogick
aa7ec64a54 ignore .worktrees as a "special folder" (#35835)
following the approach from nixpkgs that ignore the .worktrees folder,
we could also do the same, this would allow worktrees to be worked on in
the same folder as the primary branch.

ref:
b6420c7bca
2025-11-03 20:57:30 +01:00
Lunny Xiao
17a6a2bab1 upgrade go mail to 0.7.2 and fix the bug (#35833)
patch from
https://github.com/wneessen/go-mail/issues/504#issuecomment-3477890515.
Thanks to @wneessen
2025-11-03 11:32:45 -08:00
TheFox0x7
685c8c314f Add cache to container build (#35697)
add mount cache directives to container builds, which speeds up local
builds bypassing node and go package download entirely on second build
and caching go compilation.
drop job level split on regular/rootless, which allows to reuse the
previously made stage for rootless, skipping duplicate builds in CI.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-11-02 09:42:25 +00:00
Lunny Xiao
5cb453c01b Revert gomail to v0.7.0 to fix sending mail failed (#35816)
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
2025-11-02 09:07:32 +00:00
鲁汀
f2d7931b70 Fix circular spin animation direction (#35785)
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)

---------

Signed-off-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-02 08:30:13 +00:00
Lunny Xiao
b3e5b96111 Fix clone mixed bug (#35810)
Fix #35807
2025-11-02 00:52:59 -07:00
GiteaBot
1dac4d13f3 [skip ci] Updated translations via Crowdin 2025-11-02 00:39:27 +00:00
Lunny Xiao
b148bef471 Remove unnecessary function parameter (#35765) 2025-10-31 21:56:08 -07:00
wxiaoguang
de70cd3853 Fix cli "Before" handling (#35797)
Regression of #34973

Fix #35796
2025-10-31 18:12:03 +00:00
Mithilesh Gupta
ef90befef1 Add test for ExtendCommentTreePathLength migration and fix bugs (#35791)
Co-authored-by: Mithilesh Gupta <guptamithilesh@protonmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-31 08:49:26 +08:00
silverwind
c3472dd395 Fix file extension on gogs.png (#35793)
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`.
2025-10-30 18:25:53 +01:00
silverwind
8b290b87e9 Improve and fix markup code preview rendering (#35777)
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
2025-10-30 05:15:42 +00:00
Zettat123
3ab8ae5807 Fix actions rerun bug (#35783)
Related issues: #35780, #35782 

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

Related PR: #34970
2025-10-30 01:08:59 +00:00
GiteaBot
73e229eb42 [skip ci] Updated translations via Crowdin 2025-10-30 00:37:08 +00:00
techknowlogick
98ff7d0773 add pnpm to Snapcraft (#35778) 2025-10-29 19:34:40 +01:00
Zettat123
8aa1179ce4 Fix actions schedule update issue (#35767)
Fix #34472

Add integration tests for actions schedule update.
2025-10-29 16:04:40 +00:00
bytedream
39c08ce4c1 Update tab title when navigating file tree (#35757)
Fix #35749.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-10-29 13:38:09 +00:00
silverwind
fe25997157 Enable vue/require-typed-ref eslint rule (#35764)
Enable https://eslint.vuejs.org/rules/require-typed-ref 
and fix discovered issues.
2025-10-29 17:42:06 +08:00
Lunny Xiao
95b18eb781 Remove unnecessary code and fix comments (#35761)
Follow #35459, #32562

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-28 18:03:57 +00:00
silverwind
d69eede59b Update JS dependencies (#35759)
- Update all JS dependencies
- Added new unicorn rules
- `updates` now also supports updating `packageManager` and `engines`,
and I see no reason not to do that, so I think we can try keeping these
updated as well. If something in the build breaks because of this, I
will revert and exclude `pnpm` from updating further, but as far as I
understand, only corepack respects this field and pnpm itself does not
care about it.
- Regenerate SVGs.
2025-10-28 17:32:11 +00:00
silverwind
91839ca01a Move codeformat folder to tools (#35758)
Followup to https://github.com/go-gitea/gitea/pull/35734.

- Move `codeformat` folder to `tools`
- Add `tools` to `GO_DIRS`
- Move `misspellings.csv` to `assets` so we can lint the whole `tools`
directory without filter shenanigans.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-28 11:23:50 +00:00
wxiaoguang
6b5563c54a Support selecting theme on the footer (#35741)
Fixes: https://github.com/go-gitea/gitea/pull/27576
2025-10-28 18:25:00 +08:00
wxiaoguang
cddff73bbd Fix "ref-issue" handling in markup (#35739)
This is a follow up for #35662, and also fix #31181, help #30275, fix #31161
2025-10-27 22:45:07 +08:00
GiteaBot
87d670c96b [skip ci] Updated translations via Crowdin 2025-10-27 00:39:11 +00:00
wxiaoguang
2f309b844c Revert #18491, fix oauth2 client link account (#35745)
Fix #35744 by reverting #18491

* "OpenID" options don't mean "OAuth2Client" options
* "OAuth2(server)" options don't mean "OAuth2Client" options
2025-10-26 21:26:38 +00:00
Lunny Xiao
bc50431e8b Upgrade go mail to 0.7.2 (#35748) 2025-10-26 09:52:01 -04:00
GiteaBot
2a6af15448 [skip ci] Updated translations via Crowdin 2025-10-26 00:38:59 +00:00
Zettat123
c9beb0b01f Support actions and reusable workflows from private repos (#32562)
Resolve https://gitea.com/gitea/act_runner/issues/102

This PR allows administrators of a private repository to specify some
collaborative owners. The repositories of collaborative owners will be
allowed to access this repository's actions and workflows.

Settings for private repos:


![image](https://github.com/user-attachments/assets/e591c877-f94d-48fb-82f3-3b051f21557e)

---

This PR also moves "Enable Actions" setting to `Actions > General` page

<img width="960" alt="image"
src="https://github.com/user-attachments/assets/49337ec2-afb1-4a67-8516-5c9ef0ce05d4"
/>

<img width="960" alt="image"
src="https://github.com/user-attachments/assets/f58ee6d5-17f9-4180-8760-a78e859f1c37"
/>

---------

Signed-off-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2025-10-25 17:37:33 +00:00
Lunny Xiao
5454fdacd4 Use git model to detect whether branch exist instead of gitrepo method (#35459) 2025-10-25 10:08:25 -07:00
Lunny Xiao
304d836a61 Fix shutdown waitgroup panic (#35676)
This PR fixes a panic issue in the WaitGroup that occurs when Gitea is
shut down using Ctrl+C.
It ensures that all active connection pointers in the server are
properly tracked and forcibly closed when the hammer shutdown is
invoked.
The process remains graceful — the normal shutdown sequence runs before
the hammer is triggered, and existing connections are given a timeout
period to complete gracefully.

This PR also fixes `no logger writer` problem. Now the log close will
only be invoked when the command exit.

- Fixes #35468
- Fixes #35551
- Fixes #35559
- Replace #35578

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-25 00:02:58 -07:00
wxiaoguang
cb72c901b3 Intorduce "config edit-ini" sub command to help maintaining INI config file (#35735)
Ref: #32669. Helps addressing
https://gitea.com/gitea/helm-chart/issues/356.
2025-10-25 10:54:55 +08:00
Zettat123
0d740a6a72 Improve online runner check (#35722)
This PR moves "no online runner" warning to the runs list. 

A job's `runs-on` may contain expressions like `runs-on: [self-hosted,
"${{ inputs.chosen-os }}"]` so the value of `runs-on` may be different
in each run. We cannot check it through the workflow file.

<details>
  <summary>Screenshots</summary>

Before:

<img width="960" alt="3d2a91746271d8b1f12c8f7d20eba550"
src="https://github.com/user-attachments/assets/7a972c50-db97-49d2-b12b-c1a439732a11"
/>

After:

<img width="960" alt="image"
src="https://github.com/user-attachments/assets/fc076e0e-bd08-4afe-99b9-c0eb0fd2c7e7"
/>
</details>

This PR also splits `prepareWorkflowDispatchTemplate` function into 2
functions:
- `prepareWorkflowTemplate` get and check all of the workflows
- `prepareWorkflowDispatchTemplate` only prepare workflow dispatch
config for `workflow_dispatch` workflows.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-24 12:02:52 -07:00
wxiaoguang
9a73a1fb83 Make "update file" API can create a new file when SHA is not set (#35738)
Fix #19008, use GitHub's behavior (empty SHA to create a new file)
2025-10-24 12:46:54 +08:00
Lunny Xiao
397d666432 Fix review request webhook bug (#35339) (#35723)
Frontport #35339
Fix #35327
2025-10-23 20:08:21 -07:00
silverwind
e03a68c48b Misc tool tweaks (#35734)
Some minor tooling tweaks:

- Ignore .venv in golangci-lint
- Move go tools to tools directory (e.g. everything that is not "build")
- Enable reportUnusedInlineConfigs in eslint, no current violations
- Apply modernize fix in code-batch-process, modernize cli did
apparently not catch it because of the `go:build ignore` tag.
2025-10-23 09:07:39 +00:00
silverwind
cab35ff17a Update dependencies (#35733)
- Update all JS, Python and Makefile dependencies
- Fixed two new go lint issues
- Tested the affected JS dependencies.
2025-10-23 08:35:48 +00:00
wxiaoguang
522c466e24 Make external iframe render work (#35730)
Fix #35729, #17635, #21098
2025-10-23 08:01:38 +00:00
silverwind
8085c75356 Remove mermaid margin workaround (#35732)
https://github.com/mermaid-js/mermaid/issues/4907 was fixed with mermaid
v11, so we no longer need to ship this workaround. The test case works
as expected:

<img width="244" height="58" alt="image"
src="https://github.com/user-attachments/assets/439616e9-4883-47fb-bf18-21ca86cb5da6"
/>
2025-10-23 06:43:52 +02:00
wxiaoguang
195fc715ff Fix external render (#35727)
Fix #35725

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-22 23:41:38 +00:00
ChristopherHX
08b9776970 Refactor Actions Token Access (#35688)
* use a single function to do Action Tokens Permission checks
* allows easier customization
* add basic tests
* lfs file locks should work now

---------

Signed-off-by: ChristopherHX <christopher.homberger@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-22 11:12:31 +00:00
Kemal Zebari
a9f2ea720b Honor delete branch on merge repo setting when using merge API (#35488)
Fix #35463.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-22 05:06:56 +00:00
wxiaoguang
5f0697243c Don't block site admin's operation if SECRET_KEY is lost (#35721)
Related: #24573
2025-10-22 12:35:56 +08:00
GiteaBot
c28aab6714 [skip ci] Updated translations via Crowdin 2025-10-22 00:36:55 +00:00
a1012112796
a4e23b81d3 fix attachment file size limit in server backend (#35519)
fix #35512

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-21 15:07:11 +00:00
wxiaoguang
3917d27467 Make restricted users can access public repositories (#35693)
Fix #35690

Change the "restricted user" behavior introduced by #6274. Now
restricted user can also access public repositories when sign-in is not
required.

For required sign-in, the behavior isn't changed.
2025-10-21 15:30:24 +08:00
wxiaoguang
a2eea2fb2e Fix various trivial problems (#35714) 2025-10-21 13:19:29 +08:00
wxiaoguang
b2ee5be52e Refactor legacy code (#35708)
And by the way, remove the legacy TODO, split large functions into small
ones, and add more tests
2025-10-20 11:43:08 -07:00
Zettat123
897e48dde3 Add quick approve button on PR page (#35678)
This PR adds a quick approve button on PR page to allow reviewers to
approve all pending checks. Only users with write permission to the 
Actions unit can approve.

---------

Signed-off-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-20 18:46:37 +08:00
wxiaoguang
66ee8f3553 Avoid emoji mismatch and allow to only enable chosen emojis (#35692)
Fix #23635
2025-10-19 13:06:45 -07:00
Bryan Mutai
c30d74d0f9 feat(diff): Enable commenting on expanded lines in PR diffs (#35662)
Fixes #32257 
/claim #32257

Implemented commenting on unchanged lines in Pull Request diffs, lines
are accessed by expanding the diff preview. Comments also appear in the
"Files Changed" tab on the unchanged lines where they were placed.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-19 18:19:12 +08:00