0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-08 01:34:08 +02:00

20745 Commits

Author SHA1 Message Date
silverwind
6a509da96e
refactor: lint bare fill/stroke colors, add vars for git graph color series (#37543)
- make `scale-unlimited/declaration-strict-value` cover fill and stroke
- add new color vars for color series in gitgraph
- move most rule disablement to per-line
- remove dead highlight colors since https://github.com/go-gitea/gitea/pull/34948
- move stylelint config to ts now that the linked issue is fixed

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-05-07 21:18:23 +00:00
Nicolas
601c6eb1a0
fix(actions): report individual step status in workflow job API response (#37592)
When a workflow job failed, the API response reported all steps as
failed — even steps that had completed successfully before the failing
step. `ToActionWorkflowJob` was calling `ToActionsStatus(job.Status)`
for every step instead of `ToActionsStatus(step.Status)`, so the job's
overall conclusion was propagated to each step.

Each `ActionTaskStep` has its own `Status` field that tracks the actual
outcome of that step independently of the job result.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-07 20:30:34 +02:00
silverwind
e9f82b0ee3
ci: allow chore type in PR title lint (#37575)
Follow-up to #37498, adds `chore` to the allowed PR title types so the
set matches the standard
[`@commitlint/config-conventional`](868983c18e/%40commitlint/config-conventional (type-enum)).

---
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>
2026-05-07 17:18:10 +00:00
silverwind
3e69d6adbe
refactor: remove obsolete export (#37579)
Leftover from
2644bb8490,
not needed because module no longer does top-level-await.

Co-authored-by: Nicolas <bircni@icloud.com>
2026-05-07 17:12:52 +00:00
Nicolas
c9b9e376fb
fix: Invalid UTF-8 commit messages in JSON API responses (#37542) 2026-05-07 16:19:45 +02:00
Nicolas
2200ed7499
fix: use consistent GetUser family functions (#37553)
fixes adding collaborative owners in Actions settings when the user or
organization name contains capital letters.

Fixes #37548

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-07 06:10:19 +00:00
Kausthubh J Rao
19f01691d5
fix(api): return 409 message instead of empty JSON for wrong commit id (#37572)
## Issue
Closes #37217 

The error string was getting lost while returning due to `ctx.JSON()`
which cannot serialize the `error` object.

## Fix

Use `ctx.APIError()` to return proper error messages back to the client.
2026-05-07 02:03:08 +00:00
Kausthubh J Rao
630258410d
fix(actions): prevent panic when workflow contains null jobs (#37570)
## The issue

Closes #37568. Basically due to empty fields being present in the
actions file, the jobs would be produced as `nil` inside `jobparser.go`
. Because of this when we call `Parse` on the `jobparser` module.

```go
Needs:   job.Needs(),
```

would propagate the `nil` job down the chain. 

## The fix

For now i decide to fix it by guarding with an `if job == nil` check.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-05-07 01:36:34 +00:00
GiteaBot
cf48aa0188 [skip ci] Updated translations via Crowdin 2026-05-07 01:06:22 +00:00
wxiaoguang
a39af1a829
refactor: use modernc sqlite driver as default (#37562)
The mattn driver is still kept, can be enabled by
TAGS="sqlite_mattn sqlite_unlock_notify"

---------

Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
2026-05-06 18:57:59 +00: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
silverwind
ebc058f682
ci: increase renovate frequency and fix RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS (#37565)
1. Sync `RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS` with the recent
`renovate.json5` change (#37537) — the npm group now runs `make svg
nolyfill`, but the workflow allowlist still only matched `^make
(tidy|svg)$`, so the post-upgrade task was being rejected.
2. Bump the cron from daily at 01:00 UTC to hourly at :23, matching the
cadence of Mend's hosted Renovate App. Hourly gives sub-hour
responsiveness to dependency-dashboard checkbox interactions and
PR-close reactions; the `:23` offset avoids the GHA scheduler congestion
at multiples of 15.

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-05-06 18:37:09 +02:00
Giteabot
35dfc6b9e1
fix(deps): update go dependencies (#37541)
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-06 06:58:09 +00:00
silverwind
97211bf0c5
refactor(deps): migrate from nektos/act fork to gitea/runner (#37557)
Migrate to https://gitea.com/gitea/runner/releases/tag/v1.0.0 which
includes the `act` package directory previously referenced by
`nektos/act`.

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-06 05:54:31 +02:00
Nicolas
45ffe5aa6a
ci: lint PR titles with commitlint (#37498)
## Summary
- Enforce **Conventional Commits** on PR titles (PRs are squash-merged,
so the PR title becomes the final commit message).
- Add a local `make lint-pr-title` target so contributors can validate
titles before pushing.

## Why
We squash-merge PRs, which means the final repository history is largely
shaped by **PR titles**. Enforcing a consistent Conventional Commits
format makes:
- **Release notes & changelogs easier to generate** (types like `feat` /
`fix` can be grouped automatically).
- **History easier to scan** (uniform structure, optional scopes,
explicit breaking changes via `!`).
- **Automation more reliable** (future tooling can infer category and
scope from the title).

## PR title format
```text
type(scope)!: subject
type: one of build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test
scope: optional (e.g. web, api, actions, repo, …)
!: optional, indicates a breaking change
subject: short, imperative, no trailing period
```

## Examples
```text
feat(web): add dark mode toggle
fix(api): avoid panic when repo is missing
chore(ci): lint PR titles with commitlint
refactor(templates): reduce duplication in repo list rendering
feat!: remove legacy OAuth endpoint
```

## Local testing
```text
make deps-frontend
make lint-pr-title PR_TITLE="feat(web): add dark mode toggle"
```

---------

Signed-off-by: Nicolas <bircni@icloud.com>
Co-authored-by: nb <nb@users.noreply.local>
Co-authored-by: GPT-5.2 <gpt-5.2@openai.com>
2026-05-05 17:24:09 +00:00
wxiaoguang
a5fd8e7e86
Make ServeSetHeaders default to download attachment if filename exists (#37552)
Fix #37550
2026-05-05 16:41:49 +00:00
Kalash Thakare ☯︎
ee803ad05d
fix(actions): validate workflow param to prevent 500 error (#37546)
Fix #37523
2026-05-05 16:19:52 +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
premsreelathasugeendran
5e8004a515
docs: fix 4 typos in CHANGELOG.md (#37549)
Docs polish — pure typo fixes, nothing under `src/`.

## Files

- `CHANGELOG.md`
  - line 1386: `appearence` → `appearance`
  - line 2117: `succesfully` → `successfully`
  - line 2301: `preceeded` → `preceded`
  - line 5593: `paramater` → `parameter`

Fixes were applied from a curated correction list, with code blocks /
inline code / URLs left alone.
2026-05-05 17:25:44 +02:00
GiteaBot
c471af4266 [skip ci] Updated translations via Crowdin 2026-05-05 01:01:53 +00:00
Giteabot
62300eab3b
chore(deps): update action dependencies (#37540)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [bitnamilegacy/minio](https://redirect.github.com/bitnami/containers)
([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/minio))
| service | minor | `2021.3.17` → `2021.12.29` | |
| [bitnamilegacy/minio](https://redirect.github.com/bitnami/containers)
([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/minio))
| service | minor | `2023.8.31` → `2023.12.23` | |
| [bitnamilegacy/mysql](https://redirect.github.com/bitnami/containers)
([source](https://redirect.github.com/bitnami/containers/tree/HEAD/bitnami/mysql))
| service | minor | `8.0` → `8.4` | |
|
[renovatebot/github-action](https://redirect.github.com/renovatebot/github-action)
| action | patch | `v46.1.10` → `v46.1.12` | `v46.1.13` |

---

### Release Notes

<details>
<summary>renovatebot/github-action (renovatebot/github-action)</summary>

###
[`v46.1.12`](https://redirect.github.com/renovatebot/github-action/releases/tag/v46.1.12)

[Compare
Source](https://redirect.github.com/renovatebot/github-action/compare/v46.1.11...v46.1.12)

##### Bug Fixes

- **deps:** update dependency
[@&#8203;actions/core](https://redirect.github.com/actions/core) to
v3.0.1
([e8a6055](e8a6055d6d))

##### Documentation

- update references to renovatebot/github-action to v46.1.11
([317011a](317011a6ef))

##### Miscellaneous Chores

- **deps:** update dependency typescript-eslint to v8.59.0
([8e3560a](8e3560ab95))

##### Continuous Integration

- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.142.0
([0fee00d](0fee00dc59))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.142.1
([c7cfc88](c7cfc88250))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.144.0
([39e7d09](39e7d09c7b))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.145.0
([0bbd415](0bbd415a9c))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.146.0
([889c739](889c7399ca))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.147.0
([7addce6](7addce6f1e))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.150.0
([804ce16](804ce1618f))

###
[`v46.1.11`](https://redirect.github.com/renovatebot/github-action/releases/tag/v46.1.11)

[Compare
Source](https://redirect.github.com/renovatebot/github-action/compare/v46.1.10...v46.1.11)

##### Documentation

- update references to renovatebot/github-action to v46.1.10
([0b264d2](0b264d27f8))

##### Miscellaneous Chores

- **deps:** update actions/setup-node action to v6.4.0
([951a814](951a81487a))
- **deps:** update dependency prettier to v3.8.3
([a763833](a763833a7d))
- **deps:** update dependency typescript-eslint to v8.58.2
([119d68e](119d68e8f6))

##### Build System

- **deps:** lock file maintenance
([f82feed](f82feedb56))

##### Continuous Integration

- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.132.3
([99cc805](99cc805d75))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.133.0
([a63d39b](a63d39be1e))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.135.0
([955b000](955b0000ba))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.0
([65167cd](65167cdb3f))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.1
([7b21b86](7b21b86ced))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.3
([28a2dc0](28a2dc07b8))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.137.0
([b0cf2a4](b0cf2a4c91))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.0
([3700882](3700882c45))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.1
([f516ce2](f516ce2f92))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.3
([3411548](3411548d9c))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.0
([5201886](5201886b45))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.1
([5856263](5856263af8))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.4
([999691d](999691d7f3))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.5
([f703a54](f703a54130))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.6
([3ba85c2](3ba85c2979))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.7
([96f2f09](96f2f09b9d))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.8
([5af45e5](5af45e5b84))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.140.0
([01e9139](01e91393d3))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.0
([814a2a4](814a2a47c0))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.1
([fb3abdf](fb3abdf7fa))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.2
([e3a9af5](e3a9af55ac))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.5
([4f14b2f](4f14b2f81d))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.6
([2357784](2357784955))

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- 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=-->
2026-05-04 23:06:00 +00:00
silverwind
762154cbd7
fix: Fix nolyfill for renovate (#37537)
Run `nolyfill` as a renovate post-upgrade step alongside `make svg`, so
npm dep bumps keep `pnpm.overrides` in sync.

---
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>
2026-05-04 21:39:20 +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
Sebastian Ertz
89a49de0fd
Update go js py dependencies (#37525)
| go | from | to |
| --- | --- | --- |
| connectrpc.com/connect | `1.19.1 ` | `1.19.2` |
| github.com/Azure/go-ntlmssp | `0.1.0` | `0.1.1` |
| github.com/alecthomas/chroma/v2 | `2.23.1` | `2.24.1` |
| github.com/aws/aws-sdk-go-v2/credentials | `1.19.15` | `1.19.16` |
| github.com/aws/aws-sdk-go-v2/service/codecommit | `1.33.13` |
`1.33.14` |
| github.com/blevesearch/bleve/v2 | `2.5.7` | `2.6.0` |
| github.com/caddyserver/certmagic | `0.25.2` | `0.25.3` |
| github.com/fsnotify/fsnotify | `1.9.0` | `1.10.1` |
| github.com/getkin/kin-openapi | `0.134.0` | `0.137.0` |
| github.com/go-co-op/gocron/v2 | `2.21.0` | `2.21.1` |
| github.com/go-sql-driver/mysql | `1.9.3` | `1.10.0` |
| github.com/go-webauthn/webauthn | `0.16.5` | `0.17.2` |
| github.com/klauspost/compress | `1.18.5` | `1.18.6` |
| github.com/mattn/go-isatty | `0.0.21` | `0.0.22` |
| github.com/mattn/go-sqlite3 | `1.14.42` | `1.14.44` |
| github.com/minio/minio-go/v7 | `7.0.100` | `7.1.0` |
| github.com/redis/go-redis/v9 | `9.18.0` | `9.19.0` |
| google.golang.org/grpc | `1.80.0` | `1.81.0` |
| gopkg.in/ini.v1 | `1.67.1` | `1.67.2` |


| js | from | to |
| --- | --- | --- |
| @codemirror/search | `6.6.0` | `6.7.0` |
| @primer/octicons | `19.24.1` | `19.25.0` |
| clippie | `4.1.14` | `4.1.15` |
| easymde | `2.20.0` | `2.21.0` |
| postcss | `8.5.10` | `8.5.13` |
| rolldown-license-plugin | `3.0.1` | `3.0.4` |
| swagger-ui-dist | `5.32.4` | `5.32.5` |
| vite | `8.0.9` | `8.0.10` |
| vite-string-plugin | `2.0.2` | `2.0.4` |
| vue | `3.5.32` | `3.5.33` |
| @typescript-eslint/parser | `8.59.0` | `8.59.1` |
| eslint | `10.2.1` | `10.3.0` |
| eslint-plugin-vue | `10.8.0` | `10.9.0` |
| globals | `17.5.0` | `17.6.0` |
| material-icon-theme | `5.33.1` | `5.34.0` |
| spectral-cli-bundle | `1.0.7` | `1.0.8` |
| stylelint | `17.8.0` | `17.10.0` |
| typescript-eslint | `8.59.0` | `8.59.1` |
| updates | `17.16.3` | `17.16.8` |
| vitest | `4.1.4` | `4.1.5` |
| vue-tsc | `3.2.7` | `3.2.8` |
| pnpm | `10.33.0` | `10.33.2` |

| py | from | to |
| --- | --- | --- |
| click | `8.3.2` | `8.3.3` |
| pathspec | `1.0.4` | `1.1.1` |

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-05-04 19:27:47 +00:00
silverwind
198ef500d2
Don't unblock run-level-concurrency-blocked runs in the resolver (#37461)
Fixes #37446.

The job-status resolver in `checkJobsOfCurrentRunAttempt` only
considered `needs` and job-level concurrency when transitioning jobs out
of `Blocked`. When something drove the resolver against a run blocked
solely by workflow-level concurrency — for example, a sibling run in the
same group entering the queue and triggering `EmitJobsIfReadyByRun` —
the run's job silently became `Waiting` while another run still held the
concurrency group, and the runner could pick it up, defeating the
concurrency guarantee.

The fix bails out of the resolver when the run's latest attempt is still
blocked by run-level concurrency. `checkRunConcurrency` re-evaluates
when the holding run finishes.

Covered by a unit test
(`Test_checkJobsOfCurrentRunAttempt_RunLevelConcurrencyKeepsJobsBlocked`
in `services/actions/job_emitter_test.go`) that sets up a Running holder
attempt and a Blocked sibling attempt in the same concurrency group
directly in the DB, calls `checkJobsOfCurrentRunAttempt`, and asserts
the blocked job stays `Blocked`. Fails on master, passes with the fix.

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

---------

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
2026-05-04 11:10:42 +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
Rayan Salhab
c4c50bee7f
fix: persist mirror repository metadata (#37519)
The migration repository model now carries Website alongside Description, the GitHub/Gitea downloaders populate it, and mirror finalization persists both description and website so the About section is not empty after creating a mirror.

Fixes #37495

---------

Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-03 16:47:02 +00:00
Rayan Salhab
7016f7b37f
fix(packages): use file names for generic web downloads (#37514)
Fixes #37511.

Serve Generic package web asset downloads with the stored package filename

Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-03 15:19:21 +08:00
Jason Learst
0385e4783e
fix: merge autodetect can't close other PRs but only the last one when multiple PRs are pushed at once (#37512)
Make `getMergeCommit` correctly handle multiple commits output from `git rev-list --ancestry-path --merges ...`

Fixes #37510.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-05-02 18:40:50 +00:00
wxiaoguang
a2a5ef8d0e
Fix update branch protection order (#37508)
Regression of changed behavior or Golang JSON v2 package

Fix #37506
2026-05-02 16:32:36 +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
ThomasL
f049668c21
fix: redirect early CLI console logger to stderr (#37507)
When running `gitea dump` with output routed to stdout (--file -),
deprecation warnings from loadAvatarsFrom were written to stdout,
corrupting the archive stream.

Root cause: PrepareConsoleLoggerLevel (called in app.Before) sets up a
console logger via SetConsoleLogger, which used WriterConsoleOption{}
defaulting Stderr to false (i.e. stdout). This logger is installed
before the dump subcommand can redirect logging to stderr in runDump.

Fix: use WriterConsoleOption{Stderr: true} in SetConsoleLogger so all
early CLI diagnostic output goes to stderr from the start. This is
correct for all subcommands — diagnostic/log output should never pollute
stdout.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Nicolas <bircni@icloud.com>
2026-05-02 15:45:31 +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
GiteaBot
6b8dd90dc7 [skip ci] Updated translations via Crowdin 2026-05-02 01:02:44 +00:00
silverwind
abcfa53040
Replace olivere/elastic with REST API client, add OpenSearch support (#37411)
Drops `github.com/olivere/elastic/v7` (unmaintained) and replaces it
with a small in-house wrapper that speaks the Elasticsearch REST API
directly via `net/http`. The subset used by Gitea (`_cluster/health`,
`_bulk`, `_doc`, `_delete_by_query`, `_refresh`, `_search`, `HEAD`/`PUT`
index) is stable across the targeted servers, so no client library is
needed.

**Targets tested**
- Elasticsearch 7, 8, 9
- OpenSearch 1, 2, 3

**Why not `go-elasticsearch`?**
The official client enforces an `X-Elastic-Product` server-identity
check that OpenSearch deliberately fails, which would force shipping a
transport shim to defeat it. Going direct over `net/http` removes that
fight along with several MB of transitive deps (`elastic-transport-go`,
`go.opentelemetry.io/otel{,/metric,/trace}`, `auto/sdk`, `easyjson`,
`intern`, `logr`, `stdr`).

Replaces: #30755
Fixes: https://github.com/go-gitea/gitea/issues/30752

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

---------

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-05-02 00:12:54 +02:00
silverwind
31cee60cc7
Improve code editor text selection and clean up lint enablement (#37474)
1. Make the content area stretch the box, enabling text selection to
start over empty space.
2. Disable linter for markdown, it can never produce lint errors, this
hides the unnecessary lint gutter on markdown files.
3. Verified all languages linter enablement, all accurate.
4. Refactor `getLinterExtension` to not rely on file extensions.
5. Include jsonc/json5 extensions in regex.

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

---------

Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: Nicolas <bircni@icloud.com>
2026-05-01 17:41:31 +00: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
Lunny Xiao
48cea1fb79
Fix basic auth bug (#37486) 2026-04-30 20:34:43 -07:00
wxiaoguang
1721c235a7
Refactor CI workflows (#37487)
1. only trigger docker-dryrun arm64&riscv64 when dockerfile changes
2. de-duplicate "contents: read" permission for most workflows
3. merge various "lint-*" jobs into one job
4. add missing lint targets to the "lint" (all) target
2026-05-01 02:15:01 +08: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
GiteaBot
52d6baf5a8 [skip ci] Updated translations via Crowdin 2026-04-30 01:05:39 +00: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
silverwind
d57d06335d
Refactor integration tests infrastructure (#37462)
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-29 16:37:38 +00:00
wxiaoguang
9262803621
Fix allow maintainer edit permission check (#37479) 2026-04-29 15:37:33 +00:00
Myers Carpenter
9e031eb3df
Serve OpenAPI 3.0 spec at /openapi.v1.json (#37038)
Add a build-time conversion step that transforms the existing Swagger
2.0 spec into an OpenAPI 3.0 spec. The OAS3 spec is served alongside the
existing Swagger 2.0 spec, enabling API clients that require OAS3 to
generate code directly from Gitea's API.

This is not to be an answer to how gitea handles OAS3 long term,
but a way to use what we have to move a step forward.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-04-29 20:47:52 +08:00
Myers Carpenter
18762c7748
Batch-load related data in actions run, job, and task API endpoints (#37032)
Avoid per-item DB queries in ListRuns, ListJobs, and ListActionTasks by
batch-loading trigger users, repositories, and task attributes before
the conversion loop. Remove ReferencesGitRepo from the /actions route
group since no task/run endpoints use it.

Added tests for these endpoints as well.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.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-29 08:39:43 +00:00
0xGREG
0ba862cb97
Add DEFAULT_TITLE_SOURCE setting for pull request title default behavior (#37465)
Adds a new `DEFAULT_TITLE_SOURCE` option under
`[repository.pull-request]` with three values:

- `first-commit` (default): uses the oldest commit summary, current
behavior since v1.26
- `auto`: normalizes branch name as title for multi-commit PRs (just
like GitHub), use commit summary for single-commit PRs

Closes: #37463
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>
Co-authored-by: Nicolas <bircni@icloud.com>
2026-04-28 21:33:20 +00:00