Commit Graph
25191 Commits
Author SHA1 Message Date
Renovate BotandGusted f46a6b80f5 Update CodeMirror to v6.20.3 (forgejo) (#12983)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12983
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-07 23:52:03 +02:00
c956dae73d feat: adds option to force overwrite new branch for /contents route (#12663)
Adds an option "force_overwrite_new_branch" when posting to
/repos/{owner}/{repo}/contents to modify multiple files in a repository.
When user provides both "branch" and "new_branch" options, and
"new_branch" already exists, the "force_overwrite_new_branch" option
allows the user to overwrite the existing branch. Under the hood this
amounts to a "git push --force".

[Issue #12600](https://codeberg.org/forgejo/forgejo/issues/12600)

### Tests for Go changes

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
  - [x] `make pr-go` before pushing

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.
- [x] API swagger docs updated

### Release notes

- [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.

Co-authored-by: Rob Gonnella <rob.gonnella@papayapay.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12663
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-06 16:45:57 +02:00
oliverpoolandMathieu Fenniak b1b47e64d7 fix(doctor): ensure the doctor runs with the same settings.AppPath as Forgejo (#12901)
Attempt to address #11705 and #11028.

The docker container runs gitea by default: https://codeberg.org/forgejo/forgejo/src/commit/1d1215108681790f3333a19cf2b03a03b5df48ae/docker/root/etc/s6/gitea/run

Whereas a user might run `forgejo doctor ...` (which is symlinked to gitea).

So the doctor expects a different value for the authorized_keys command.

This fix does the opposite of syncAppConfForGit: it fetches the `AppPath` from the database to ensure it is the same as forgejo:
https://codeberg.org/forgejo/forgejo/src/commit/1d1215108681790f3333a19cf2b03a03b5df48ae/routers/init.go#L76-L87

### Testing

1. Make a symlink called `forgejo`, pointing to gitea `ln -s gitea forgejo`
2. Run `./gitea` and add a ssh key to a user
3. Stop `./gitea`
4. Run `./forgejo doctor check --run authorized-keys`

Without this fix, the last command should fail.
With the fix, the last command should succeed and print:
```
- [I] AppPath changed from '/home/forgejo/forgejo' to '/home/forgejo/gitea'
```

- I ran...
  - [x] `make pr-go` before pushing

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.

*The decision if the pull request will be shown in the release notes is up to the mergers / release team.*

The content of the `release-notes/<pull request number>.md` file will serve as the basis for the release notes. If the file does not exist, the title of the pull request will be used instead.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12901
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-06 03:23:06 +02:00
Renovate BotandGusted 3005420885 Update actions/setup-forgejo to v3.2.1 (forgejo) (#12965)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12965
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-06 01:58:44 +02:00
Renovate BotandGusted 4be93d6647 Pin dependencies (forgejo) (#12964)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12964
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-06 01:58:27 +02:00
Renovate Bot 55f480b64a Update dependency forgejo/release-notes-assistant to v1.7.2 (forgejo) (#12924) 2026-06-05 12:45:11 +02:00
Renovate BotandGusted 18f12ee159 Pin dependencies (forgejo) (#12941)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12941
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-05 11:23:21 +02:00
Dylan Weijgertzeand0ko 3e1cc4e993 fix(ui): improve contrast of checkboxes in markup (#12928)
Improve checkbox contrast inside of `.markup` as per #12647.

| Before | After |
|---|----------------------|
| `var(--color-secondary)` | `var(--color-secondary-dark-4)` |
| <img src="/attachments/21a20e56-0120-4568-9ffb-387a99ade090" width="300" /> | <img src="/attachments/69763fee-c3f2-4a98-90a0-b416137fcb64" width="300" /> |
| ![image](/attachments/7f300c2e-58e4-42f3-be3f-fba52dbe8fdb) | ![image](/attachments/9bb332ae-6895-4662-978e-b08aa02f3f40) |
| ![image](/attachments/b166574b-6b65-4e15-83a8-8b8c8a70de0c) | ![image](/attachments/e055ef28-f1a3-45d5-90f3-4a5bc4c20b38) |

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12928
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-05 09:18:02 +02:00
CloudsandGusted 044f3d95b6 chore: re-enable nilnil lint for models/actions/task.go (#12768)
I added sentinel error values for jobs not being found and no jobs being updated by the `CreateTaskForRunner` function. This avoids the nilnil antipattern and allows the nilnil lint to be enabled for the `models/actions/task.go` file again.

The handling of these new errors was added to the `PickTask` function in `services/actions/task.go`.

Related issue: https://codeberg.org/forgejo/forgejo/issues/11261

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12768
Reviewed-by: limiting-factor <limiting-factor@noreply.codeberg.org>
Reviewed-by: elle <0xllx0@noreply.codeberg.org>
2026-06-05 01:38:23 +02:00
Renovate BotandGusted 2394f1a4e4 Update vitest monorepo to v4.1.8 (forgejo) (#12894)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12894
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-05 00:54:11 +02:00
Renovate BotandGusted fc09cf1a33 Update forgejo/forgejo-build-publish to v5.7.1 (forgejo) (#12925)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12925
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-05 00:38:31 +02:00
Renovate Bot 4c15c13ad6 Update actions/setup-forgejo to v3.2.0 (forgejo) (#12926) 2026-06-04 19:45:07 +02:00
Renovate BotandMathieu Fenniak e2c2aa446f Pin dependencies (forgejo) (#12923)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [https://data.forgejo.org/actions/cache](https://github.com/actions/cache) | action | pin | `v5` → `v5.0.5` |
| [https://data.forgejo.org/actions/cascading-pr](https://code.forgejo.org/actions/cascading-pr) | action | pinDigest |  → `b52d5b1` |
| [https://data.forgejo.org/actions/checkout](https://github.com/actions/checkout) | action | pin | `v6` → `v6.0.3` |
| [https://data.forgejo.org/actions/git-backporting](https://code.forgejo.org/actions/git-backporting) | action | pinDigest |  → `08da0b0` |
| [https://data.forgejo.org/actions/setup-forgejo](https://code.forgejo.org/actions/setup-forgejo) | action | pinDigest |  → `650f7cf` |
| [https://data.forgejo.org/actions/setup-go](https://github.com/actions/setup-go) | action | pin | `v6` → `v6.4.0` |
| [https://data.forgejo.org/actions/setup-node](https://github.com/actions/setup-node) | action | pin | `v6` → `v6.4.0` |
| [https://data.forgejo.org/forgejo/forgejo-build-publish](https://code.forgejo.org/forgejo/forgejo-build-publish) | action | pinDigest |  → `970e852` |
| [https://data.forgejo.org/forgejo/set-milestone](https://code.forgejo.org/forgejo/set-milestone) | action | pinDigest |  → `4010c1a` |
| [https://data.forgejo.org/forgejo/upload-artifact](https://code.forgejo.org/forgejo/upload-artifact) | action | pin | `v5` → `v5` |
| [https://data.forgejo.org/infrastructure/issue-action](https://code.forgejo.org/infrastructure/issue-action) | action | pinDigest |  → `c668390` |
| [https://data.forgejo.org/infrastructure/next-digest](https://code.forgejo.org/infrastructure/next-digest) | action | pinDigest |  → `e220261` |
| [https://data.forgejo.org/tj-actions/changed-files](https://github.com/tj-actions/changed-files) | action | pin | `v47` → `v47.0.6` |

Add the preset `:preserveSemverRanges` to your config if you don't want to pin your dependencies.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)

🚦 **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://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://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDguMiIsInVwZGF0ZWRJblZlciI6IjQzLjIwOC4yIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12923
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-04 16:09:32 +02:00
Michael KrieseandMichael Kriese fa1a427e82 ci: remove tmpfs usage (#12929)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12929
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org>
2026-06-04 10:43:55 +02:00
steven.guiheuxandMathieu Fenniak 6a27eb051d feat(api,ui): add multiline comment on pullrequest (#12582)
Closes https://codeberg.org/forgejo/forgejo/issues/6093

This PR adds support for **multi-line review comments** on pull requests, allowing reviewers to select a range of lines in diffs instead of only a single line — similar to GitHub's implementation.

### Tests for Go changes

- I added test coverage for Go changes...
  - [X] in their respective `*_test.go` for unit tests.
  - [X] `make pr-go` before pushing

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12582
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-03 16:06:29 +02:00
Gustedand0ko f576a1a21e feat: remove no-transform in Cache-Control header. (#12905)
First, why was this header here in the first place? Cloudflare!
Cloudflare had a optimization setting called "auto-minfy" and would
minify HTML,JS,CSS - this included removing extra whitespaces from
`<code>` elements. That's a problem because files are shown per-line
with a `<code>` element and thus results in indentation being completely
gone. Gitea added a FAQ entry for this [1], but on the same day decided
to add the workaround in Gitea, the `no-transform` header [2].

I can't find a reference of this option and some posts suggests it's
been removed. Thus it no longer serves a need to be present in Forgejo.
That wasn't my intentional motivation to remove this. This header is
also causing that HAProxy will not compress responses [3] from Forgejo
which is not ideal for Codeberg, this behavior cannot be turned off or
be worked around.

Potential risk, some other CDN or some other Cloudflare option might
still do this removal of whitespace in `<code>` HTML tags, it seems
better to disable the feature than to have Forgejo add a header which is
also causing other side-effects. I'm not aware of this another CDN of
Cloudflare option so I don't want to mark it as breaking.

[1]: https://github.com/go-gitea/gitea/pull/20430
[2]: https://github.com/go-gitea/gitea/pull/20432
[3]: https://docs.haproxy.org/3.3/configuration.html#:~:text=the%20response%20contains%20the%20%22no-transform%22%20value%20in%20the%20%22Cache-control%22%20%20%20%20%20header

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12905
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-03 05:38:47 +02:00
Renovate BotandGusted 377c455062 Update module github.com/jackc/pgx/v5 to v5.10.0 (forgejo) (#12914)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12914
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-03 04:28:30 +02:00
Renovate BotandGusted eda4c387b8 Update go-openapi packages to v0.22.5 (forgejo) (#12909)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12909
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-03 02:48:14 +02:00
Renovate Bot 4bdb8f9b6a Update golang packages to v1.26.4 (forgejo) (#12908) 2026-06-03 02:21:47 +02:00
Mathieu FenniakandMathieu Fenniak 1ad2164948 chore: add more error output for an invalid JWT key identifier (#12903)
`TestAPIAuthWithAuthorizedIntegration` has [occasionally failed](https://codeberg.org/forgejo/forgejo/actions/runs/166572/jobs/8/attempt/1#jobstep-4-2101) in the integration test steps with the unexpected output  `authorized integration: parse JWT error: token is unverifiable: error while executing keyfunc: no key identified`.  This indicates that the authorized integration being tested was fully validated until the JWT signature, but the signature was not accessible from the JWKS remote, which is hosted within the integration test.  This doesn't seem to make sense to me.

This PR extends "no key identified" to indicate what key came from the JWT, and what keys were present in the JWKS file, so that I can see why they're not matching.  This information could be generally useful in a 401 error when trying to understand authorized integration failures and doesn't pose a security risk as the keys are public information.

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. All work and communication must conform to Forgejo's [AI Agreement](https://codeberg.org/forgejo/governance/src/branch/main/AIAgreement.md). There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests for Go changes

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
  - [ ] `make pr-go` before pushing

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [x] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12903
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-02 23:39:51 +02:00
Yashwanth Rathakrishnanand0ko cce8152879 feat(ui): commit view redesign for pull request page (#7948)
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7948
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-02 20:12:32 +02:00
Renovate Bot 1d12151086 Update module github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker to v3.7.0 (forgejo) (#12896) 2026-06-02 16:04:13 +02:00
0koandGusted eb76582261 chore(e2e): refactor "Toggle visibility" org-members test (#12871)
This test fails very often in CI. This should hopefully improve it.

With a downclocked CPU I've got 2 errors in 10 tries. After adding

```
await page.waitForLoadState();
```

I got no errors in 20 tries. But my testing methodology is unreliable so there's no guarantee that this helps:
* `Locator.click()` documentation says that it already waits by default for caused navigation to finish
* I added some `date` time measurement and `waitForLoadState` was clocking in about 5-15 ms, which shouldn't be causing the issue for `expect` that times out in 3000ms
...but e2e issues were `element(s) not found` on timeout, not wrong state, so my assumption is that somehow it is asserting the wrong snapshot of a page that isn't fully loaded

Additionally, I've converted _revertion_ logic to _make consistent before testing_, which is better at handling test retries in case that the _revertion_ part of the code was never ran in previous failure. In such case test retry is guaranteed to fail as well, at least when testing locally, not sure about CI.

Additionally, a completely unrelated comment fix in Playwright config.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12871
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-02 14:52:01 +02:00
Renovate BotandGusted 667479c7b0 Update dependency @google/model-viewer to v4.3.0 (forgejo) (#12895)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12895
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-02 14:45:57 +02:00
Renovate Bot cbf653dad2 Update linters (forgejo) (#12893) 2026-06-02 14:10:40 +02:00
Renovate BotandGusted c4520693aa Update module github.com/SaveTheRbtz/zstd-seekable-format-go/pkg to v0.9.0 (forgejo) (#12884)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12884
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-02 12:51:52 +02:00
oliverpoolandGusted d11bd64691 refactor(tests): drop the need to compile gitea binary manually (#12855)
Thanks to forgejo/forgejo!10397 (by @voidcontext), the binary called on git hooks can now be dynamically set.

**This means that we can now run tests without needing to run `make gitea` first**! No more `Could not find gitea binary` or head-banging, when one forgets to re-compile it 🎉

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12855
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-02 00:04:50 +02:00
Andreas Ahlenstorfand0ko f102bc2b51 chore: mention CoC and highlight AI agreement in CONTRIBUTING.md (#12867)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12867
Reviewed-by: crystal <crystal@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-01 16:17:35 +02:00
onebitboyand0ko 56fac334cc fix(ui): typo fix (#12870)
This removes a wrong comma in the English `visibility_description` string.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12870
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-01 16:17:09 +02:00
Antonin DelpeuchandMathieu Fenniak 19e1f58144 fix: adjust workflow link for pull_request_target workflow runs (#12734)
Fixes #12660, reported by @mahlzahn.

### Tests for Go changes

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
  - [ ] <s>`make pr-go` before pushing</s> because the OOM killer kills it before it does anything useful

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12734
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-01 15:03:29 +02:00
Renovate Bot 2e8380025c Update vitest monorepo to v4.1.7 (forgejo) (#12860) 2026-06-01 14:29:13 +02:00
Dylan Weijgertzeand0ko f1622c4e85 fix(ui): adjust sidebar distances and remove empty p elements (#12864)
I removed the empty `p` elements for accessibility as mentioned in this https://codeberg.org/forgejo/forgejo/pulls/12786#issuecomment-16247117. I also adjusted the spacing for the "reference" text with the divider to have the copy button have the same spacing as other buttons.

## Testing

Navigate to an issue and observe the spacing of the time tracker, reference and dependencies sections.

<table style="width:100%">
  <tr>
    <td>Before</td>
    <td>After</td>
  </tr>
  <tr>
    <td><img width="250" src="/attachments/a4e14050-1d14-457c-9d4f-ec9ac1ae3bcc" /></td>
    <td><img width="250" src="/attachments/3ab4445c-9f14-49d7-ac77-a7d69e914e58" /></td>
  </tr>
</table>

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12864
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-01 12:14:01 +02:00
oliverpoolandGusted 216ff5c8fd refactor(tests): use forgery.CreateRepository in more places (#12555)
Followup of #11356 to convert `tests.CreateDeclarativeRepo` to `forgery.CreateRepository` (34 occurrences remaining after this PR - 39 occurrences replaced here).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12555
Reviewed-by: limiting-factor <limiting-factor@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-01 11:59:05 +02:00
Renovate BotandGusted dcccb8baee Update dependency webpack-cli to v7.0.3 (forgejo) (#12839)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12839
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-01 11:12:47 +02:00
Renovate Bot 08f399172c Update dependency @vue/test-utils to v2.4.10 (forgejo) (#12858) 2026-06-01 11:12:09 +02:00
Renovate Bot 167f022e8f Update renovate Docker tag to v43.205.2 (forgejo) (#12857) 2026-06-01 11:10:19 +02:00
Renovate BotandGusted 3b7620ff43 Update dependency @stoplight/spectral-cli to v6.16.0 (forgejo) (#12861)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12861
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-01 11:09:42 +02:00
Renovate BotandGusted 95602c7625 Update dependency vite-string-plugin to v2.0.4 (forgejo) (#12859)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12859
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-01 11:09:13 +02:00
oliverpoolandGusted ee846b3c96 cleanup(tests): remove unused git hooks directories in testdata (#12824)
Since forgejo/forgejo!10397 and forgejo/forgejo!12335 have landed, there shouldn't be a need for the `hooks` directory in each repository.

This PR cleans up the `tests/gitea-repositories-meta/*` testdata.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12824
Reviewed-by: limiting-factor <limiting-factor@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-05-31 20:24:25 +02:00
Renovate BotandGusted 2214be7f77 Update dependency @playwright/test to v1.60.0 (forgejo) (#12849)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12849
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-05-31 20:20:28 +02:00
Renovate Bot ba3f54b283 Update linters (forgejo) (#12848) 2026-05-31 18:09:30 +02:00
oliverpoolandGusted 8c3c3ca5db refactor(forgery): CreateProject helper to reduce dependency on global fixture when testing (#12796)
While working on #11356, I noticed https://codeberg.org/forgejo/forgejo/pulls/9906#issuecomment-10826066 which could have benefited from a `forgery.CreateProject` helper.
Since this helper wasn't available, the PR had to:
- adjust the global `project.yml` fixture
- fix the unrelated `models/project/project_test.go`, because of the fixture update

So 2/4 changed files in the PR were due to the usage of global fixtures.

This PR attempts at fixing this.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12796
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Antonin Delpeuch <wetneb@noreply.codeberg.org>
2026-05-31 16:46:54 +02:00
Renovate Bot ff38c2ba7c Update dependency @vitejs/plugin-vue to v6.0.7 (forgejo) (#12847) 2026-05-31 16:20:17 +02:00
Renovate Bot 74e8029ef7 Update dependency @axe-core/playwright to v4.11.3 (forgejo) (#12846) 2026-05-31 16:15:16 +02:00
0koandGusted 5f9745978a chore: update codeowners (#12844)
Make my frontend entry more scoped. I hope that having my notifications not overflowing could allow me to handle reviews more efficiently.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12844
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-05-31 14:42:17 +02:00
oliverpoolandGusted fcce196fb8 fix(git): treat missing hooks folder the same as missing hook file (#12833)
Extracted from #12824 on suggestion of @limiting-factor; refactored after @Gusted pointed out forgejo/forgejo!12335.

Behavior change: previously a missing `hooks` folder in a repository tree (should not happen before forgejo/forgejo!12335) would return a 500 on `/api/v1/repos/%s/hooks/git`. It now returns a 200, with the same reply as an empty `hooks` folder.

Test has been added to ensure correct handling of missing `hooks` folder and of its creation if necessary.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12833
Reviewed-by: limiting-factor <limiting-factor@noreply.codeberg.org>
2026-05-31 14:41:28 +02:00
Robert Wolffand0ko 3bee4ce24e fix(ui): adjust distances and remove a divider in the issue sidebar (#12786)
Some minor changes: coherent distances between heading and descriptions, drop a divider between time tracking related sections.

### Test

1. Go to an issue, add some time tracking and potentially dependencies.
2. Observe improved distances with a user with and once with a user without write permission.

The content of the `release-notes/<pull request number>.md` file will serve as the basis for the release notes. If the file does not exist, the title of the pull request will be used instead.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12786
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-05-31 10:11:17 +02:00
Mathieu FenniakandGusted e6119b89c3 fix: remove duplicate indexes in package_blob table (#12836)
Table `package_blob` has both unique indexes, and standard indexes, defined on each of its hash columns.  This PR removes the standard indexes and leaves just the unique indexes, which will reduce disk space usage and improve performance on writing to the table.

Manual testing: confirmed that the indexes are removed by inspecting the database table in my dev environment before and after the migration.

I've reviewed other database tables for similar situations where a unique index is present and non-unique indexes are present but therefore not needed.  I've found no other cases.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12836
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org>
2026-05-30 20:59:46 +02:00
Robert WolffandGusted ef44b777f4 fix: hide some disallowed actions that lead to 404 errors in archived repos (#12773)
This
1. hides the “New issue” button, which currently leads to a 404 page, because it is not useful to have it, e.g., here: https://code.forgejo.org/forgejo/act/issues/169
2. removes the UI ability on projects in archived repos to move around issues and project columns. When a user performs such an action, currently it is shown as it were successful, but actually all requests lead to 404s without warning.
3. hides the hints for synching a fork or creating a pull request for recently pushed branches (which again would lead to 404s)
4. hides the branch selector (only shows the branch) on single issue/PR pages, which is disfunctional on archived repos

Thus, both these changes do not change anything related to what happens to issues or projects in archived repos, but only reduces 404 errors.

I don’t think this needs to be tested more than manually.

## Test

Create first a repository with at least **one issue** in **one project** and edit a file by creating a **new branch**. Then, perform following actions, once in the state where the repository is normal and once when it is archived:

action|unarchived|archived
---|---|---
\1. go to the issue|“New issue” button functional|“New issue” button removed
\2. click on the branch selector|menu opens|menu is now disabled and shows the branch
\3. go to the project|“New issue” button functional|“New issue” button removed
\4. try to move around columns|modifies columns|not possible anymore
\5. try to move around the issue|modifies issue location|not possible anymore
\6. go to the code view|see hint "You pushed …"|do not see this hint anymore

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12773
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-05-30 14:02:33 +02:00
Gabor PihajandGusted efa3f4e2b2 feat: prevent default git templates to be created (#12335)
Prevent examples hooks, description file, and other files from the default template to be created during git init.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12335
Reviewed-by: Otto <otto@codeberg.org>
2026-05-30 14:02:03 +02:00