Commit Graph

20754 Commits

Author SHA1 Message Date
jmiller ef6a7dcfcf Merge pull request 'feat(repo): enforce dot-prefixed repos as always-private system repos' (#77) from feature/system-repo-private into main 2026-05-13 00:16:12 +00:00
Jonathan Miller c5eb8df8a2 feat(repo): enforce dot-prefixed repos as always-private system repos
compliance / files-changed (pull_request) Successful in 2m48s
pr-title / lint-pr-title (pull_request) Successful in 5s
db-tests / files-changed (pull_request) Successful in 2m53s
docker-dryrun / files-changed (pull_request) Successful in 3m7s
e2e-tests / files-changed (pull_request) Successful in 3m8s
compliance / lint-on-demand (pull_request) Successful in 1m23s
compliance / lint-backend (pull_request) Failing after 4m50s
compliance / frontend (pull_request) Has been skipped
compliance / checks-backend (pull_request) Failing after 5m20s
compliance / backend (pull_request) Failing after 4m15s
db-tests / test-pgsql (pull_request) Failing after 4m7s
db-tests / test-sqlite (pull_request) Failing after 4m29s
db-tests / test-unit (pull_request) Failing after 5m53s
db-tests / test-mysql (pull_request) Failing after 5m21s
docker-dryrun / container-amd64 (pull_request) Has been skipped
docker-dryrun / container-arm64 (pull_request) Has been skipped
docker-dryrun / container-riscv64 (pull_request) Has been skipped
db-tests / test-mssql (pull_request) Failing after 6m30s
e2e-tests / test-e2e (pull_request) Failing after 4m53s
compliance / lint-go-gogit (pull_request) Failing after 33m59s
compliance / lint-go-windows (pull_request) Failing after 33m59s
Repositories with names starting with "." are now treated as system
repositories that are always private and cannot be made public. This is
enforced at every code path: API create, web create, migrate, template
create, push-to-create, API edit, web settings, and public access
settings. On creation paths, privacy is silently forced. On edit paths,
a clear error is returned.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 19:12:00 -05:00
jmiller 32955397f0 Merge pull request 'release: promote dev to main — org branch protection & help URLs' (#73) from dev into main 2026-05-12 20:26:19 +00:00
jmiller 71105345ff Merge pull request 'feat(org): add org-level branch protection rulesets & configurable help URLs' (#72) from feature/org-branch-protection into dev
compliance / files-changed (pull_request) Failing after 17m47s
compliance / lint-on-demand (pull_request) Has been skipped
docker-dryrun / files-changed (pull_request) Failing after 27m34s
db-tests / files-changed (pull_request) Failing after 27m41s
e2e-tests / files-changed (pull_request) Successful in 10s
pr-title / lint-pr-title (pull_request) Failing after 13s
compliance / lint-backend (pull_request) Has been skipped
compliance / lint-go-windows (pull_request) Has been skipped
compliance / lint-go-gogit (pull_request) Has been skipped
compliance / checks-backend (pull_request) Has been skipped
compliance / frontend (pull_request) Has been skipped
compliance / backend (pull_request) Has been skipped
e2e-tests / test-e2e (pull_request) Failing after 2m17s
db-tests / test-pgsql (pull_request) Has been cancelled
db-tests / test-sqlite (pull_request) Has been cancelled
db-tests / test-unit (pull_request) Has been cancelled
db-tests / test-mysql (pull_request) Has been cancelled
db-tests / test-mssql (pull_request) Has been cancelled
docker-dryrun / container-amd64 (pull_request) Has been cancelled
docker-dryrun / container-arm64 (pull_request) Has been cancelled
docker-dryrun / container-riscv64 (pull_request) Has been cancelled
2026-05-12 20:24:14 +00:00
Jonathan Miller e50e8ed851 feat(admin): add configurable Help/Support URLs and version convention
db-tests / files-changed (pull_request) Successful in 6s
docker-dryrun / files-changed (pull_request) Successful in 7s
labeler / labeler (pull_request_target) Successful in 11s
pr-title / lint-pr-title (pull_request) Successful in 3m9s
compliance / files-changed (pull_request) Successful in 3m57s
e2e-tests / files-changed (pull_request) Successful in 3m9s
db-tests / test-pgsql (pull_request) Failing after 3m26s
db-tests / test-sqlite (pull_request) Failing after 3m39s
db-tests / test-mysql (pull_request) Failing after 8m16s
docker-dryrun / container-amd64 (pull_request) Has been skipped
docker-dryrun / container-arm64 (pull_request) Has been skipped
docker-dryrun / container-riscv64 (pull_request) Has been skipped
db-tests / test-mssql (pull_request) Failing after 7m59s
compliance / lint-on-demand (pull_request) Successful in 2m33s
compliance / lint-go-windows (pull_request) Failing after 3m9s
compliance / lint-go-gogit (pull_request) Failing after 3m12s
compliance / frontend (pull_request) Has been skipped
compliance / checks-backend (pull_request) Failing after 3m5s
compliance / backend (pull_request) Failing after 2m55s
e2e-tests / test-e2e (pull_request) Failing after 3m3s
db-tests / test-unit (pull_request) Failing after 28m41s
compliance / lint-backend (pull_request) Failing after 55m37s
- Add HELP_URL and SUPPORT_URL settings to app.ini (defaults to docs.gitea.com)
- Replace hardcoded docs.gitea.com in navbar with configurable HelpURL
- Expose HelpURL/SupportURL template functions
- Show Help URL and Support URL in Site Admin > Configuration
- Add locale strings for new admin config entries
- Create VERSION file (gitignored) for local builds with 1261.0.0 convention

The 1261.xx.xx version convention marks the fork starting point from
upstream Gitea. Set via VERSION file locally or GITEA_VERSION env in CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 15:11:49 -05:00
Jonathan Miller 3396440926 feat(org): add org-level branch protection rulesets
Add organization-scoped branch protection rules that cascade to all
repos within the org. Repo-level rules take precedence; org rules
serve as the fallback when no repo rule matches a branch.

- New table: org_protected_branch (migration v332)
- OrgProtectedBranch model with full CRUD operations
- API endpoints: GET/POST/PATCH/DELETE /api/v1/orgs/{org}/branch_protections
- Inheritance via GetFirstMatchProtectedBranchRule() fallback
- InheritedFrom field added to BranchProtection API response
- Org rules use team-based whitelists (no per-user IDs at org level)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-12 15:02:41 -05:00
jmiller e2e1073f10 chore: add PR branch policy check workflow [skip ci] 2026-05-11 17:15:48 +00:00
jmiller c2eb430d3a docs: update README from wiki Home
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
2026-05-10 18:39:37 +00:00
Jonathan Miller 809e9d2bf3 feat(api): add custom fields on issues
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
New tables: custom_field_definition, custom_field_value
Supports field types: text, number, date, dropdown, checkbox

Endpoints:
- GET/POST /repos/{owner}/{repo}/custom-fields
- GET/PATCH/DELETE /repos/{owner}/{repo}/custom-fields/{fieldId}
- GET /repos/{owner}/{repo}/issues/{index}/custom-fields
- PUT /repos/{owner}/{repo}/issues/{index}/custom-fields/{fieldId}
- DELETE /repos/{owner}/{repo}/issues/{index}/custom-fields/{fieldId}

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 22:37:43 -05:00
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`](https://github.com/conventional-changelog/commitlint/tree/868983c18efcb6fa835197cc9b2275545e528ad4/%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
https://github.com/go-gitea/gitea/commit/2644bb8490e7d6e3be5c4548b02c76eacd196569,
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](https://redirect.github.com/renovatebot/github-action/commit/e8a6055d6d0dc2ca2280adc33c7b58f3fb124d12))

##### Documentation

- update references to renovatebot/github-action to v46.1.11
([317011a](https://redirect.github.com/renovatebot/github-action/commit/317011a6efe6b58d6056f58ca8b431233eb718ab))

##### Miscellaneous Chores

- **deps:** update dependency typescript-eslint to v8.59.0
([8e3560a](https://redirect.github.com/renovatebot/github-action/commit/8e3560ab95742bc3c7aaec7c2dd1cc3d0d276ae5))

##### Continuous Integration

- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.142.0
([0fee00d](https://redirect.github.com/renovatebot/github-action/commit/0fee00dc59830af7f44ea0636b251550e54f5003))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.142.1
([c7cfc88](https://redirect.github.com/renovatebot/github-action/commit/c7cfc8825059e6fa4bd036b39a06e0477d58f403))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.144.0
([39e7d09](https://redirect.github.com/renovatebot/github-action/commit/39e7d09c7b2ce19c8c834ffe556e9965c119c885))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.145.0
([0bbd415](https://redirect.github.com/renovatebot/github-action/commit/0bbd415a9c49a001a228460b287027d8a3739e8a))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.146.0
([889c739](https://redirect.github.com/renovatebot/github-action/commit/889c7399cadabbf2657b872978141f03c9376640))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.147.0
([7addce6](https://redirect.github.com/renovatebot/github-action/commit/7addce6f1e02342b36c2cb1a66db30345a2f109d))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.150.0
([804ce16](https://redirect.github.com/renovatebot/github-action/commit/804ce1618f0c132478fd9c086d6febd009a723d0))

###
[`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](https://redirect.github.com/renovatebot/github-action/commit/0b264d27f89fd1eb163fba418b0dbfe86c041395))

##### Miscellaneous Chores

- **deps:** update actions/setup-node action to v6.4.0
([951a814](https://redirect.github.com/renovatebot/github-action/commit/951a81487afda3e08b127fef395e29498fd9d06c))
- **deps:** update dependency prettier to v3.8.3
([a763833](https://redirect.github.com/renovatebot/github-action/commit/a763833a7d8da309d202e5fc67bc794efc7dc115))
- **deps:** update dependency typescript-eslint to v8.58.2
([119d68e](https://redirect.github.com/renovatebot/github-action/commit/119d68e8f6114a37630c0a3a61aac696d593aa52))

##### Build System

- **deps:** lock file maintenance
([f82feed](https://redirect.github.com/renovatebot/github-action/commit/f82feedb561edc809d01476b568febf8d256a51a))

##### Continuous Integration

- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.132.3
([99cc805](https://redirect.github.com/renovatebot/github-action/commit/99cc805d7583672991fd1bfe2ce488eac225f8f0))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.133.0
([a63d39b](https://redirect.github.com/renovatebot/github-action/commit/a63d39be1e95f4aaa26c72acbdf1c65673468261))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.135.0
([955b000](https://redirect.github.com/renovatebot/github-action/commit/955b0000ba399f944be088f7a4409a4c8fc0b699))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.0
([65167cd](https://redirect.github.com/renovatebot/github-action/commit/65167cdb3f2b345241ea67249f4b238934933bcc))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.1
([7b21b86](https://redirect.github.com/renovatebot/github-action/commit/7b21b86cedd4f06966dca17027c7c67625e599cd))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.136.3
([28a2dc0](https://redirect.github.com/renovatebot/github-action/commit/28a2dc07b816f5893a6496d35b4b02742445c3c4))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.137.0
([b0cf2a4](https://redirect.github.com/renovatebot/github-action/commit/b0cf2a4c9132b74c57aae8fcbb45a6aacd414022))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.0
([3700882](https://redirect.github.com/renovatebot/github-action/commit/3700882c45d6eda087650c0edc72ba408f5b7a2e))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.1
([f516ce2](https://redirect.github.com/renovatebot/github-action/commit/f516ce2f9261f68e96edd1499111ddb5077033bb))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.138.3
([3411548](https://redirect.github.com/renovatebot/github-action/commit/3411548d9c9b822a7473c563535824c03a19df6a))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.0
([5201886](https://redirect.github.com/renovatebot/github-action/commit/5201886b45291615a4f0b21fd08181cfe8123ba6))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.1
([5856263](https://redirect.github.com/renovatebot/github-action/commit/5856263af8004562a8d50daf5c18b7a1a71920f8))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.4
([999691d](https://redirect.github.com/renovatebot/github-action/commit/999691d7f3780b09bcd4e90e081bbce6b452ab25))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.5
([f703a54](https://redirect.github.com/renovatebot/github-action/commit/f703a541309bb776377323a91735fa747d6efc39))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.6
([3ba85c2](https://redirect.github.com/renovatebot/github-action/commit/3ba85c2979436007460d9ccf3f87bd0a4ef5e1ea))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.7
([96f2f09](https://redirect.github.com/renovatebot/github-action/commit/96f2f09b9d7c8e6946b489aab3ca6f713a3bfbdc))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.139.8
([5af45e5](https://redirect.github.com/renovatebot/github-action/commit/5af45e5b84b145ee1e14929493f8f054d922b441))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.140.0
([01e9139](https://redirect.github.com/renovatebot/github-action/commit/01e91393d3c71fe95aec074539d4a0d9dc57068b))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.0
([814a2a4](https://redirect.github.com/renovatebot/github-action/commit/814a2a47c0d23dad8d1f7302ade33a5bd966a8c7))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.1
([fb3abdf](https://redirect.github.com/renovatebot/github-action/commit/fb3abdf7fa349ce51fd43364aa917f213f4d476c))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.2
([e3a9af5](https://redirect.github.com/renovatebot/github-action/commit/e3a9af55ac512810165fe6f630d88fa4b02f0dca))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.5
([4f14b2f](https://redirect.github.com/renovatebot/github-action/commit/4f14b2f81dd01dfd999aed7088db38a5e8042f08))
- **deps:** update ghcr.io/renovatebot/renovate docker tag to v43.141.6
([2357784](https://redirect.github.com/renovatebot/github-action/commit/23577849552717b7ae5cdbb05082e5cc99e25dce))

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