5493 Commits

Author SHA1 Message Date
Lunny Xiao
49a0d19fa3 feat(api): Add assignees APIs (#37330)
Follow
https://docs.github.com/en/enterprise-server@3.20/rest/issues/assignees?apiVersion=2022-11-28

Fix #33576 

And it also fixed some possible dead-lock problem.

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
2026-06-09 06:12:09 +00:00
Lunny Xiao
611dfc9496 fix: Fix some wrong code and follow 37347 (#37987) 2026-06-09 07:53:58 +02:00
Giteabot
60abea17a2 chore(deps): update module github.com/go-swagger/go-swagger to v0.34.0 (#38028)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
|
[github.com/go-swagger/go-swagger](https://redirect.github.com/go-swagger/go-swagger)
| `v0.33.2` → `v0.34.0` |
![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgo-swagger%2fgo-swagger/v0.34.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgo-swagger%2fgo-swagger/v0.33.2/v0.34.0?slim=true)
|

---

### Release Notes

<details>
<summary>go-swagger/go-swagger
(github.com/go-swagger/go-swagger)</summary>

###
[`v0.34.0`](https://redirect.github.com/go-swagger/go-swagger/releases/tag/v0.34.0)

[Compare
Source](https://redirect.github.com/go-swagger/go-swagger/compare/v0.33.2...v0.34.0)

go-swagger release 0.34.0

***

Released on 2026 May 29

#####
[0.34.0](https://redirect.github.com/go-swagger/go-swagger/tree/v0.34.0)
- 2026-05-28

Major refactoring. Focus on improving runtime (e.g.generated client) and
codescan (e.g. generated spec).

**Full Changelog**:
<https://github.com/go-swagger/go-swagger/compare/v0.33.2...v0.34.0>

42 commits in this release.

***

##### <!-- 00 -->Implemented enhancements

- feat(client): added method to configure client-side custom
producers/consumers by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3351](https://redirect.github.com/go-swagger/go-swagger/pull/3351)
[...](4068f65b04)

##### <!-- 01 -->Fixed bugs

- fix(client): moved internal fields in generated Params (timeout,
Context) to their own struct. by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3349](https://redirect.github.com/go-swagger/go-swagger/pull/3349)
[...](a81068f5d5)
- fix(client): added operation with context to client interface. by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3348](https://redirect.github.com/go-swagger/go-swagger/pull/3348)
[...](d5e5d3020b)
- fix(codescan): upgraded codescan for swagger generate spec. by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3347](https://redirect.github.com/go-swagger/go-swagger/pull/3347)
[...](971f2aa56a)
- fix(client): generated client uses more idiomatic SubmitContext by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3342](https://redirect.github.com/go-swagger/go-swagger/pull/3342)
[...](01d8f1358f)
- fix: adapted to runtime v0.32.x by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3341](https://redirect.github.com/go-swagger/go-swagger/pull/3341)
[...](ba25bfa2cc)
- fix: handle operator characters in enum constants (fixes
[#&#8203;1047](https://redirect.github.com/go-swagger/go-swagger/issues/1047))
by [@&#8203;Abzaek](https://redirect.github.com/Abzaek) in
[#&#8203;3330](https://redirect.github.com/go-swagger/go-swagger/pull/3330)
[...](4856feb230)

##### <!-- 02 -->Refactor

- refact(codegen): more concise server binding of form parameters. by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3339](https://redirect.github.com/go-swagger/go-swagger/pull/3339)
[...](036e31515a)
- refact(generator): split template repository, funcmaps and langage by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3316](https://redirect.github.com/go-swagger/go-swagger/pull/3316)
[...](4d659c0b5e)

##### <!-- 03 -->Documentation

- doc: announcements before cutting v0.34.0 by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3352](https://redirect.github.com/go-swagger/go-swagger/pull/3352)
[...](9b15dfe858)
- doc(faq): added explanations about why mixin can't support yaml
anchors by [@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3340](https://redirect.github.com/go-swagger/go-swagger/pull/3340)
[...](0dd20f7852)
- codegen(cli): fixed missing dependencies in CLI doc template by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3309](https://redirect.github.com/go-swagger/go-swagger/pull/3309)
[...](b1cc87b266)

##### <!-- 05 -->Code quality

- chore: move generated code to use the new swag api. by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3336](https://redirect.github.com/go-swagger/go-swagger/pull/3336)
[...](ba47cff06d)
- chore(generator): migrated to the new go-openapi/swag api. by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3335](https://redirect.github.com/go-swagger/go-swagger/pull/3335)
[...](83bced44f9)
- chore(lint): relint code base (pass 1) by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3331](https://redirect.github.com/go-swagger/go-swagger/pull/3331)
[...](8a020f0598)
- ci: reenact linting (was temporarily disabled to swallow large diffs)
by [@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3304](https://redirect.github.com/go-swagger/go-swagger/pull/3304)
[...](8cd187ba00)
- doc: post-release by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3302](https://redirect.github.com/go-swagger/go-swagger/pull/3302)
[...](746308f71f)

##### <!-- 07 -->Miscellaneous tasks

- test: fix fake flaky test reporting by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3350](https://redirect.github.com/go-swagger/go-swagger/pull/3350)
[...](747db03403)
- ci: drop peter-evans sign-commits to avoid per-file API uploads by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3346](https://redirect.github.com/go-swagger/go-swagger/pull/3346)
[...](480a0bdbf5)
- ci: checkout examples before configuring bot credentials by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3345](https://redirect.github.com/go-swagger/go-swagger/pull/3345)
[...](6dda1280fe)
- ci: fix cross-workflow artifact download permission by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3344](https://redirect.github.com/go-swagger/go-swagger/pull/3344)
[...](5981d75858)
- ci: fix examples regeneration auto-PR by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3343](https://redirect.github.com/go-swagger/go-swagger/pull/3343)
[...](f50d895b3a)
- chore(diff): moved cmd/swagger/commands/diff to its own package by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3308](https://redirect.github.com/go-swagger/go-swagger/pull/3308)
[...](6e059188a4)
- chore(codescan): moved the codescan package in a separate repo by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3307](https://redirect.github.com/go-swagger/go-swagger/pull/3307)
[...](eeca5fc9ff)
- ci: added workflow to regen examples and push the changes to the exam…
by [@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3305](https://redirect.github.com/go-swagger/go-swagger/pull/3305)
[...](9203e37e73)

##### <!-- 08 -->Security

- docs: add comprehensive documentation for API Browser (issue
[#&#8203;2401](https://redirect.github.com/go-swagger/go-swagger/issues/2401))
by [@&#8203;dashitongzhi](https://redirect.github.com/dashitongzhi) in
[#&#8203;3338](https://redirect.github.com/go-swagger/go-swagger/pull/3338)
[...](b594d144ef)
- ci: enhanced regen examples workflow by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3306](https://redirect.github.com/go-swagger/go-swagger/pull/3306)
[...](e1c611ed9e)
- doc: move examples by
[@&#8203;fredbi](https://redirect.github.com/fredbi) in
[#&#8203;3303](https://redirect.github.com/go-swagger/go-swagger/pull/3303)
[...](c32e2d574a)

##### <!-- 0A -->Updates

- chore(deps): bump the development-dependencies group with 10 updates
by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3337](https://redirect.github.com/go-swagger/go-swagger/pull/3337)
[...](9f68bcccf8)
- chore(deps): bump the development-dependencies group with 2 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3329](https://redirect.github.com/go-swagger/go-swagger/pull/3329)
[...](9286ac262e)
- chore(deps): bump golang from `f853308` to `91eda97` in the
development-dependencies group across 1 directory by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3328](https://redirect.github.com/go-swagger/go-swagger/pull/3328)
[...](a4f355cfde)
- chore(deps): bump the development-dependencies group with 4 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3327](https://redirect.github.com/go-swagger/go-swagger/pull/3327)
[...](1078819e42)
- chore(deps): bump the development-dependencies group with 3 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3326](https://redirect.github.com/go-swagger/go-swagger/pull/3326)
[...](e4b5c8fe1f)
- chore(deps): bump the development-dependencies group with 5 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3325](https://redirect.github.com/go-swagger/go-swagger/pull/3325)
[...](30da59f48a)
- chore(deps): bump golang from `27f8293` to `f853308` in the
development-dependencies group across 1 directory by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3324](https://redirect.github.com/go-swagger/go-swagger/pull/3324)
[...](faffaccee8)
- chore(deps): bump the development-dependencies group with 6 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3323](https://redirect.github.com/go-swagger/go-swagger/pull/3323)
[...](5bbf90b257)
- chore(deps): bump golang from `c2a1f7b` to `27f8293` in the
development-dependencies group across 1 directory by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3322](https://redirect.github.com/go-swagger/go-swagger/pull/3322)
[...](d25d6f2da0)
- chore(deps): bump the development-dependencies group with 2 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3321](https://redirect.github.com/go-swagger/go-swagger/pull/3321)
[...](cedb38213d)
- chore(deps): bump golang from `2389ebf` to `c2a1f7b` in the
development-dependencies group across 1 directory by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3320](https://redirect.github.com/go-swagger/go-swagger/pull/3320)
[...](3815953bf6)
- chore(deps): bump the development-dependencies group with 4 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3318](https://redirect.github.com/go-swagger/go-swagger/pull/3318)
[...](126ceeb618)
- chore(deps): bump the development-dependencies group with 6 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3317](https://redirect.github.com/go-swagger/go-swagger/pull/3317)
[...](af43211eec)
- chore(deps): bump the development-dependencies group with 4 updates by
[@&#8203;dependabot\[bot\]](https://redirect.github.com/dependabot\[bot])
in
[#&#8203;3315](https://redirect.github.com/go-swagger/go-swagger/pull/3315)
[...](0f32c03e49)

***

##### People who contributed to this release

- [@&#8203;Abzaek](https://redirect.github.com/Abzaek)
- [@&#8203;dashitongzhi](https://redirect.github.com/dashitongzhi)
- [@&#8203;fredbi](https://redirect.github.com/fredbi)

***

##### New Contributors

- [@&#8203;dashitongzhi](https://redirect.github.com/dashitongzhi) made
their first contribution
in
[#&#8203;3338](https://redirect.github.com/go-swagger/go-swagger/pull/3338)
- [@&#8203;Abzaek](https://redirect.github.com/Abzaek) made their first
contribution
in
[#&#8203;3330](https://redirect.github.com/go-swagger/go-swagger/pull/3330)

***

**[go-swagger](https://redirect.github.com/go-swagger/go-swagger)
license terms**

[![License][license-badge]][license-url]

[license-badge]:
http://img.shields.io/badge/license-Apache%20v2-orange.svg

[license-url]:
https://redirect.github.com/go-swagger/go-swagger/?tab=Apache-2.0-1-ov-file#readme

***

Released by
[GoReleaser](https://redirect.github.com/goreleaser/goreleaser).

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Only on Monday (`* * * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuNSIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

---------

Co-authored-by: Nicolas <bircni@icloud.com>
2026-06-08 20:41:45 +00:00
bircni
3b1e75764e feat(actions): add job summaries (GITHUB_STEP_SUMMARY) (#37500)
- Add GitHub-style Actions **job summaries** support
(`GITHUB_STEP_SUMMARY` / `workflow/SUMMARY.md`) and render them on the
run Summary view.
- Store uploaded summaries internally in the DB (not as downloadable
artifacts).
- Add runtime-token endpoint for runners to upload summaries:
- `PUT
/api/actions_pipeline/_apis/pipelines/workflows/{run_id}/jobs/{job_id}/summary`
- Advertise support to runners via `RunnerService.Declare` response
header:
  - `X-Gitea-Actions-Capabilities: job-summary`
- Devtest: extend `/devtest/repo-action-view/...` to include mock
`jobSummaries` for previewing UI rendering.

## Compatibility
- New Gitea + old runner: no summary upload → UI shows nothing (no
behavior change)
- New runner + old Gitea: capability not advertised → runner skips
upload (no behavior change)

## Screenshot:

<img width="2017" height="729"
src="https://github.com/user-attachments/assets/31f8b945-50c4-40e1-9f40-382901a53013"
/>


Fixes #23721
PR on gitea-runner https://gitea.com/gitea/runner/pulls/917

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-06-08 19:11:00 +00:00
bircni
b1c088e9cf enhance(actions): Make Summary UI more beautiful with more infos (#37824)
## Summary

- Redesign the Actions run summary header to follow GitHub Actions
layout: trigger info on the left, Status / Total duration / Artifacts
columns inline on the right
- Expose trigger user avatar, pull request link, and PR head branch info
from the run view API
- Update the workflow graph header to show the workflow filename (linked
to the run workflow file) and `on: <event>`, while keeping the
jobs/dependencies/success stats line
- Remove the redundant commit/workflow metadata row below the run title;
that information now lives in the summary bar

New:
<img width="1564" height="639"
src="https://github.com/user-attachments/assets/e6bc1623-c5fc-4e97-abc9-fde7f3c6aef9"
/>

Old:
<img width="2038" height="1038"
src="https://github.com/user-attachments/assets/0857f19a-8d3a-4da2-82fd-e9ebeb200062"
/>

Replaces https://github.com/go-gitea/gitea/pull/36721

---------

Co-authored-by: Giteabot <teabot@gitea.io>
2026-06-08 18:49:06 +00:00
bircni
54916f708e feat: Add avatar stacks (#37594)
Parse `Co-authored-by:` trailers from commit messages and surface
contributors as an avatar stack across the commit page, commits list, PR
commits tab, latest-commit row, blame, graph, and dashboard feed.

- Up to 10 visible 20px avatars, GitHub-style overlap (6px first stride,
4px between subsequent), `+N` chip for the rest.
- Label: 1 → name; 2 → `<a> and <b>`; 3+ → `<N> people` opens a Tippy
popup with all participants.
- Names and avatars link to the repo's commits-by-author search; fall
back to profile or `mailto:`.
- Trailer parsing uses `net/mail.ParseAddress`, scans only the trailing
paragraph, filters out the commit's own author/committer.
- Drops the non-standard `Co-committed-by:` emission on squash merge and
web edits.

Devtest: `/devtest/coauthor-avatars`.

Fixes #25521

----
<img width="353" height="277" alt="image"
src="https://github.com/user-attachments/assets/72092ceb-97ca-4b09-9557-0b72d3c5458e"
/>

<img width="533" height="328"
src="https://github.com/user-attachments/assets/11d0c8f8-8b3f-4f2e-9993-879f1c06bcc5"
/>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-06-08 17:16:22 +00:00
bircni
1c289df6eb enhance: Adjust Workflow Graph styling (#37497)
- Fix workflow dependency graph overflow by making the graph container
scrollable (no more clipped DAGs; addresses #37493).
- Improve Actions job list readability by keeping durations
fixed-width/right-aligned so long times don’t squeeze job names.
- Make workflow graph layout more intuitive by vertically centering
shorter columns to reduce misleading “looks like it depends on”
alignments (addresses #37395).

### Screenshot
<img width="966" height="439"
src="https://github.com/user-attachments/assets/c180c5a2-4f56-4287-bcaa-f2735ba72949"
/>

<img width="949" height="559"
src="https://github.com/user-attachments/assets/a383511d-a962-4920-b792-69f556847eff"
/>



Fixes #37493
Fixes #37395

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-06-07 16:45:20 +00:00
wxiaoguang
e88650cfcf chore: fix various layout problems (#37983)
Fix various misaligments, fix space between list item bar items, remove
deadcode (milestone dashboard)
2026-06-06 09:24:03 +00:00
bircni
4088d7e241 fix(ui): keep actions run title intact when subject contains an issue ref (#38005) 2026-06-06 11:00:14 +02:00
Harsh Mahajan
792fa5eeba feat(api): add q parameter to list branches API for server-side filtering (#37982)
The GET /repos/{owner}/{repo}/branches endpoint currently has no way to
filter branches by name server-side, forcing API consumers to paginate
through all branches and filter client-side.

The UI already supports branch search (added in
[#27055](https://github.com/go-gitea/gitea/pull/27055)). The underlying
DB layer has a Keyword field on FindBranchOptions in
models/git/branch_list.go that does a LIKE %keyword% SQL filter, it just
wasn't wired up to the API handler.

This PR exposes a ?q= query parameter on the endpoint that maps to
FindBranchOptions.Keyword.

Example:

```GET /repos/owner/repo/branches?q=feature ```
Closes #37981

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-06-03 16:21:48 -07:00
Thomas Sayen
b2748d7654 feat(ui): add "follow rename" to file commit history list (#34994)
Fix #28253

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-06-03 17:40:38 +00:00
puni9869
79810ba2e3 fix: use committer time where ever possible as default (#37969)
Fix https://github.com/go-gitea/gitea/issues/37857

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-06-02 15:08:23 +08:00
wxiaoguang
85f563da6c chore: various frontend changes (#37973) 2026-06-01 20:38:23 +00:00
Lunny Xiao
689ace1ce2 feat(orgs): Add search bar for organization members tab page (#37347)
Resolve #37072 

<img width="1312" height="186" alt="image"
src="https://github.com/user-attachments/assets/3ca9eddb-9230-4b0d-992f-5b19e475e267"
/>

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: bircni <bircni@icloud.com>
2026-06-01 20:16:04 +00:00
Zettat123
0359746abe feat(actions)!: improve support for reusable workflows (#37478)
## Summary

This PR improves reusable workflow support for Gitea Actions. The
parsing of the called workflow now happens on Gitea side, not on the
runner. When the caller becomes ready, Gitea fetches the called workflow
source, parses it, and inserts each child job into the database as a
`ActionRunJob` linked to the caller via `ParentCallJobID`. As a result,
every callee job is dispatched as its own task and its logs surface as
an independent job entry in the UI, rather than being inlined into the
caller's "Set up job" step.

This PR supports two kinds of `uses` : 
- same-repo call: `uses: ./.gitea/workflows/foo.yaml`
- cross-repo call: `uses: OWNER/REPO/.gitea/workflows/foo.yaml@REF`

## **⚠️ BREAKING ⚠️**
External reusable workflows (`uses:
https://other-gitea-instance/OWNER/REPO/.gitea/workflows/test.yaml@REF`)
are no longer supported. To keep using them, clone the repositories to
the local instance.

## Main changes

### Execution model

- Each caller job carries `IsReusableCaller=true` and won't be fetched
by runners.
- `ParentCallJobID` can link a called job to its caller.
- Caller status is derived from its direct children.


### Workflow syntax

- `jobparser` now supports parsing `on: workflow_call` trigger with
`inputs:`, `outputs:`, and `secrets:` declarations.
- **Max nesting depth**: capped at `MaxReusableCallLevels = 9`, which
means a top-level caller may have at most 9 nested callers below it.
- **Cycle prevention**: at expansion time, `checkCallerChain` walks the
caller's ancestor chain via `ParentCallJobID` and rejects if the same
`uses:` string appears anywhere upstream (`reusable workflow call cycle
detected`). This catches both direct (`A -> A`) and indirect (`A -> B ->
A`) cycles.

### Cross-repo access

- To share reusable workflows from private repos, use `Collaborative
Owners` introduced by #32562

### Rerun semantics

- `expandRerunJobIDs` partitions the latest attempt's jobs into:
- a **rerun set**: jobs being rerun + downstream siblings within the
same scope.
- an **ancestor set**: reusable callers whose only *some* descendants
are being rerun (the caller itself is not).
- Cloning behavior for callers in `execRerunPlan`:
- **Caller is fully rerun** (caller's `AttemptJobID` in `rerunSet`):
none of its descendants are cloned. The caller is cloned with
`IsCallerExpanded=false`, and re-expansion (which reinserts the children
fresh) happens later when the resolver brings the caller to `Waiting`
again.
- **Caller is in ancestor set** (only some descendants rerun): the
caller is pass-through (`Status` will be updated by its fresh children).
Its non-rerun descendants are also pass-through clones (point
`SourceTaskID` at the original task). Their `ParentCallJobID` is
remapped to the new attempt's caller row.

### UI

- Job list in `RepoActionView.vue` is now tree-shaped: callers indent
their children. Callers default to collapsed.
- New caller detail page using `WorkflowGraph` to show direct children
only; the run summary's `WorkflowGraph` shows top-level callers and
their immediate descendants.

### Known trade-offs

- **Caller expansion runs inside the enclosing write transaction.**
`expandReusableWorkflowCaller` performs a git read of the called
workflow while holding the row locks that update the caller and insert
its children. This is intentional: the caller-row update and child-row
inserts must commit atomically. None of the call sites is hot (each
caller is expanded once per attempt), so the trade-off is acceptable.

- **A malformed `if:` expression on a job leaves it `Blocked`
silently.** `evaluateJobIf` now runs server-side as part of resolver
passes; deterministic expression errors (typos, undefined context
fields) are logged but do not surface in the UI. This is the same
behavior the resolver already had for concurrency-expression errors.
Distinguishing transient DB errors from user-authored expression errors
and writing the latter back as `StatusFailure` is a follow-up.


#### Screenshots

<img width="1600" alt="image"
src="https://github.com/user-attachments/assets/bfaa9b7a-07e9-4127-8de9-a81f86e82828"
/>

<img width="1600" alt="image"
src="https://github.com/user-attachments/assets/8af109b3-ef28-4b53-aaad-d4632b923224"
/>


## References

-
https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows
-
https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations

---

Replace #36388

---------

Signed-off-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-05-30 08:31:14 +02:00
Nicolas
a342206a21 fix(locales): Replace hardcoded strings (#37788)
The Workflow Dependencies graph in the Actions run details view had
hard-coded English strings.
Also in projects view and contributors view I found some hard-coded
strings.
  
The other items in the issue #37787 (Summary / All jobs / Run Details /
Workflow file / Triggered via / Total duration) were already wired
through ctx.Locale.Tr; their translations just need to land in the
non-English locale_*.json files via the translation pipeline.



Fixes #37787

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.8) <noreply@anthropic.com>
2026-05-29 23:50:55 +00:00
Nicolas
dd59c68486 feat(actions): bulk delete, disable and enable runners in admin UI (#37869)
Adds bulk actions on the site-admin runner list
(`/-/admin/actions/runners`). Site admins can now select multiple
runners and **Delete**, **Disable**, or **Enable** them in one go
instead of clicking through each runner's edit page.

Scope is intentionally limited to the admin page. The user, org, and
repo runner pages keep their existing per-row UX — the shared list
template gates the bulk UI behind an `AllowBulkActions` flag set only by
the admin handler.

## Screenshots

<img width="1582" height="353"
src="https://github.com/user-attachments/assets/2125661f-aac0-4168-990a-97995a26abd2"
/>

---------

Signed-off-by: Nicolas <bircni@icloud.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-29 22:16:47 +02:00
silverwind
52fef74291 fix(frontend): resolve Vite assets by manifest source path (#37836)
In dev mode `/api/swagger` returned HTTP 500 (`Failed to locate local
path for managed asset URI: css/swagger.css`): the backend synthesised
asset keys from the Vite entry name instead of reading the manifest,
which only worked by coincidence and broke once a source file name
diverged from its entry name.

This keys the manifest by its source path (e.g. `web_src/js/index.ts`)
and resolves entries directly — hashed `file` in prod, dev-server source
in dev. A new `AssetCSSLinks` helper renders a JS entry's stylesheet
`<link>` tags from the manifest (the entry's CSS plus the CSS of its
statically-imported chunks).

Fixes: https://github.com/go-gitea/gitea/issues/37830
Fixes: https://github.com/go-gitea/gitea/pull/37832
Fixes: https://github.com/go-gitea/gitea/pull/37876
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: prakhar0x01 <prakharporwal2004@gmail.com>
Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-05-28 06:14:52 +00:00
Lunny Xiao
61b1a39efe chore: Move import path from code.gitea.io/gitea to gitea.dev (#37873) 2026-05-26 15:49:31 -07:00
Nicolas
a03e0364eb feat(actions): add branch filters to run list (#37826)
## Summary

- Add a Branch filter dropdown to the repo Actions run list web UI
- Wire `?branch=` query param through the web handler, matching the
existing REST API filter behavior
- Source the Branch dropdown from the indexed `branch` table (filtering
out deleted branches) instead of scanning `action_run.ref`, addressing
review feedback about unindexed columns

The Event filter was dropped after review: a static list of supported
events was noisy as UX, and querying distinct values from
`action_run.trigger_event` is slow because the column is not indexed.
`FindRunOptions.TriggerEvent` is kept for the REST API.

Closes #25042

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 09:08:05 +00:00
Nicolas
d93bbcc0a6 feat(actions): List workflows that were executed once but got removed from the default branch (#37835) 2026-05-25 14:41:36 +00:00
Nicolas
bc6054b56d enhance(actions): show workflow name from YAML instead of filename (#37833)
Use the workflow's YAML `name:` field for display in the workflow
sidebar and run list, falling back to the filename when no name is set.

Closes https://github.com/go-gitea/gitea/issues/31458
Closes https://github.com/go-gitea/gitea/issues/25912
Closes https://github.com/go-gitea/gitea/pull/31474
2026-05-25 08:25:22 +00:00
Thomas Hallock
6f4027a6be fix(packages): render markdown links relative to linked repo (#37676)
Package-page markdown (READMEs, descriptions, release notes) was
rendered as a plain document, so relative links and images resolved
against the site root and 404'd. This renders it in the context of the
package's linked repository instead, falling back to plain rendering
when the package has no linked repo.

For a README link `[usage](docs/usage.md)` in a package linked to
`user/repo` (default branch `main`):

| | Resolved link |
|---|---|
| Before | `/docs/usage.md` |
| After | `/user/repo/src/branch/main/docs/usage.md` |

For an npm monorepo package with `repository.directory: packages/foo`,
an image `![logo](logo.png)` resolves to
`/user/repo/src/branch/main/packages/foo/logo.png`.

Applied to every package content template that renders markdown:
`cargo`, `chef`, `composer`, `npm`, `nuget`, `pub`, `pypi`. Links
resolve against the repository default branch (metadata records no
publish commit). Only the web package detail page is affected; registry
API responses are unchanged.

Note: as part of restructuring `npm.tmpl`, the package description and
README now render as separate sections instead of the README replacing
the description, matching the existing `cargo`/`composer`/`pub` layout.

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-24 09:13:49 +00:00
Mohamed Sekour
bf1b54c3e3 fix(api): handle partial failures in push mirror synchronization gracefully (#37782)
This MR fixes an issue in the sync push mirrors endpoint.

Previously, when triggering the synchronization of all push mirrors for
a specific repository, the entire operation would stop if a single
mirror failed for any reason. As a result, the remaining mirrors were
not processed.

With this fix, failures on individual push mirrors no longer abort the
whole synchronization process.

---------

Signed-off-by: Nicolas <bircni@icloud.com>
Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-05-22 09:53:19 +00:00
silverwind
b7e95cc48c feat: add copy button to action step header, improve other copy buttons (#37744)
- Adds a copy button to each action step header that copies the step's
rendered log output to clipboard.
- Extract a shared `copyToClipboard(target, content)` helper in
`clipboard.ts` that adds SVG success/failure feedback.
- `is-loading` height for the new helper is sourced from
`--loading-size`.
- Change actions log timestamp format to include seconds.

The indented-markdown code-block fix has moved to #37748.

<img width="244" height="165" alt="copystep"
src="https://github.com/user-attachments/assets/ce286b51-f77b-4d82-b161-ca0aa7ec4fdc"
/>

<img width="187" height="150" alt="copybt"
src="https://github.com/user-attachments/assets/5366b290-b776-496d-8dd4-58d5fa60be92"
/>

Fixes: https://github.com/go-gitea/gitea/issues/26116

---
This PR was written with the help of Claude Opus 4.7

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Nicolas <bircni@icloud.com>
2026-05-21 07:39:09 +00:00
silverwind
2e96e8227f style: misc UI fixes (#37691)
- Action view sidebar: rename `job-brief-item` to
`action-view-sidebar-item`, fix trash icon overflow on long artifact
names, align artifact and workflow hover styles with the jobs list
- Branches: expand new PR button cell to three wide so the button is not
clipped on narrow viewports
- Dashboard feed: add `tw-max-w-full` so long issue titles truncate
- Reactions: tighten label padding

<img width="261" height="65" alt="Screenshot 2026-05-13 at 16 18 33"
src="https://github.com/user-attachments/assets/ecfe8f37-4a65-4839-b8c0-defccc85482c"
/>
<img width="154" height="126" alt="Screenshot 2026-05-13 at 16 19 25"
src="https://github.com/user-attachments/assets/41302134-d1b7-401a-be2d-79173adb6d17"
/>
<img width="405" height="378" alt="Screenshot 2026-05-13 at 16 47 18"
src="https://github.com/user-attachments/assets/e2c5cdd4-f11d-498c-b17e-c74c80c0ddf7"
/>
<img width="206" height="149" alt="Screenshot 2026-05-13 at 16 55 53"
src="https://github.com/user-attachments/assets/7787125d-04b1-4500-b9b8-2637845509d6"
/>
<img width="858" height="135" alt="Screenshot 2026-05-13 at 16 58 41"
src="https://github.com/user-attachments/assets/cb5bdf56-3891-469d-aa77-ea38855958c1"
/>
<img width="434" height="128" alt="Screenshot 2026-05-13 at 17 00 43"
src="https://github.com/user-attachments/assets/60f2c34d-b345-4813-8f6d-a95bf51021b4"
/>



---
This PR was written with the help of Claude Opus 4.7

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-21 07:02:05 +00:00
Gary Wang
6c04140137 feat(web): also display PR counts in repo list (#37739)
This is a follow-up PR of https://github.com/go-gitea/gitea/pull/37731

This patch adds PR count in repo list page, following screenshots are
after the patch:

<img width="760" height="450" alt="image"
src="https://github.com/user-attachments/assets/376a06d3-7d1c-43b3-8866-9457d1ab0904"
/>

<img width="782" height="283" alt="image"
src="https://github.com/user-attachments/assets/3e4a7b7e-1f1d-47d2-a89c-bb9b66493559"
/>

Co-authored-by: Nicolas <bircni@icloud.com>
2026-05-17 07:29:18 +00:00
Kalash Thakare ☯︎
e7af84df72 feat: execute post run cleanup when workflow is cancelled (#37275)
## Fixes #36983

## Summary
1. Add transitional `Cancelling` status (between `Running` and
`Cancelled`); cancel flow marks active tasks `Cancelling`, runner
finalizes to `Cancelled` on terminal result.
2. Taskless jobs cancel directly (no runner to finalize).
3. Runner-protocol responses map `Cancelling` → `RESULT_CANCELLED`.
4. Run/job aggregation treats `Cancelling` as active.
5. Status mapping/aggregation tests + en-US locale added.

**Problem**
When a workflow was cancelled from the UI, jobs were marked cancelled
immediately, which could skip post-run cleanup behavior.

## Solution
Use a transitional status path:
Running → Cancelling → Cancelled
This allows runner finalization and cleanup path execution before final
terminal state.

**Testing**

> 1. go test -tags "sqlite sqlite_unlock_notify" ./models/actions -run
"TestAggregateJobStatus|TestStatusAsResult|TestStatusFromResult"
> 2. go run
github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 run
./models/actions/... ./routers/api/actions/runner/...

## Related
- act_runner: https://gitea.com/gitea/act_runner/pulls/825 —
independent; this PR's capability gate keeps legacy runners on the
immediate-cancel path. The new flow activates only for runners that
advertise the `cancelling` capability.

Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-05-17 08:41:39 +02:00
Gary Wang
edf0dfd1df fix(icon): use repo-forked icon to display forks count (#37731)
This could avoid confusion about what the icon means. It can be
considered as for Pull Requests count by mistaken if we use that icon.
2026-05-16 12:08:43 -07:00
Nicolas
eb93981d45 feat: Add bypass allowlist for branch protection (#36514)
- Introduce a “Bypass Protection Allowlist” on branch rules
(users/teams) alongside admins, with BlockAdminMergeOverride
  still respected.
- Surface the allowlist in API (create/edit options, structs) and
settings UI; merge box now shows the red button +
  message for bypass-capable users.
- Apply bypass logic to merge checks and pre-receive so allowlisted
users can override unmet approvals/status checks/
  protected files when force-merging.
- Add migration for new columns, locale strings, and unit tests (bypass
helper; queue test tweak).

<img width="1069" height="218" alt="image"
src="https://github.com/user-attachments/assets/0b61bc2a-a27f-47f3-a923-613688008e65"
/>


Fixes #36476

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Codex GPT-5.3 <codex@openai.com>
Co-authored-by: GPT-5.2 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-05-16 14:23:42 +00:00
Nicolas
34fd3c9f06 feat: Add default PR branch update style setting (#37410)
Adds repository-level settings for pull request branch updates so admins
can choose the default update method and disable merge or rebase
updates.

<img width="1025" height="158"
src="https://github.com/user-attachments/assets/d030973b-0ddd-4035-b04f-145c445084d7"
/>

---------

Co-authored-by: OpenAI Codex (GPT-5) <codex@openai.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-16 10:06:40 +00:00
Matt Schoen
a564f0587a feat(api): add sort and order query parameters to job list endpoints (#37672)
Adds `sort` and `order` query parameters to all action job list API
endpoints (`/admin/actions/jobs`, `/repos/{owner}/{repo}/actions/jobs`,
`/repos/{owner}/{repo}/actions/runs/{run}/jobs`, `/user/actions/jobs`),
following the existing `OrderByMap` pattern used by repo/user search
endpoints.

- Default is `id` / `asc` (backwards compatible — matches previous DB
natural order)
- Only `id` sort field for now; the map is extensible for future fields
- Returns 422 for invalid sort/order values
- `ToOrders()` returns empty string when `OrderBy` is unset, so internal
callers (webhook dispatch, concurrency checks) are unaffected

Closes: #37666
Supersedes: #37667
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-05-13 13:11:02 +00:00
Nicolas
de290f2121 fix(templates): avoid misleading compare message when branches lack merge base (#37651)
## Summary

When comparing branches with **no common merge base** (e.g. unrelated
histories or orphan branches), `PageIsComparePull` is false and
`CommitCount` is zero. The compare template still showed
`repo.commits.nothing_to_compare`, which in German reads like the
branches are identical—even though the flash already explains there is
no merge base.

## Changes

- **`templates/repo/diff/compare.tmpl`**: Only render the grey “nothing
to compare” segment when `CompareInfo.CompareBase` is set.

<img width="1962" height="564"
src="https://github.com/user-attachments/assets/adc3b4a0-6f03-45da-b297-e15e5ad0aa79"
/>


Fixes #37642

---------

Signed-off-by: Nicolas <bircni@icloud.com>
2026-05-11 16:28:44 +00:00
Lunny Xiao
5d87a70af9 fix(packages): Add label for private and internal package and fix composor package source permission check (#37610)
- Add permission checks for Composer package source links

- Add private/internal visibility labels for packages, similar to
repository visibility labels

<img width="969" height="571" alt="image"
src="https://github.com/user-attachments/assets/8a8ec3a0-bfbd-4dd6-b45b-58eda5db1a2d"
/>

- Add a link to change package visibility

<img width="1309" height="208" alt="image"
src="https://github.com/user-attachments/assets/3fa82b23-4c63-4a5e-b3f0-d37a103231ee"
/>

- Update link package descriptions

<img width="1308" height="265" alt="image"
src="https://github.com/user-attachments/assets/2c80b50e-5ffe-4d96-aedd-aa15964c4e05"
/>

---------

Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-05-11 05:49:46 +00:00
silverwind
5dc9d621fd refactor: replace Fomantic search module with first-party code (#37443)
- Replace fomantic `search` code with minimal first-party code
- Added a small fix to vertically align search box and search button
- Manually tested all search forms.
- Add `errorName` helper, similar to `errorMessage`.

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-05-11 05:25:26 +00:00
pomidorry
67f86bc3fe feat(api): add last_sync to repository API (#37566)
This PR adds a new repository API field, `mirror_last_sync_at`, to
expose the timestamp of the last successful pull mirror sync.

Unlike `mirror_updated`, this field does not affect mirror scheduling
and is updated only after a successful pull sync. Failed sync attempts
leave the value unchanged.

What changed

- added `mirror_last_sync_at` to the repository API response
- updated pull mirror sync flow to persist the timestamp only on
successful sync
- kept `mirror_updated` behavior unchanged for queue/scheduling purposes

`mirror_updated` is currently tied to mirror queue behavior, so it
cannot safely represent the last successful sync time. The new field
makes that state explicit for API consumers without changing scheduling
semantics.

---------

Signed-off-by: pomidorry <106489913+Pomidorry@users.noreply.github.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-05-10 20:07:56 +00:00
silverwind
ce089f498b fix: improve actions status icons and texts (#37206)
Action runs, jobs and steps have 8 statuses but the UI only showed 5
(from the commit status api) for the latter two. Align all 8 to GitHub
as closely as possible:

  - waiting — `octicon-circle` (hollow circle), gray
  - blocked — `octicon-blocked` (slashed circle), yellow
  - running — `gitea-running` (rotating spinner), yellow
  - cancelled — `octicon-stop` (gray), was `octicon-x` (red)

Descriptions also aligned with GitHub:

  - "Has started running" → "In progress"
  - "Has been cancelled" → "Cancelled after {dur}"
  - "Has been skipped" → "Skipped"

Fixes: https://github.com/go-gitea/gitea/issues/32228

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Nicolas <bircni@icloud.com>
2026-05-09 15:24:08 +08:00
Nicolas
c9b9e376fb fix: Invalid UTF-8 commit messages in JSON API responses (#37542) 2026-05-07 16:19:45 +02:00
Copilot
b093c2c43c refactor(templates): remove ctxData from tmpl files, use ctx.RootData instead (#37567)
Sub-templates have direct access to `ctx.RootData` (the root data map),
so there is no need for callers to explicitly pass it as `ctxData` via `dict`.

Also fix #37569 by the way

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-06 18:21:48 +00:00
wxiaoguang
6ba907d89c Fix various problems (#37547)
1. Fix ugly commit form "warning" message
2. Use JSONError for "Update PR Branch" response 
3. Remove useless "timeline" class
4. Make timeline review default to "comment" to avoid icon missing
5. Align PR's "command line instructions" UI
6. Simply "Update PR branch" button logic

And then some TODOs are fixed.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-05 15:54:07 +00:00
wxiaoguang
a90d5dd131 Refactor pull request view (7) (#37524)
Almost done

`pull_merge_box.tmpl` only has about 80 lines now, and (almost) all
variable accesses are strictly typed.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Nicolas <bircni@icloud.com>
2026-05-04 20:13:38 +00:00
wxiaoguang
dd17521808 Refactor pull request view (6) (#37522)
Clean up legacy logic.

* Use backend logic to choose PR timeline icon color
* Always use the Vue form to merge, remove the "StillCanManualMerge" logic
2026-05-04 14:15:33 +08:00
wxiaoguang
f26f71f1b2 Refactor pull request view (5) (#37517)
Clean up templates, remove various CSS patches.

By the way, fix incorrect NewRequest URLs in tests.
2026-05-03 18:53:24 +00:00
wxiaoguang
134e86c78c Refactor "flex-list" to "flex-divided-list" (#37505)
Purpose:

1. Make the whole code base have unified "item" layout
2. Clarify our "list" styles: "flex-relaxed-list", "flex-divided-list"
3. Prepare to replace legacy "ui relaxed list"
* https://github.com/go-gitea/gitea/pull/37445#discussion_r3144458865
4. Prepare for refactoring the "pull merge box", it needs the
"flex-divided-list"
    * related to "Refactor pull request view (*)" like #37451
5. Fix legacy abuses of "flex-list", e.g.: repo home sidebar
2026-05-02 16:10:52 +00:00
rootful
3d838ef96a Fix mCaptcha broken after Vite migration (#37492)
After the Webpack-to-Vite migration (#37002), mCaptcha stopped working
entirely on the registration page, throwing an error:

`TypeError: setting getter-only property "INPUT_NAME"`

This fix stops trying to mutate the read-only INPUT_NAME export. Instead
it probes for the Widget constructor at module.default (direct) or
module.default.default (CJS-wrapped), constructs the widget, and then
renames the hidden input element it creates to m-captcha-response which
is the field name Gitea's backend reads from the submitted form.

Generative AI was used to help with making this PR.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-05-02 17:21:56 +02:00
wxiaoguang
deb31d3f30 Refactor database connection (#37496)
Clean up legacy copied&pasted code, introduce the unique "database
connection" function. Move migration testing helper function
PrepareTestEnv to a separate package.

By the way, remove "shadow connection secrets" tricks: showing
connection string on UI is useless

---------

Co-authored-by: Nicolas <bircni@icloud.com>
2026-05-01 15:38:38 +00:00
pomidorry
02b1b8a549 Add mirror auth updates to repo edit API and settings (#37468)
## Summary

This PR adds support for updating pull mirror authentication via the
repository edit API and UI.

It introduces new mirror authentication fields in _EditRepoOption_,
updates the API logic to safely handle partial credential updates, and
fixes the web settings flow so that the existing remote username is
preserved when only the password is changed.

### What changed
- added _auth_username_, _auth_password_, and _auth_token_ to
EditRepoOption
- updated the repository edit API to apply mirror auth changes via
_updateMirror_
- preserved existing username/password when only part of the auth
payload is provided
- used oauth2 as the default username when _auth_token_ is provided
- kept stored mirror URLs sanitized in DB and API responses
- updated Swagger schema for the new API fields
- added API integration tests for password-only and token-only updates
- added a web settings test to ensure username preservation on partial
updates

## Why

Some use cases require automated synchronization of pull mirrors, for
example in CI/CD pipelines or integrations with external systems.

At the same time, many organizations enforce security policies that
require periodic token rotation (e.g., monthly).

Currently, mirror credentials can only be updated via the UI, which
makes automation difficult.

## This change enables:

- automated token rotation
- avoiding manual updates via the UI
- easier integration with secret management systems
## Testing
- added integration coverage for mirror auth updates via _PATCH
/api/v1/repos/{owner}/{repo}_
- added web settings tests for password-only updates preserving the
existing username

## Result
Ability to automate auth update
<img width="2400" height="1245" alt="1"
src="https://github.com/user-attachments/assets/67fd5cca-9cb3-4536-b0e2-4d09b8ebff0f"
/>
<img width="962" height="932" alt="image"
src="https://github.com/user-attachments/assets/5d548f5d-aadf-4807-ba52-9c29df93a4cc"
/>

Generative AI was used to help with making this PR.
##
2026-05-01 11:00:03 +00:00
Icy Avocado
81692ceafa Allow multiple projects per issue and pull requests (#36784)
Add ability to add and remove multiple projects per issue
and pull request.

Resolve #12974

---------

Signed-off-by: Icy Avocado <avocado@ovacoda.com>
Co-authored-by: Tyrone Yeh <siryeh@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: OpenCode (gpt-5.2-codex) <opencode@openai.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-04-30 22:38:05 +08:00
wxiaoguang
2b2ec6af85 Refactor compare diff/pull page (1) (#37481)
1. Rename CompareInfo.MergeBase to CompareBase, it is not merge base
2. Remove unused template variables `ctx.Data["Username"]` and
`ctx.Data["Reponame"]`
3. Decouple some template variable accesses, use typed struct

---------

Co-authored-by: Nicolas <bircni@icloud.com>
2026-04-29 18:32:46 +00:00
Rayan Salhab
184ce17167 Fix review submission from single-commit PR view (#37475)
Fixes #37415.

Pin the review submission form action to the canonical PR files route

---------

Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: Hermes Agent (OpenAI GPT-5.5) <noreply@nousresearch.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-29 17:03:26 +00:00