Commit graph

22941 commits

Author SHA1 Message Date
Renovate Bot
f6573b9f3b Update module golang.org/x/image to v0.27.0 (forgejo) (#7797)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7797
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-06 06:06:50 +00:00
Renovate Bot
0ce1f70820 Update module github.com/golangci/golangci-lint/v2/cmd/golangci-lint to v2.1.6 (forgejo) (#7789)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-05 15:32:00 +00:00
Gusted
03785a8169 [SKIP CI] chore: update CODEOWNERS (#7785)
- Remove crystal and caesar from the CODEOWNERS file. They have not reviewed in a long time.
- Add Beowulf to frontend.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7785
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-05-05 14:57:27 +00:00
Gusted
ed9693f236 fix(api): document is_system_webhook field (#7784)
- Document that `is_system_webhook` field is accepted for the `POST /admin/hooks` endpoint.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7784
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-05-05 13:58:55 +00:00
Gusted
2a568f3b82 fix: make hash pattern more strict (#7775)
- Ensure that the last path is `commit/`, `tree/` or `blob/`.
- Resolves forgejo/forgejo#7767
- Follow up forgejo/forgejo#6784
- Added unit test

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7775
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-05-05 05:29:55 +00:00
Renovate Bot
52f20da52a Lock file maintenance (forgejo) (#7778)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency versions.

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

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

♻ **Rebasing**: Whenever PR becomes conflicted, 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjI2MS40IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7778
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-05 05:25:22 +00:00
Gusted
4a57f73072 fix: remove artificial delay for PR update (#7773)
- I was not able to find a reasoning in the pull request (https://github.com/go-gitea/gitea/pull/9784) for the existence of this `time.Sleep`. The best I could come up with during manual testing is that there's a brief moment where 'this pull request is missing fork information' is shown, this was caused by an incorrect condition.
- Added integration test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7773
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-05-04 21:54:55 +00:00
Renovate Bot
8b03d3260d Update module github.com/42wim/httpsig to v1.2.3 (forgejo) (#7770)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7770
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-04 12:36:55 +00:00
Beowulf
bf02da9fd9 chore: Fix outdated usage of unittest.OverrideFixtures (#7772)
The function unittest.OverrideFixtures was changed with 7e489eed25.
The PR with the util_misc_test was older and merged after the change to
the unittest.OverrideFixtures function. So the test was still using the
old function, which leads to a conflict / error when running tests.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7772
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2025-05-03 15:24:56 +00:00
Benedikt Straub
cf03286b5b Replace the 'relative-time' element scripting with custom, translatable rewrite (#6154)
This is my take to fix #6078
Should also resolve #6111

As far as I can tell, Forgejo uses only a subset of the relative-time functionality, and as far as I can see, this subset can be implemented using browser built-in date conversion and arithmetic. So I wrote a JavaScript to format the relative-time element accordingly, and a Go binding to generate the translated elements.

This is my first time writing Go code, and my first time coding for a large-scale server application, so please tell me if I'm doing something wrong, or if the whole approach is not acceptable.

---

Screenshot: Localized times in Low German
![grafik](/attachments/6f787e17-e666-4b88-8599-af0b8357ffbe)
Screenshot: The same with Forgejo in English
![grafik](/attachments/af09c873-b9f3-423d-b12b-7e62093e2623)

---

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. 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

- 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 added test coverage for JavaScript changes...
  - [x] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### 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] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6154
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Benedikt Straub <benedikt-straub@web.de>
Co-committed-by: Benedikt Straub <benedikt-straub@web.de>
2025-05-03 14:11:01 +00:00
Beowulf
37d566bdb0 Show if commit is signed in activity feed and unify sha box (#6933)
Old activities are shown like before, new commits are displayed like commits in e.g. the commits list. _(Second commit)_

| New signed commits | Old (signed) commits |
|:--:|:--:|
| ![image](/attachments/cd81c761-eda6-44bf-8c43-ac3b7e6f16eb) | ![image](/attachments/243080f3-1b77-4ca7-bc03-bbf855c39c99) |

Additionally the sha box was moved in an own component to unify the usage. _(First commit)_

Closes #1824

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

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- User Interface features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/6933): <!--number 6933 --><!--line 0 --><!--description U2hvdyBpZiBjb21taXQgaXMgdmVyaWZpZWQgaW4gYWN0aXZpdHkgZmVlZCBvZiBhbiB1c2VyIG9yIGFuIG9yZ2FuaXphdGlvbiBmb3IgbmV3IGFjdGl2aXR5-->Show if commit is verified in activity feed of an user or an organization for new activity<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6933
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2025-05-03 10:54:52 +00:00
Renovate Bot
82477cb55c Update github.com/42wim/sshsig digest to 5100632 (forgejo) (#7768)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/42wim/sshsig](https://github.com/42wim/sshsig) | require | digest | `841cf5b` -> `5100632` |

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

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

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

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

---

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

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjI2MS40IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7768
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-03 06:37:53 +00:00
Renovate Bot
8b90eddc56 Update dependency @github/relative-time-element to v4.4.6 (forgejo) (#7769)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7769
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-03 00:37:25 +00:00
Gusted
3ebd96ef73 [gitea] week 2025-16 cherry pick (gitea/main -> forgejo) (#7602)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7602
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-05-02 18:35:33 +00:00
Gabriel Bjørnager Jensen
f07456286e
fix(ui): Improve chronological sorting of user (#7596)
This PR changes `newest` and `oldest` sorting under *Explore/User* and *Explore/Organization* to refer to the `created_unix` column rather than `id`.

Fixes: #7595

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7596
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Gabriel Bjørnager Jensen <gabriel@achernar.io>
Co-committed-by: Gabriel Bjørnager Jensen <gabriel@achernar.io>
2025-05-02 20:33:57 +02:00
forgejo-release-manager
dbfc24001f chore(release-notes): Forgejo v7.0.15 (#7765)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7765
Co-authored-by: forgejo-release-manager <contact-forgejo-release-manager@forgejo.org>
Co-committed-by: forgejo-release-manager <contact-forgejo-release-manager@forgejo.org>
2025-05-02 15:13:14 +00:00
forgejo-release-manager
481c7aaf19 chore(release-notes): Forgejo v11.0.1 (#7764)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7764
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: forgejo-release-manager <contact-forgejo-release-manager@forgejo.org>
Co-committed-by: forgejo-release-manager <contact-forgejo-release-manager@forgejo.org>
2025-05-02 14:42:26 +00:00
0ko
5ac2c0a2ba fix(ui): multiple fixes of sync fork UI (#7740)
Followup to https://codeberg.org/forgejo/forgejo/pulls/2364
Replaces https://codeberg.org/forgejo/forgejo/pulls/7666

Fix multiple issues with the original implementation:
* `SyncFork` web handler used `{branch}` as a parameter, so it failed for branches with `/` in names
    * Originally I switched it to use `*` like other branch web handlers, but I found that it was easier to move it out from URL to POST request values
* Security: `SyncFork` web handler was using GET method, so just visiting the link was enough to execute the action
    * It was switched to POST done via form with CSRF, which also allowed to put branch name in it's values
* Security: in template, branch name was not escaped but rendered with `SafeHTML`, allowing for rendering fun characters like `&amp;` and for script execution. Also the link was not escaped correctly and would be leading to 404
    * To avoid having to change all translations, only the branch name+link part was changed and is now escaped with `HTMLFormat` before being passed to TrN

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7740
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-05-02 14:25:05 +00:00
Earl Warren
aec8f4c57a fix: document that /repos/{owner}/{repo}/pulls may contain nulls (#7762)
The null means a server side bug prevents the pull request from being
retrieved.

Closes https://codeberg.org/forgejo/forgejo/issues/6571

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7762
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-05-02 13:53:08 +00:00
Renovate Bot
b7b70dbaf2 Update dependency forgejo/release-notes-assistant to v1.2.5 (forgejo) (#7760)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [forgejo/release-notes-assistant](https://code.forgejo.org/forgejo/release-notes-assistant) | minor | `v1.1.1` -> `v1.2.5` |

---

### Release Notes

<details>
<summary>forgejo/release-notes-assistant (forgejo/release-notes-assistant)</summary>

### [`v1.2.5`](https://code.forgejo.org/forgejo/release-notes-assistant/releases/tag/v1.2.5)

[Compare Source](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.4...v1.2.5)

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

<!--URL:https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant-->

-   bug fixes
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/60): <!--number 60 --><!--line 0 --><!--description Zml4OiBza2lwIGlmIHRoZSBsaXN0IG9mIFBScyBjb250YWlucyBhIG51bGwgZWxlbWVudA==-->fix: skip if the list of PRs contains a null element<!--description-->
-   other
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/55): <!--number 55 --><!--line 0 --><!--description VXBkYXRlIHJlbGVhc2UgYWN0aW9uIHRhZw==-->Update release action tag<!--description-->

<!--end release-notes-assistant-->

### [`v1.2.4`](https://code.forgejo.org/forgejo/release-notes-assistant/releases/tag/v1.2.4)

[Compare Source](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.3...v1.2.4)

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

<!--URL:https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant-->

-   other
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/52): <!--number 52 --><!--line 0 --><!--description VXBkYXRlIGBzZXR1cC1mb3JnZWpvYCB0YWc=-->Update `setup-forgejo` tag<!--description-->
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/51): <!--number 51 --><!--line 0 --><!--description VXNlIFJOQSBmcm9tIGBmb3JnZWpvLXJlbGVhc2VgIGFjdGlvbg==-->Use RNA from `forgejo-release` action<!--description-->
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/47): <!--number 47 --><!--line 0 --><!--description QWRkIG5hbWUgdG8gQ0kgdGFza3M=-->Add name to CI tasks<!--description-->
    -   [PR](https://placeholder:ca61bc9776c376e293039231cd01158c2c2f0a4f@code.forgejo.org/forgejo/release-notes-assistant/pulls/45): <!--number 45 --><!--line 0 --><!--description VXNlIGBmb3JnZWpvLXJlbGVhc2VAdjJgIGFjdGlvbg==-->Use `forgejo-release@v2` action<!--description-->

<!--end release-notes-assistant-->

### [`v1.2.3`](https://code.forgejo.org/forgejo/release-notes-assistant/releases/tag/v1.2.3)

[Compare Source](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.2...v1.2.3)

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

<!--URL:https://code.forgejo.org/forgejo/release-notes-assistant-->

-   features
    -   [PR](https://code.forgejo.org/forgejo/release-notes-assistant/pulls/42): <!--number 42 --><!--line 0 --><!--description ZmVhdChjaSk6IHVzZSBSTkEgd2l0aCBSTkE=-->feat(ci): use RNA with RNA<!--description-->

<!--end release-notes-assistant-->

### [`v1.2.2`](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.1...v1.2.2)

[Compare Source](https://code.forgejo.org/forgejo/release-notes-assistant/compare/v1.2.1...v1.2.2)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

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

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

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

---

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

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjI2MS40IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7760
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-02 08:53:48 +00:00
Michael Kriese
4096d0d2d6 chore(renovate): use gitea-releases datasource for rna (#7759)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7759
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
2025-05-02 08:05:26 +00:00
Michael Kriese
e08f2ac7f1 chore(renovate): allow updating release notes assistant (#7758)
Extract release notes assistent version to a variable, so renovate can easily update it

fed044d3a3
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7758
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
2025-05-02 07:44:09 +00:00
Earl Warren
beb985062d fix(sec): add tests for OAuth2 signup (#7755)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7755
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-05-02 06:25:56 +00:00
Earl Warren
c57ab693f9 fix(sec): only degrade permission check for git push (#7752)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7752
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-05-02 06:25:41 +00:00
Gusted
aa4ae81fe0
fix(sec): add tests for OAuth2 signup
Test two scenarios:
1. Account linking is set to `auto` and tries to link against a user who
is enrolled into Webauthn should show 2FA screen.
2. User is already linked and logins via OAuth2 and is enrolled into
WebAuthn should show 2FA screen.
2025-05-02 07:21:08 +02:00
Gusted
60c1af244a
fix(sec): only degrade permission check for git push
- A permission check is done when incoming SSH connections are handled (this is
run before git hooks). If this check is for write access and AGit flow
is supported, then this check is degraded to a read check. The
motivation behind this is that for AGit flow the user does not need
write permissions but only read permissions.
- The `if` condition cannot check if this is for AGit flow, as the Git
protocol has not run yet and thus has to delay this permission check.
This `if` condition failed to consider that this also might be run for
LFS which does not care about AGit flow and would not do a delayed
permission check, so ensure that this degradition only happens when the
`git-receive-pack` command is being run (which roughly equals to `git
push`).
- Clarify code comment.
- Added integration test.
2025-05-02 06:56:30 +02:00
Gusted
4a1487c193 feat: remove the legacy TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY setting (#7745)
- The way of doing conflict testing via `git apply` stems from Gogs, it was replaced in Gitea 1.18 by `git read-tree -m` which uses 3-way merge [^0]. The option to disable the fallback `git apply` was introduced in Gitea 1.19 and enabled by default [^1].
- Given it was mostly kept just in case `git read-tree -m` was shown to be unreliable and it has been sufficiently battle tested with no known issues (in Forgejo), it's time to remove this way of conflict testing. I am not aware of anyone using this option or having any benefits over a 3-way merge via `git read-tree -m`.

[^0]: https://github.com/go-gitea/gitea/pull/18004
[^1]: https://github.com/go-gitea/gitea/pull/22130

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

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Breaking features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7745): <!--number 7745 --><!--line 0 --><!--description cmVtb3ZlIHRoZSBsZWdhY3kgYFRFU1RfQ09ORkxJQ1RJTkdfUEFUQ0hFU19XSVRIX0dJVF9BUFBMWWAgc2V0dGluZw==-->remove the legacy `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY` setting<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7745
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-05-01 16:35:23 +00:00
Renovate Bot
fbc32463fc Update dependency eslint-plugin-unicorn to v59 (forgejo) (#7744)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-01 12:54:35 +00:00
Panagiotis "Ivory" Vasilopoulos
b51ce74552 chore(ci): add clarification regarding test label (#7732)
Contributors use CI pipeline runs as a frame of reference to figure out
whether their work adhere's to Forgejo's quality assurance standards.
If a test label is missing and the CI does not run, the 'error message'
shown can cause confusion, as it might give the contributor the idea
that some action is expected from their part.

This change explicitly mentions that a reviewer must set the test
label.

Fixes forgejo/forgejo#7686.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7732
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Co-committed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
2025-05-01 11:52:22 +00:00
Renovate Bot
55f4ee214d Update module github.com/alecthomas/chroma/v2 to v2.17.2 (forgejo) (#7738)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7738
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-01 10:41:26 +00:00
Earl Warren
2846aebc6a i18n: update of translations from Codeberg Translate (#7637)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7637
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-05-01 10:23:41 +00:00
Codeberg Translate
4a51a1f360
i18n: update of translations from Codeberg Translate
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Benedikt Straub <benedikt-straub@web.de>
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: Dirk <dirk@noreply.codeberg.org>
Co-authored-by: Edgarsons <edgarsons@noreply.codeberg.org>
Co-authored-by: Fjuro <fjuro@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Miguel P.L <miguel_pl@noreply.codeberg.org>
Co-authored-by: Panagiotis \"Ivory\" Vasilopoulos <git@n0toose.net>
Co-authored-by: SomeTr <sometr@noreply.codeberg.org>
Co-authored-by: Yushu <yushu@noreply.codeberg.org>
Co-authored-by: aleksi <aleksi@noreply.codeberg.org>
Co-authored-by: artnay <artnay@noreply.codeberg.org>
Co-authored-by: docudoc <docudoc@noreply.codeberg.org>
Co-authored-by: earl-warren <earl-warren@noreply.codeberg.org>
Co-authored-by: hugoalh <hugoalh@noreply.codeberg.org>
Co-authored-by: mimsee <mimsee@noreply.codeberg.org>
Co-authored-by: pixelcode <pixelcode@noreply.codeberg.org>
Co-authored-by: tacaly <frederick@tacaly.com>
Co-authored-by: xtex <xtexchooser@duck.com>
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/cs/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/de/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/fi/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/nds/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/uk/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/zh_Hans/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/zh_Hant/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/cs/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/da/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/de/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/el/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/es/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/fi/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/fr/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/lv/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/nl/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ru/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/sv/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/uk/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/zh_Hans/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/zh_Hant/
Translation: Forgejo/forgejo
Translation: Forgejo/forgejo-next
2025-05-01 09:50:01 +00:00
Renovate Bot
8bbac4c679 Update module github.com/redis/go-redis/v9 to v9.8.0 (forgejo) (#7739)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) | require | minor | `v9.7.3` -> `v9.8.0` |

---

### Release Notes

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

### [`v9.8.0`](https://github.com/redis/go-redis/releases/tag/v9.8.0)

[Compare Source](https://github.com/redis/go-redis/compare/v9.7.3...v9.8.0)

### 9.8.0 (2025-04-30)

#### 🚀 Highlights

-   **Redis 8 Support**: Full compatibility with Redis 8.0, including testing and CI integration
-   **Enhanced Hash Operations**: Added support for new hash commands (`HGETDEL`, `HGETEX`, `HSETEX`) and `HSTRLEN` command
-   **Search Improvements**: Enabled Search DIALECT 2 by default and added `CountOnly` argument for `FT.Search`

####  New Features

-   Added support for new hash commands: `HGETDEL`, `HGETEX`, `HSETEX` ([#&#8203;3305](https://github.com/redis/go-redis/pull/3305))
-   Added `HSTRLEN` command for hash operations ([#&#8203;2843](https://github.com/redis/go-redis/pull/2843))
-   Added `Do` method for raw query by single connection from `pool.Conn()` ([#&#8203;3182](https://github.com/redis/go-redis/pull/3182))
-   Prevent false-positive marshaling by treating zero time.Time as empty in isEmptyValue ([#&#8203;3273](https://github.com/redis/go-redis/pull/3273))
-   Added FailoverClusterClient support for Universal client ([#&#8203;2794](https://github.com/redis/go-redis/pull/2794))
-   Added support for cluster mode with `IsClusterMode` config parameter ([#&#8203;3255](https://github.com/redis/go-redis/pull/3255))
-   Added client name support in `HELLO` RESP handshake ([#&#8203;3294](https://github.com/redis/go-redis/pull/3294))
-   **Enabled Search DIALECT 2 by default** ([#&#8203;3213](https://github.com/redis/go-redis/pull/3213))
-   Added read-only option for failover configurations ([#&#8203;3281](https://github.com/redis/go-redis/pull/3281))
-   Added `CountOnly` argument for `FT.Search` to use `LIMIT 0 0` ([#&#8203;3338](https://github.com/redis/go-redis/pull/3338))
-   Added `DB` option support in `NewFailoverClusterClient` ([#&#8203;3342](https://github.com/redis/go-redis/pull/3342))
-   Added `nil` check for the options when creating a client ([#&#8203;3363](https://github.com/redis/go-redis/pull/3363))

#### 🐛 Bug Fixes

-   Fixed `PubSub` concurrency safety issues ([#&#8203;3360](https://github.com/redis/go-redis/pull/3360))
-   Fixed panic caused when argument is `nil` ([#&#8203;3353](https://github.com/redis/go-redis/pull/3353))
-   Improved error handling when fetching master node from sentinels ([#&#8203;3349](https://github.com/redis/go-redis/pull/3349))
-   Fixed connection pool timeout issues and increased retries ([#&#8203;3298](https://github.com/redis/go-redis/pull/3298))
-   Fixed context cancellation error leading to connection spikes on Primary instances ([#&#8203;3190](https://github.com/redis/go-redis/pull/3190))
-   Fixed RedisCluster client to consider `MASTERDOWN` a retriable error ([#&#8203;3164](https://github.com/redis/go-redis/pull/3164))
-   Fixed tracing to show complete commands instead of truncated versions ([#&#8203;3290](https://github.com/redis/go-redis/pull/3290))
-   Fixed OpenTelemetry instrumentation to prevent multiple span reporting ([#&#8203;3168](https://github.com/redis/go-redis/pull/3168))
-   Fixed `FT.Search` Limit argument and added `CountOnly` argument for limit 0 0 ([#&#8203;3338](https://github.com/redis/go-redis/pull/3338))
-   Fixed missing command in interface ([#&#8203;3344](https://github.com/redis/go-redis/pull/3344))
-   Fixed slot calculation for `COUNTKEYSINSLOT` command ([#&#8203;3327](https://github.com/redis/go-redis/pull/3327))
-   Updated PubSub implementation with correct context ([#&#8203;3329](https://github.com/redis/go-redis/pull/3329))

#### 📚 Documentation

-   Added hash search examples ([#&#8203;3357](https://github.com/redis/go-redis/pull/3357))
-   Fixed documentation comments ([#&#8203;3351](https://github.com/redis/go-redis/pull/3351))
-   Added `CountOnly` search example ([#&#8203;3345](https://github.com/redis/go-redis/pull/3345))
-   Added examples for list commands: `LLEN`, `LPOP`, `LPUSH`, `LRANGE`, `RPOP`, `RPUSH` ([#&#8203;3234](https://github.com/redis/go-redis/pull/3234))
-   Added `SADD` and `SMEMBERS` command examples ([#&#8203;3242](https://github.com/redis/go-redis/pull/3242))
-   Updated `README.md` to use Redis Discord guild ([#&#8203;3331](https://github.com/redis/go-redis/pull/3331))
-   Updated `HExpire` command documentation ([#&#8203;3355](https://github.com/redis/go-redis/pull/3355))
-   Featured OpenTelemetry instrumentation more prominently ([#&#8203;3316](https://github.com/redis/go-redis/pull/3316))
-   Updated `README.md` with additional information ([#&#8203;310ce55](https://github.com/redis/go-redis/commit/310ce55))

####  Performance and Reliability

-   Bound connection pool background dials to configured dial timeout ([#&#8203;3089](https://github.com/redis/go-redis/pull/3089))
-   Ensured context isn't exhausted via concurrent query ([#&#8203;3334](https://github.com/redis/go-redis/pull/3334))

#### 🔧 Dependencies and Infrastructure

-   Updated testing image to Redis 8.0-RC2 ([#&#8203;3361](https://github.com/redis/go-redis/pull/3361))
-   Enabled CI for Redis CE 8.0 ([#&#8203;3274](https://github.com/redis/go-redis/pull/3274))
-   Updated various dependencies:
    -   Bumped golangci/golangci-lint-action from 6.5.0 to 7.0.0 ([#&#8203;3354](https://github.com/redis/go-redis/pull/3354))
    -   Bumped rojopolis/spellcheck-github-actions ([#&#8203;3336](https://github.com/redis/go-redis/pull/3336))
    -   Bumped golang.org/x/net in example/otel ([#&#8203;3308](https://github.com/redis/go-redis/pull/3308))
-   Migrated golangci-lint configuration to v2 format ([#&#8203;3354](https://github.com/redis/go-redis/pull/3354))

#### ⚠️ Breaking Changes

-   **Enabled Search DIALECT 2 by default** ([#&#8203;3213](https://github.com/redis/go-redis/pull/3213))
-   Dropped RedisGears (Triggers and Functions) support ([#&#8203;3321](https://github.com/redis/go-redis/pull/3321))
-   Dropped FT.PROFILE command that was never enabled ([#&#8203;3323](https://github.com/redis/go-redis/pull/3323))

#### 🔒 Security

-   Fixed network error handling on SETINFO (CVE-2025-29923) ([#&#8203;3295](https://github.com/redis/go-redis/pull/3295))

#### 🧪 Testing

-   Added integration tests for Redis 8 behavior changes in Redis Search ([#&#8203;3337](https://github.com/redis/go-redis/pull/3337))
-   Added vector types INT8 and UINT8 tests ([#&#8203;3299](https://github.com/redis/go-redis/pull/3299))
-   Added test codes for search_commands.go ([#&#8203;3285](https://github.com/redis/go-redis/pull/3285))
-   Fixed example test sorting ([#&#8203;3292](https://github.com/redis/go-redis/pull/3292))

#### 👥 Contributors

We would like to thank all the contributors who made this release possible:

[@&#8203;alexander-menshchikov](https://github.com/alexander-menshchikov), [@&#8203;EXPEbdodla](https://github.com/EXPEbdodla), [@&#8203;afti](https://github.com/afti), [@&#8203;dmaier-redislabs](https://github.com/dmaier-redislabs), [@&#8203;four_leaf_clover](https://github.com/four_leaf_clover), [@&#8203;alohaglenn](https://github.com/alohaglenn), [@&#8203;gh73962](https://github.com/gh73962), [@&#8203;justinmir](https://github.com/justinmir), [@&#8203;LINKIWI](https://github.com/LINKIWI), [@&#8203;liushuangbill](https://github.com/liushuangbill), [@&#8203;golang88](https://github.com/golang88), [@&#8203;gnpaone](https://github.com/gnpaone), [@&#8203;ndyakov](https://github.com/ndyakov), [@&#8203;nikolaydubina](https://github.com/nikolaydubina), [@&#8203;oleglacto](https://github.com/oleglacto), [@&#8203;andy-stark-redis](https://github.com/andy-stark-redis), [@&#8203;rodneyosodo](https://github.com/rodneyosodo), [@&#8203;dependabot](https://github.com/dependabot), [@&#8203;rfyiamcool](https://github.com/rfyiamcool), [@&#8203;frankxjkuang](https://github.com/frankxjkuang), [@&#8203;fukua95](https://github.com/fukua95), [@&#8203;soleymani-milad](https://github.com/soleymani-milad), [@&#8203;ofekshenawa](https://github.com/ofekshenawa), [@&#8203;khasanovbi](https://github.com/khasanovbi)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

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

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

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

---

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

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjEuNCIsInVwZGF0ZWRJblZlciI6IjM5LjI2MS40IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7739
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-01 08:45:55 +00:00
Renovate Bot
7ed278dec9 Update linters (forgejo) (#7736)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-01 08:41:20 +00:00
Renovate Bot
e1d8afdf32 Update dependency happy-dom to v17.4.6 (forgejo) (#7735)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-01 08:40:11 +00:00
Gusted
d7baf25a6b chore: fix test to avoid data race (#7731)
- The global Git version can be accessed by background services such as the PR checker, to minimize data race because of `MockVariableValue` resetting it. Run the mocked Git version as first test.
- Followup of forgejo/forgejo#7527

CI that is failing: https://codeberg.org/forgejo/forgejo/actions/runs/73021/jobs/10

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7731
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-30 14:59:33 +00:00
Gusted
c5d274a384 [gitea] week 2025-17 cherry pick (gitea/main -> forgejo) (#7713)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7713
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-30 14:50:18 +00:00
Lucas Schwiderski
9cc0d4b3d1 Show warning in locked issue discussion (#7726)
Closes: #7334

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. 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

- 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 added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

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

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7726
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de>
Co-committed-by: Lucas Schwiderski <lucas@lschwiderski.de>
2025-04-30 14:03:37 +00:00
Remo Senekowitsch
ec076e66d8 feat: use git-replay for rebasing (#7527)
Closes #7525

This is better for performance, because it can do more work in-memory. It also preserves unknown headers, which can be important for some clients. For example, Jujutsu uses a non-standard "change-id" header to track commits across rebase and amend, but regular git-rebase drops such unknown headers.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7527
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Remo Senekowitsch <remo@buenzli.dev>
Co-committed-by: Remo Senekowitsch <remo@buenzli.dev>
2025-04-29 20:51:56 +00:00
Gusted
32e64ccd34 chore: replace github.com/go-testfixtures/testfixtures (#7715)
- Replaces `github.com/go-testfixtures/testfixtures` with a homebrew solution that is fully compatible.
- The reason to replace this library is that it pulls in a lot of other libraries which is causing issues: (1) the test binary becomes bigger than necessary which really shows in incremental build times (this patch removes 27.6MiB of the integration test binary) (2) it pulls in libraries (mainly database drivers) that are not used and are not easy to upgrade in case of a security vulnerability, causing CI failures.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7715
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-29 19:28:56 +00:00
Earl Warren
a16350d9f4 chore(release): next-digest moved to invisible.forgejo.org (#7720)
In order to improve the security of the Forgejo infrastructure the next-digest repository was moved to a private instance.

## Testing

- After the merge, trigger a mirror to build a new v12.0-test release
- Verify in experimental that the workflows works as expected
- Verify v12.next.forgejo.org is upgraded with the latest commit
- Once the test completes
    - Tag for backport to v11 & v7
    - Manual backport to v7 because it conflicts

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7720
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-04-29 15:53:08 +00:00
Squel
8c81dca8b9 feat: allow access to /api/v1/packages/{username} without token (#7716)
- Only require tokens on package endpoints that modify packages, this being deletion of a package and (un)link of a package.
- Allows reading data via the API of otherwise public data
- Integration test added.

Some references to related past commits:
- de484e86bc Started requiring tokens for reading packages "mimicking the design of GitHub OAuth scopes".
- 18de83b2a3 Adjusted the scope further, but kept the GitHub design.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7716
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Squel <squeljur+git@gmail.com>
Co-committed-by: Squel <squeljur+git@gmail.com>
2025-04-29 14:37:19 +00:00
Kenneth Bruen
f6599099ee feat: add label for avatar settings (#7678)
By redirecting the user to the settings when clicking on the avatar, it is not immediately obvious that the user has to scroll down the page to change their avatar. By adding an id to reference in the fragment, we fix this.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7678
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Kenneth Bruen <kenny@kbruen.ro>
Co-committed-by: Kenneth Bruen <kenny@kbruen.ro>
2025-04-29 13:31:07 +00:00
Gusted
df5d656827 feat: consider WebAuthn & SSH for instance signing (#7693)
- Currently the options `pubkey` and `twofa` only consider TOTP and GPG keys respectively. Adjust the code to also consider WebAuthn credentials and SSH keys.
- While adding the new unified functions I noticed that certain places also benefited from using these unified functions and took the liberty (where it was either a trivial translation or it was covered under testing) to use the new unified functions.
- Resolves forgejo/forgejo#7658
- Adds unit and integration tests.

Documentation PR: https://codeberg.org/forgejo/docs/pulls/1166

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7693
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-29 10:34:07 +00:00
Lunny Xiao
d07a9a1b56 Update token creation API swagger documentation (#34288)
Fix #34231

(cherry picked from commit 0376c09fc27d848dbac471b629c83fd7a231852b)
2025-04-29 10:12:45 +02:00
christopher-besch
386e7f8208 send mail on failed or recovered workflow run (#7509)
Send a Mail when an action run fails or a workflow recovers.

This PR depends on https://codeberg.org/forgejo/forgejo/pulls/7491

closes #3719

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. 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

- 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 added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

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

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

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

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7509): <!--number 7509 --><!--line 0 --><!--description c2VuZCBtYWlsIG9uIGZhaWxlZCBvciByZWNvdmVyZWQgd29ya2Zsb3cgcnVu-->send mail on failed or recovered workflow run<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7509
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: christopher-besch <mail@chris-besch.com>
Co-committed-by: christopher-besch <mail@chris-besch.com>
2025-04-29 06:58:05 +00:00
Earl Warren
bc99bf5e8f fix: do not set GOPROXY=direct in Dockerfile* (#7707)
The default should be https://proxy.golang.org,direct otherwise someone trying to build the container image from sources will run into throttling limits imposed by code.forgejo.org (making more tha 10 request per second).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7707
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Lucas <sclu1034@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-04-28 17:35:25 +00:00
0ko
b25091f757 chore(ui): remove unused fomantic font size classes (#7705)
One can grep `massive` and `huge` on the current codebase and not find any evidence of these classes being used anywhere in the UI, probably because there's a good reason for this. So these rules are a dead weight.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7705
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-28 16:43:22 +00:00
Michael Jerger
bc8c3cc009 fix linting 2025-04-28 16:41:33 +02:00
Renovate Bot
eb188cf83f Lock file maintenance (forgejo) (#7696)
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency versions.

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

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

♻ **Rebasing**: Whenever PR becomes conflicted, 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI1Mi4wIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7696
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-28 07:17:50 +00:00