Commit graph

22961 commits

Author SHA1 Message Date
0ko
2c9f272d42 chore: remove unused update-locales.sh (#7866)
According to the script, it helps Gitea fix Crowdin output to be consistent with what Unknwon's INI library expects.

I'm not aware of it being used in Forgejo. But want to see green CI checks just in case.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7866
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-05-14 23:05:32 +00:00
0ko
e3ba342665 fix(ui): disable spellcheck on TOTP form fields (#7868)
Ref https://codeberg.org/forgejo/forgejo/issues/7842#issuecomment-4574366

Currently browsers could offer spellcheck on these fields, my browser does.

MDN [recommends](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/spellcheck#security_and_privacy_concerns) that on fields with sensitive information this property is set to `false` in case 3rd party not-fully-trusted spellchecking service is used. I consider these fields as containing sensitive information, and spellcheck is not useful on them anyway.

### Testing

There's currently no integration testing for these TOTP forms. I do plan to add some in my other TOTP-related work.

I tested that this did change the behavior in my browser and don't think we need additional testing right now.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7868
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-05-14 23:04:43 +00:00
Maxim Slipenko
b22bea8b45 fix: remove redundant permission check in RemoveLabel (#7835)
Closes #2415
Permissions checks are already done by the callee, which also do more correct permission checks.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7835
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Maxim Slipenko <maks1ms@altlinux.org>
Co-committed-by: Maxim Slipenko <maks1ms@altlinux.org>
2025-05-14 16:20:43 +00:00
Renovate Bot
263d125849 Update module code.forgejo.org/forgejo/act to v1.26.0 (forgejo) (#7856)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7856
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-14 04:49:59 +00:00
Renovate Bot
9f69eee8f9 Update module github.com/msteinert/pam/v2 to v2.1.0 (forgejo) (#7857)
Closes forgejo/forgejo#7855

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7857
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-14 02:36:04 +00:00
Renovate Bot
4d1f216241 Update github.com/golang-jwt/jwt/v4 (indirect) to v4.5.2 [SECURITY] (forgejo) (#7849)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7849
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-14 02:08:17 +00:00
Renovate Bot
ee02ad2630 Update module github.com/go-webauthn/webauthn to v0.13.0 (forgejo) (#7830)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7830
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-14 01:56:07 +00:00
Renovate Bot
a55755f9c1 Update module github.com/niklasfasching/go-org to v1.8.0 (forgejo) (#7847)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7847
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-14 01:48:53 +00:00
pat-s
eb010e0fca fix: add missing loadbalancing policies for EngineGroup connections (#7799)
This is a follow-up PR to #7212 (unreleased) in which some load balancing policy options were missed.

- `WeightRoundRobin` follows the same logic as `WeightRandomPolicy` WRT to weight assignment.
- `LeastConn` has no options

related docs PR: https://codeberg.org/forgejo/docs/pulls/1109

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7799
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-05-14 01:17:57 +00:00
Michael Kriese
c56ab9f10c ci(renovate): only fail on error (#7848)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7848
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
2025-05-13 16:15:57 +00:00
Renovate Bot
e57d0c248f Update renovate to v39.264.0 (forgejo) (#7776)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-05-13 09:46:55 +00:00
Beowulf
a50b467d9f test(ui-e2e): fix flaky repo wiki test (#7833)
The Webkit environment in CI for some reason has issues with the ratio, so decrease the ratio a bit for Webkit.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7833
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2025-05-10 17:11:24 +00:00
Daniel Kilimnik
a696ad132c fix: replace ß with ss in normalizeUserName (#7817)
When using an oauth provider for login, we can't always make sure that only supported characters are included in the name. Therefore there exist normalization rules for the username. In German some names contain the `ß` letter which usually gets replaces by `ss`. Therefore I added this to the `customCharsReplacement` list.
Without this fix, the user gets an undescriptive internal server error and the log states `CreateUser: name is invalid [<name>]: must be valid alpha or numeric or dash(-_) or dot characters`.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7817
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Daniel Kilimnik <daniel@neodyme.io>
Co-committed-by: Daniel Kilimnik <daniel@neodyme.io>
2025-05-08 16:59:41 +00:00
Gusted
0234d00ace [skip ci] chore: remove backport script (#7792)
- It doesn't work in Forgejo and we already have a backport action.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7792
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-05-08 11:31:34 +00:00
Leni Kadali
f4af3191ef fix: cancel a review (#7454)
- Fixes #7152
- If a review no longer has any pending comments, remove that review from the database.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7454
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Leni Kadali <lenikadali@noreply.codeberg.org>
Co-committed-by: Leni Kadali <lenikadali@noreply.codeberg.org>
2025-05-08 11:21:00 +00:00
0ko
4183fa9a03 Merge commit: i18n: update of translations from Codeberg Translate (#7742)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7742
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2025-05-08 10:54:54 +00:00
Codeberg Translate
e9ec11df4b
i18n: update of translations from Codeberg Translate
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Adolfo Jayme Barrientos <fito@noreply.codeberg.org>
Co-authored-by: Atul_Eterno <atul_eterno@noreply.codeberg.org>
Co-authored-by: Benedikt Straub <benedikt-straub@web.de>
Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
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: GiannosOB <giannosob@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Hiers <hiers@noreply.codeberg.org>
Co-authored-by: Juno Takano <jutty@noreply.codeberg.org>
Co-authored-by: Kita Ikuyo <kitakita@disroot.org>
Co-authored-by: Miguel P.L <miguel_pl@noreply.codeberg.org>
Co-authored-by: Outbreak2096 <outbreak2096@noreply.codeberg.org>
Co-authored-by: Ricky-Tigg <ricky-tigg@noreply.codeberg.org>
Co-authored-by: SomeTr <sometr@noreply.codeberg.org>
Co-authored-by: Xinayder <xinayder@noreply.codeberg.org>
Co-authored-by: ZilloweZ <zillowez@noreply.codeberg.org>
Co-authored-by: antaanimosity <antaanimosity@noreply.codeberg.org>
Co-authored-by: artnay <artnay@noreply.codeberg.org>
Co-authored-by: earl-warren <earl-warren@noreply.codeberg.org>
Co-authored-by: justbispo <justbispo@noreply.codeberg.org>
Co-authored-by: mahlzahn <mahlzahn@posteo.de>
Co-authored-by: otf31 <otf31@noreply.codeberg.org>
Co-authored-by: ruikkaa <ruikkaa@noreply.codeberg.org>
Co-authored-by: tacaly <frederick@tacaly.com>
Co-authored-by: thodorisl <thodorisl@noreply.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/ar/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/cs/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/da/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/de/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/el/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/es/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/fi/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/fil/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/lv/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/nds/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/nl/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/pt_BR/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/pt_PT/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/ru/
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/ar/
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/pt_BR/
Translation: Forgejo/forgejo
Translation: Forgejo/forgejo-next
2025-05-08 06:08:41 +00:00
Renovate Bot
b3e25cf536 Update dependency globals to v16.1.0 (forgejo) (#7814)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7814
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-08 05:23:27 +00:00
Renovate Bot
683305e5b9 Update module golang.org/x/oauth2 to v0.30.0 (forgejo) (#7809)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7809
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-07 18:41:48 +00:00
Renovate Bot
332705d841 Update module golang.org/x/net to v0.40.0 (forgejo) (#7798)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7798
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-07 17:38:15 +00:00
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