Commit graph

25,206 commits

Author SHA1 Message Date
Mathieu Fenniak
4b83448b7d 2026-06-10 security patches (#13001)
- fix: prevent stored XSS in user display name on Actions page
- fix: LFS locks must belong to the intended repo, port from Gitea
- fix: prevent unauthorized access to draft releases via API
- fix: prevent writes to OpenID visibility which may affect other users
- fix: prevent viewing private PRs that are linked to public issues on public projects

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13001
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
2026-06-10 06:05:01 +02:00
Renovate Bot
4e992341a0 Update dependency forgejo/release-notes-assistant to v1.7.3 (forgejo) (#13028) 2026-06-10 01:08:06 +02:00
Herwig Hochleitner
1848b37956 feat: add nix highlighting to file editor (#12146)
Resolves #11487

Co-authored-by: Herwig Hochleitner <herwig@bendlas.net>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12146
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-10 00:16:02 +02:00
Renovate Bot
d9b0deddd8 Update module golang.org/x/crypto to v0.53.0 (forgejo) (#13010)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13010
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-09 23:02:12 +02:00
Renovate Bot
a15302c609 Update module golang.org/x/image to v0.42.0 (forgejo) (#13011)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13011
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-09 21:48:34 +02:00
Nils Goroll
1043c67f4a Skip sha256 repo tests if sha256 not supported (#13018)
Otherwise the newly introduced test from #12335 fails on platforms which do not have git sha256 yet

## 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...
  - [X] in their respective `*_test.go` for unit tests.
  - [ ] 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.
- [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/13018
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-09 16:07:47 +02:00
OFHansen
bb5919ea87 feat(api): add new /repos/{owner}/{repo}/actions/runs/{run_id}/cancel API endpoint (#12957)
This new API endpoint makes it possible to cancel action runs via the API. Previously this was only natively possible through the UI, the same `CancelRun` func has been reused for this feature.

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

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/12957): <!--number 12957 --><!--line 0 --><!--description ZmVhdChhcGkpOiBhZGQgbmV3IGAvcmVwb3Mve293bmVyfS97cmVwb30vYWN0aW9ucy9ydW5zL3tydW5faWR9L2NhbmNlbGAgQVBJIGVuZHBvaW50-->feat(api): add new `/repos/{owner}/{repo}/actions/runs/{run_id}/cancel` API endpoint<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12957
Reviewed-by: limiting-factor <limiting-factor@noreply.codeberg.org>
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-09 04:00:56 +02:00
steven.guiheux
3dc2b52b5f fix: multiline comment invalidation (#12950)
Found issues during the process of invalidation of a multiline comment (link to #12582):
* Update a line in the middle of the comment
* Update/Delete the last line of the comment

No problem with:
* Deleting a line in the middle of the comment
* Update/Delete the first line of the comment

I added all these cases in the pull_review_test.go

### Tests for Go changes

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

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12950
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
2026-06-09 03:07:56 +02:00
Renovate Bot
c2dcdc9ba7 Update renovate to v43.214.4 (forgejo) (#12987) 2026-06-09 02:23:03 +02:00
Andrew Cassidy
158a44935c chore: use correct value to disable timeouts in example config (#12985)
These values are parsed as durations, and rejected if they encounter parsing errors. "-1" lacks a unit, and is rejected. The end result is that setting PER_WRITE_TIMEOUT = -1 just uses the default 30s

See also forgejo/docs!2005

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12985
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-09 00:04:36 +02:00
Renovate Bot
c513dbaff9 Update dependency @google/model-viewer to v4.3.1 (forgejo) (#12989)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12989
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-08 23:58:38 +02:00
Renovate Bot
c93e1330ac Update module gopkg.in/ini.v1 to v1.67.3 (forgejo) (#12999)
See https://codeberg.org/forgejo/forgejo/issues/11453 for context on performance

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12999
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-08 20:55:22 +02:00
AverageHelper
408572dd35 feat: in-browser validation of website URLs for user, repository, and organization profiles (#12991)
This PR pertains to the client-side validation of the Website input on user, repo, and org profiles. #12962 extends `[service].VALID_SITE_URL_SCHEMES` to cover Website fields on repo and org profiles, where before that config key only applied to the one on user profiles. If that change merges, it will then be possible to construct an HTML [`pattern`](https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/input#pattern) attribute for general use on any Website form input that the server validates this way, thus enabling browsers to catch errors early relating to URL scheme confusion.

This PR (1) introduces such a `pattern` attribute, and (2) adds a new UI note to make clear to users which URL schemes are permitted. This change helps explain the browser's otherwise cryptic error messages regarding pattern mismatch, while also letting users know what URI schemes the Forgejo instance supports as Website links (e.g. gemini:// URLs).

![A text field labeled "Website", with a note below which reads, "Allowed URL schemes include: http, https"](/attachments/304e17ee-b5aa-414e-a4fa-d48639336c6c)

This MUST NOT merge before #12962. To do so would introduce a regression wherein the UI may suggest and validate a different set of allowed URL schemes than the server actually permits.

See also #5519

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12991
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2026-06-08 17:35:15 +02:00
AverageHelper
0e283c5485 feat: apply service.VALID_SITE_URL_SCHEMES to apply to repository and organization profiles (#12962)
Turns out this was a one-line fix for each affected field (change the binding from `ValidUrl` to `ValidSiteUrl`), but the tests are rather verbose. The tests are, however, each a simple flow of Create Thing > Try HTTP Website > Try Different Website (notice failure) > Try Different Website With New Config (notice success). I wrote this PR by adding failing tests first, then making the change, for each affected field.

Not sure if this should be "feat:" or "fix:" tbh. I figured "fix:" for this PR since IMO the expected behavior is for `VALID_SITE_URL_SCHEMES` to apply in each of these cases, not only for user profiles via the UI form. (Later changed to "feat:" at @limiting-factor's suggestion, based on the observation that this change extends documented behavior.)

This PR deals with the server-side validation only. #12991 covers client-side validation (deriving a `pattern` attribute from `VALID_SITE_URL_SCHEMES`, etc.)

Closes #5519

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12962
Reviewed-by: limiting-factor <limiting-factor@noreply.codeberg.org>
2026-06-08 15:17:51 +02:00
klMse
743fa9d188 [SKIP CI] chore: fix error message of LFSPointerFiles (#12961)
The LFSPointerFiles Endpoint returned an error message from a different endpoint.

Co-authored-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12961
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-08 00:04:42 +02:00
Renovate Bot
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
rgon
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
oliverpool
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: 1d12151086/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:
1d12151086/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 Bot
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 Bot
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 Bot
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 Weijgertze
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
Clouds
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 Bot
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 Bot
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 Bot
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 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.guiheux
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
Gusted
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 Bot
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 Bot
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 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 Rathakrishnan
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
0ko
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 Bot
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 Bot
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
oliverpool
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 Ahlenstorf
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
onebitboy
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 Delpeuch
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 Weijgertze
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
oliverpool
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 Bot
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