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

19998 Commits

Author SHA1 Message Date
Ross Golder
f600226a04
Run make fmt to format code 2025-12-07 12:24:15 +07:00
Ross Golder
d76780a5f9
Remove unused import in WEBUI actions view 2025-12-07 12:24:09 +07:00
Ross Golder
0a2fc6fec5
Move rerunJob logic to shared actions_service.RerunJob function for reuse across API and WEBUI 2025-12-07 12:24:03 +07:00
Ross Golder
b6ba7241c2
Remove 'latest' support from run ID parameter for consistency with other workflow APIs 2025-12-07 12:23:57 +07:00
Ross Golder
1a4de8bfbb
Move run time reset logic to shared actions_service.ResetRunTimes function 2025-12-07 12:23:51 +07:00
Ross Golder
0657d25583
Remove redundant Repo.CanWrite checks from action handlers - permissions are enforced at route level 2025-12-07 12:23:35 +07:00
Ross Golder
31cb3617a3
Drop check for jobs from other repo. 2025-12-07 12:23:28 +07:00
Ross Golder
1ea1cb518a
Fix test job ID and add LoadRun check in rerunJob 2025-12-07 12:23:22 +07:00
Ross Golder
2ee6b746e8
Revert fixture and test changes from merges - not part of the Actions API feature 2025-12-07 12:23:16 +07:00
Ross Golder
00ddcc60b0
Add build tools for code processing and testing 2025-12-07 12:23:10 +07:00
Ross Golder
944b6761c3
Update test fixtures and related files for Actions API 2025-12-07 12:23:04 +07:00
Ross Golder
2b0cd60356
Regenerate swagger after adding Actions API endpoints 2025-12-07 12:22:59 +07:00
Ross Golder
b4231325b1
feat: add Actions API endpoints for workflow run and job management 2025-12-07 12:22:53 +07: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