Commit graph

22782 commits

Author SHA1 Message Date
Renovate Bot
beddf442b1 Update renovate to v39.233.5 (forgejo) (#7484)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-07 06:28:32 +00:00
Gwendolyn
08b2ec2300 fix acme renewal (#7409)
## 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.
  - [ ] 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/7409
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Gwendolyn <me@gwendolyn.dev>
Co-committed-by: Gwendolyn <me@gwendolyn.dev>
2025-04-06 15:26:47 +00:00
Renovate Bot
9d984fedf3 Update dependency clippie to v4.1.6 (forgejo) (#7472)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7472
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-04-06 12:30:25 +00:00
Gusted
e6c17f31be fix(ui): only run auth_name code on new and edit page (#7470)
- Only run the dynamic `auth_name` update code when its on the new or edit page. `.admin.authentication` also matches the main authentication screen which lead to a javascript error.
- Regression of forgejo/forgejo#7408

# Testing
1. Login as a admin.
2. Go to `/admin/auths`.
3. Notice no errors.
4. Go to `admin/auths/new`.
6. Select 'OAuth2' as authentication type.
5. Type some input into the 'Authentication name'.
6. Notice the the callback URL in the 'Tips' section including the authentication name.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7470
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-06 12:25:29 +00:00
Renovate Bot
b04bb28ed1 Update module github.com/blevesearch/bleve/v2 to v2.5.0 (forgejo) (#7468)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/blevesearch/bleve/v2](https://github.com/blevesearch/bleve) | require | minor | `v2.4.4` -> `v2.5.0` |

---

### Release Notes

<details>
<summary>blevesearch/bleve (github.com/blevesearch/bleve/v2)</summary>

### [`v2.5.0`](https://github.com/blevesearch/bleve/releases/tag/v2.5.0)

[Compare Source](https://github.com/blevesearch/bleve/compare/v2.4.4...v2.5.0)

##### Bug Fixes

-   Exact hits to score higher than fuzzy hits, with https://github.com/blevesearch/bleve/pull/2056
-   Fix boosting during hybrid search that involves text + nearest neighbor, with https://github.com/blevesearch/bleve/pull/2127
-   Addressed bug in IP field handling while highlighting, with https://github.com/blevesearch/bleve/pull/2142
-   Graceful error handling within registry, with https://github.com/blevesearch/bleve/pull/2151
-   `http/` package (meant for demo purposes) removed from repository to remove vulnerability - [CVE-2022-31022](https://github.com/blevesearch/bleve/security/advisories/GHSA-9w9f-6mg8-jp7w), relocated to within https://github.com/blevesearch/bleve-explorer
-   Geo radius queries will now advertise distances (within sort values) in readable format, with https://github.com/blevesearch/bleve/pull/2137

##### Improvements

-   Vector search requires `faiss` dynamic library to be built from [blevesearch/faiss@352484e](352484e0fc) which is a modified version of [v1.10.0](https://github.com/facebookresearch/faiss/releases/tag/v1.10.0)
-   Support for **BM25 scoring**, see: [scoring.md](https://github.com/blevesearch/bleve/blob/v2.5.0/docs/scoring.md#bm25)
-   Support for **synonyms' search**, see: [synonyms.md](https://github.com/blevesearch/bleve/blob/v2.5.0/docs/synonyms.md)
-   **Significant performance improvements in pre-filtered vector search**, with https://github.com/blevesearch/bleve/pull/2169 + dependent changes
-   `auto` fuzziness detection with https://github.com/blevesearch/bleve/pull/2060
-   Ability to affect ingestion/drain rate by tuning persister workers with https://github.com/blevesearch/bleve/pull/2100
-   Additional config in merge policy for improved merger behavior, with https://github.com/blevesearch/bleve/pull/2134
-   Geo improvements: footprint reduction for polygons, better validation and graceful error handling, with https://github.com/blevesearch/bleve/pull/2162 + https://github.com/blevesearch/bleve/pull/2158 + https://github.com/blevesearch/bleve/pull/2165
-   Upgrade to RoaringBitmap/roaring@v2.4.5, etcd.io/bbolt@v1.4.0
-   More metrics

##### Milestone

-   [v2.5.0](https://github.com/blevesearch/bleve/milestone/24)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjIuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIyMi4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7468
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Shiny Nematoda <snematoda@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-06 08:41:38 +00:00
voltagex
cb4ef4495a Minor grammatical fix to runner deletion message (#7479)
WIP until someone else tells me whether the whole message should be changed or whether `s/mark/marked/` is enough.
I am honestly not sure what "It may break building workflow." means in this context either but it doesn't sound correct to me.

## Checklist
*snipped* - this is really minor, please let me know if there's a better checklist to use for changes like this

### Release notes

- [x] I do not want this change to show in the release notes.  [Change is too minor]

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7479
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: voltagex <git@voltagex.org>
Co-committed-by: voltagex <git@voltagex.org>
2025-04-06 08:40:54 +00:00
Renovate Bot
d46cf46f6e Update module golang.org/x/oauth2 to v0.29.0 (forgejo) (#7475)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2) | require | minor | [`v0.28.0` -> `v0.29.0`](https://cs.opensource.google/go/x/oauth2/+/refs/tags/v0.28.0...refs/tags/v0.29.0) |

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjIuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIyMi4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7475
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-06 08:31:01 +00:00
Renovate Bot
577a694df6 Update module github.com/fsnotify/fsnotify to v1.9.0 (forgejo) (#7473)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) | require | minor | `v1.8.0` -> `v1.9.0` |

---

### Release Notes

<details>
<summary>fsnotify/fsnotify (github.com/fsnotify/fsnotify)</summary>

### [`v1.9.0`](https://github.com/fsnotify/fsnotify/releases/tag/v1.9.0)

[Compare Source](https://github.com/fsnotify/fsnotify/compare/v1.8.0...v1.9.0)

##### Changes and fixes

-   all: make BufferedWatcher buffered again ([#&#8203;657])

-   inotify: fix race when adding/removing watches while a watched path is being deleted ([#&#8203;678], [#&#8203;686])

-   inotify: don't send empty event if a watched path is unmounted ([#&#8203;655])

-   inotify: don't register duplicate watches when watching both a symlink and its target; previously that would get "half-added" and removing the second would panic ([#&#8203;679])

-   kqueue: fix watching relative symlinks ([#&#8203;681])

-   kqueue: correctly mark pre-existing entries when watching a link to a dir on kqueue ([#&#8203;682])

-   illumos: don't send error if changed file is deleted while processing the event ([#&#8203;678])

[#&#8203;657]: https://github.com/fsnotify/fsnotify/pull/657

[#&#8203;678]: https://github.com/fsnotify/fsnotify/pull/678

[#&#8203;686]: https://github.com/fsnotify/fsnotify/pull/686

[#&#8203;655]: https://github.com/fsnotify/fsnotify/pull/655

[#&#8203;681]: https://github.com/fsnotify/fsnotify/pull/681

[#&#8203;679]: https://github.com/fsnotify/fsnotify/pull/679

[#&#8203;682]: https://github.com/fsnotify/fsnotify/pull/682

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjIuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIyMi4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7473
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-06 08:22:49 +00:00
Gusted
6fa5705d4b fix(ui): ensure dimmer always covers whole page (#7471)
- Ensure that the dimmer always covers the whole page and that the modal is centered.
- Ensure that `body` hides overflow so you cannot scroll on the page after the modal is opened.
- The adjusted CSS 'behavior' originates from the original dimmer module.
- Regression of https://codeberg.org/forgejo/forgejo/pulls/7416.
- E2E test added.

Screenshots

Before:
https://codeberg.org/attachments/fb8c84b3-94ba-4597-b468-4bf344f356ed

After:
https://codeberg.org/attachments/a6583eb9-1ec7-4e40-960a-4986f6e17535

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7471
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-04-06 04:23:03 +00:00
Gusted
56cc841b65 chore: always enable webpack progress (#7463)
- Webpack is currently quite slow while compiling the whole frontend, even for a very fast machine this can take 30s, but for normal machines this can take over a minute. In the development mode (`make watch`) a handy status is shown that tells what webpack is doing and an approximate progress.
- Enable this progress always, this means that this is now also shown when you run `make build` and should hopefully give a good indication how long the webpack step should take.
- Configure the progress to also show the module its currently 'working on'. This is more interesting than the amount of modules webpack still needs to work on (which steadily increase as webpack seems to incrementally resolves to more modules).

## Screenshot

![image](/attachments/96b1176a-6a6b-4a44-a8f3-fb56ce7b0fc6)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7463
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-05 12:49:14 +00:00
Renovate Bot
2e6f624d2f Update dependency typescript to v5.8.3 (forgejo) (#7467)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7467
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-04-05 06:02:14 +00:00
Renovate Bot
0766cb4776 Update dependency ansi_up to v6.0.5 (forgejo) (#7465)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7465
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-04-05 01:24:46 +00:00
0ko
7145665cbf chore(i18n): add a meta line to the base json translation (#7462)
Ref https://codeberg.org/forgejo/discussions/issues/326

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7462
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: floss4good <floss4good@noreply.codeberg.org>
2025-04-04 16:27:16 +00:00
Mathieu Fenniak
6ad706aa88 feat(ui): Automatically refresh workflows in the "Actions" list (#7361)
- Make the "Actions" list (for example, https://codeberg.org/forgejo/forgejo/actions) dynamically refresh using htmx and partial page reloading. This addresses a pet peeve of mine, I find it common to end up on this page and have workflows in-progress, but not be able to monitor the workflows to success or failure from the page as it currently doesn't do any data refreshing.
- There are a few major risks involves with this change.
  - Increased server-side load & network utilization.  In order to mitigate this risk, I have configured the refresh to occur every 30 seconds **only** when the Page Visibility API indicates that the web page is currently visible to the end-user. It is still reasonable to assume this change will increase server-side load though.
  - UI interactions on the page, such as the "Actor" and "Status" dropdown and the workflow dispatch form, would be replaced from the server with non-expanded UI during the refresh. This problem is prevented by stopping the refresh while these UIs are in their expanded states.
- E2E tests added.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7361
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-04-04 14:38:54 +00:00
Renovate Bot
c977585e4c Update dependency ansi_up to v6.0.3 (forgejo) (#7456)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7456
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-04-04 04:04:58 +00:00
Renovate Bot
a0df27c929 Update module github.com/alecthomas/chroma/v2 to v2.16.0 (forgejo) (#7459)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) | require | minor | `v2.15.0` -> `v2.16.0` |

---

### Release Notes

<details>
<summary>alecthomas/chroma (github.com/alecthomas/chroma/v2)</summary>

### [`v2.16.0`](https://github.com/alecthomas/chroma/releases/tag/v2.16.0)

[Compare Source](https://github.com/alecthomas/chroma/compare/v2.15.0...v2.16.0)

#### Changelog

-   [`ad6f149`](https://github.com/alecthomas/chroma/commit/ad6f149) chore: clean up Makefile
-   [`9909f65`](https://github.com/alecthomas/chroma/commit/9909f65) fix: switch to jsdelivr as unpkg was throwing CORS errors
-   [`34bf362`](https://github.com/alecthomas/chroma/commit/34bf362) chore(deps): update all non-major dependencies ([#&#8203;1066](https://github.com/alecthomas/chroma/issues/1066))
-   [`88084b6`](https://github.com/alecthomas/chroma/commit/88084b6) fix: Dot in a string breaks the highlighting in Terraform. Fixes [#&#8203;988](https://github.com/alecthomas/chroma/issues/988) ([#&#8203;1065](https://github.com/alecthomas/chroma/issues/1065))
-   [`62197e9`](https://github.com/alecthomas/chroma/commit/62197e9) Add lexers.Aliases() method to display only lexers' aliases ([#&#8203;1057](https://github.com/alecthomas/chroma/issues/1057))
-   [`7feb358`](https://github.com/alecthomas/chroma/commit/7feb358) chore(deps): update dependency svu to v3 ([#&#8203;1053](https://github.com/alecthomas/chroma/issues/1053))
-   [`30e0bc6`](https://github.com/alecthomas/chroma/commit/30e0bc6) chore(deps): update all non-major dependencies ([#&#8203;1061](https://github.com/alecthomas/chroma/issues/1061))
-   [`e0c7747`](https://github.com/alecthomas/chroma/commit/e0c7747)  Fix IP address as name detection in nginx conf ([#&#8203;1060](https://github.com/alecthomas/chroma/issues/1060))
-   [`0bf0e9f`](https://github.com/alecthomas/chroma/commit/0bf0e9f) Add luau file extension and alias to lua lexer ([#&#8203;1056](https://github.com/alecthomas/chroma/issues/1056))
-   [`0e0e282`](https://github.com/alecthomas/chroma/commit/0e0e282) chore(deps): update all non-major dependencies ([#&#8203;1049](https://github.com/alecthomas/chroma/issues/1049))
-   [`4b0882a`](https://github.com/alecthomas/chroma/commit/4b0882a) add Janet lexer ([#&#8203;1045](https://github.com/alecthomas/chroma/issues/1045))
-   [`81fecd5`](https://github.com/alecthomas/chroma/commit/81fecd5) chore(deps): update all non-major dependencies ([#&#8203;1041](https://github.com/alecthomas/chroma/issues/1041))
-   [`dc982d2`](https://github.com/alecthomas/chroma/commit/dc982d2) Add Mojo lexer ([#&#8203;1044](https://github.com/alecthomas/chroma/issues/1044))
-   [`79621af`](https://github.com/alecthomas/chroma/commit/79621af) Fix solidity lexer's handling of inline assembly ([#&#8203;1040](https://github.com/alecthomas/chroma/issues/1040))
-   [`9da461e`](https://github.com/alecthomas/chroma/commit/9da461e) chore(deps): update module github.com/mattn/go-colorable to v0.1.14 ([#&#8203;1039](https://github.com/alecthomas/chroma/issues/1039))
-   [`f0d460e`](https://github.com/alecthomas/chroma/commit/f0d460e) Update Odin lexer for new build tag feature ([#&#8203;1038](https://github.com/alecthomas/chroma/issues/1038))
-   [`0bd7c68`](https://github.com/alecthomas/chroma/commit/0bd7c68) chore: bump go.mod to Go 1.22 + add Iterator.Stdlib()
-   [`d829579`](https://github.com/alecthomas/chroma/commit/d829579) fix(ocaml): support multistring ([#&#8203;1035](https://github.com/alecthomas/chroma/issues/1035))
-   [`e79c813`](https://github.com/alecthomas/chroma/commit/e79c813) chore(deps): update all non-major dependencies ([#&#8203;1029](https://github.com/alecthomas/chroma/issues/1029))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjIuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIyMi4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7459
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-04 03:52:13 +00:00
Renovate Bot
d688ca4515 Update module code.gitea.io/sdk/gitea to v0.21.0 (forgejo) (#7458)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| code.gitea.io/sdk/gitea | require | minor | `v0.20.0` -> `v0.21.0` |

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjIuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIyMi4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7458
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-04 03:49:54 +00:00
Gusted
53df0bf9a4 chore(sec): unify usage of crypto/rand.Read (#7453)
- Unify the usage of [`crypto/rand.Read`](https://pkg.go.dev/crypto/rand#Read) to `util.CryptoRandomBytes`.
- Refactor `util.CryptoRandomBytes` to never return an error. It is documented by Go, https://go.dev/issue/66821, to always succeed. So if we still receive a error or if the returned bytes read is not equal to the expected bytes to be read we panic (just to be on the safe side).
- This simplifies a lot of code to no longer care about error handling.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7453
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-04 03:31:37 +00:00
Gusted
99fc04b763 fix: make installing Forgejo work again (#7452)
- The default engine is no longer guaranteed to be of the type `*xorm.Engine`, so instead return the interface `db.Engine`.
- Regression of forgejo/forgejo#7212

# Testing

1. Install a Forgejo instance via the setup screen.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7452
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-04 03:30:19 +00:00
Gusted
afea42d517 chore: add empty action_variable fixture (#7419)
- Ensures that this table gets emptied between integration tests and does not have any leftovers.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7419
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-03 23:42:37 +00:00
Gusted
1ec672694a chore(i18n): cleanup settings.adopt string (#7451)
The translation of `settings.adopt` is not actually used, it is set as the title for a POST handler that does not actually render any template. It does render the the 'Internal server error' template, however for safety reasons it does not use the set context data.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7451
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-03 16:50:39 +00:00
Gnarwhal
d28a64e538 fix: handle viewing a submodule entry (#7261)
- When trying to view a submodule directory via the normal `/src/branch/` path, generate a redirect link to the submodule location.
- Resolves forgejo/forgejo#5267

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7261
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Gnarwhal <git.aspect893@passmail.net>
Co-committed-by: Gnarwhal <git.aspect893@passmail.net>
2025-04-03 15:32:55 +00:00
famfo
77b0275572 feat(activitiypub): enable HTTP signatures on all ActivityPub endpoints (#7035)
- Set the right keyID and use the right signing keys for outgoing requests.
- Verify the HTTP signature of all incoming requests, except for the server actor.
- Caches keys of incoming requests for users and servers actors.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7035
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: famfo <famfo@famfo.xyz>
Co-committed-by: famfo <famfo@famfo.xyz>
2025-04-03 15:24:15 +00:00
Gusted
ba5b157f7e feat(build): uniform ini parsing (#7429)
- Use the existing ini parser for the `lint-locale` and `lint-locale-usage` tooling.
- This discovered that the previous ini parser was not correctly parsing certain types of string, specifically those with `;` as it's seen as a comment. It now properly 'unescapes' that and is not seen as a comment break.
- Discovered-by: @fogti

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7429
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-03 08:27:02 +00:00
Earl Warren
4ab40ed6af i18n: update of translations from Codeberg Translate (#7363)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7363
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-04-03 07:53:45 +00:00
Codeberg Translate
275d8250ea
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: Atalanttore <atalanttore@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: EkaterinePapava <ekaterinepapava@noreply.codeberg.org>
Co-authored-by: Fjuro <fjuro@noreply.codeberg.org>
Co-authored-by: GewoonLeon <gewoonleon@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
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: SomeTr <sometr@noreply.codeberg.org>
Co-authored-by: Zughy <zughy@noreply.codeberg.org>
Co-authored-by: darkswordreams <darkswordreams@noreply.codeberg.org>
Co-authored-by: earl-warren <earl-warren@noreply.codeberg.org>
Co-authored-by: justbispo <justbispo@noreply.codeberg.org>
Co-authored-by: kwoot <kwoot@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/da/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/de/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/es/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/fil/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/it/
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/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/fil/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/fr/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/hi/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/it/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ja/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ka/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/lv/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/nds/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/nl/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/pt_BR/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/pt_PT/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ru/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/tr/
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-04-03 07:02:09 +00:00
Gusted
5e79b39654 fix(migrations): transfer PR flow information (#7421)
- When migrating a pull requests from a Gitea or Forgejo instance, check if the pull request was created via the AGit flow and transfer that bit of information to the migrated pull request.
- Expose this bit of information as the `flow` field for the pull request.
- We have to do a horrible Go hack with Gitea's [go-sdk](gitea.com/gitea/go-sdk) to list all pull requests while being able to decode it to a struct that contains the new `Flow` field. The library does not allow you to do this out of the box, so we have to use `go:linkname` to access the private method that allows us to do this. This in turn means we have to do some boilerplate code that the library otherwise would do for us. The better option would be forking, but that would be a hassle of keeping the library in sync.
- Resolves forgejo/forgejo#5848
- Unit test added.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7421
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-03 06:47:37 +00:00
Renovate Bot
738f721f3a Update module github.com/mattn/go-sqlite3 to v1.14.27 (forgejo) (#7434)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7434
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-04-03 00:49:26 +00:00
Ellen Emilia Anna Zscheile
49709bb270 feat(build): run lint-locale-usage w/o --allow-missing-msgids (#7433)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7433
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Co-committed-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
2025-04-02 23:52:10 +00:00
Gusted
ee5b102142 fix: make repo clone https/ssh listener conditional (#7431)
- It's possible that either the SSH or HTTPS element does not exist. Thus make adding the event listener conditional.
- Ref: forgejo/forgejo#7408
- Reported-by: @0ko

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7431
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-02 18:53:01 +00:00
Gusted
5706a2452e fix(ui): display user-friendly message for range error (#7420)
- Instead of displaying 'RangeError: Range' display 'x must be a number between $MIN and $MAX' when the validation fails for a range error check.
- Resolves forgejo/forgejo#3510
- Added integration testing.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7420
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-02 15:48:09 +00:00
Ellen Emilia Anna Zscheile
15a2338ff2 feat(build): teach lint-locale-usage about trPluralString (#7425)
This requires using the more complicated parsing from localestore.go

In order to avoid future code drift and code duplication,
localestore.go was refactored to call IterateMessagesContent instead of
essentially duplicating the code of RecursivelyAddTranslationsFromJSON
with small adjustments.

locale/utils.go was moved to translation/localeiter/utils.go
in order to avoid spreading translation-related routines among completely
different places.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7425
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Co-committed-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
2025-04-02 14:57:45 +00:00
Gusted
bd9366e7fc fix(i18n): fix several usages of i18n (#7422)
- Add new translations, if an existing one couldn't be used.
- Use existing translations, if one existed and fit the purpose.
- Spotted by the lint-locale-usage tooling by @fogti.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7422
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-02 14:50:02 +00:00
Gusted
f691f03741 chore(ui): remove fomantic's dimmer module (#7416)
- Fomantic's dimmer module is responsible for dimming the page and make some element the primary focus on the page (e.g. modal). This module is only used by Fomantic's modal module.
- Remove it and replace the javascript with our own `Dimmer` class that is able to provide Fomantic's modal module with everything it needs.
- Replace the CSS with our own bare minimum CSS.
- No functionality or visual is affected by this replacement.
- E2E test added.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7416
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-02 12:54:54 +00:00
Renovate Bot
d656978818 Update module github.com/go-webauthn/webauthn to v0.12.3 (forgejo) (#7423)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7423
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-02 10:43:36 +00:00
Renovate Bot
18c38ed1f3 Update module github.com/mattn/go-sqlite3 to v1.14.25 (forgejo) (#7424)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7424
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-04-02 00:44:39 +00:00
Renovate Bot
61885a0eaa Update dependency go to v1.24.2 (forgejo) (#7417)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7417
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-04-01 18:34:02 +00:00
0ko
6ad625b0c1 feat(ui): make JS asset load error message translatable (#7388)
- The 'Failed to load asset files from [...]' is now an translatable string.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7388
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-04-01 16:14:38 +00:00
Gusted
c497ef9e81 chore: enable several no-jquery rules (#7408)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7408
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
2025-04-01 16:08:51 +00:00
0ko
da62c2cac6 chore(ui): remove ineffective class small in inline code preview (#7414)
Followup to https://codeberg.org/forgejo/forgejo/pulls/2669
Ref https://codeberg.org/forgejo/forgejo/issues/5067

Since Forgejo v9 this class is overridden here by other CSS and is ineffective. But it looks ok and gives good visibility. If it needs to be re-implemed, it can be done via CSS, like:
```css
.file-preview-box .header span {font-size:0.8rem;}
```

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7414
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-04-01 15:55:56 +00:00
Gusted
979cc5cd93 [gitea] week 2025-13 cherry pick (gitea/main -> forgejo) (#7397)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7397
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-04-01 13:35:02 +00:00
Renovate Bot
c9c8fb6501 Update vitest monorepo to v3.1.1 (forgejo) (#7407)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-01 02:52:46 +00:00
Gusted
d9892e57bd
chore: enable no-jquery/no-map-collection
No linter errors reported.
2025-04-01 04:44:44 +02:00
Gusted
9420d3d0a5
chore: enable no-jquery/no-trigger
- A lot of substitution to `.requestSubmit()`.
- Where possible, rewrite some other jquery to vanilla javascript to
ease the linter fix.
2025-04-01 04:43:06 +02:00
Gusted
c124014115
chore: enable no-jquery/no-each-util
- No longer allow `$.each`. This can easily be done with vanilla javascript.
2025-04-01 03:59:12 +02:00
Gusted
9eb67ba8ed
chore: enable no-jquery/no-sizzle
Don't rely on Jquery's CSS selector engine.
2025-04-01 03:58:09 +02:00
Gusted
dde7c4a770
chore: add new no-jquery rules
Were added in version v3.1.0.
2025-04-01 03:55:34 +02:00
Renovate Bot
8fdcde5f22 Update linters to v8.29.0 (forgejo) (#7406)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-01 00:44:50 +00:00
Lunny Xiao
b296354873
Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (#34053)
When a team have no code unit permission of a repository, the member of
the team should not view activity contributors, recent commits and code
frequrency.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 49899070cd600e7b7bd31a750f4d49de1722db23)
2025-04-01 02:28:02 +02:00
Royce Remer
adc2a215c1
Fail mirroring more gracefully (#34002)
* reuse recoverable error checks across mirror_pull
* add new cases for 'cannot lock ref/not our ref' (race condition in
fetch) and 'Unable to create/lock"
* move lfs sync right after commit graph write, and before other
maintenance which may fail
* try a prune for 'broken reference' as well as 'not our ref'
* always sync LFS right after commit graph write, and before other
maintenance which may fail

This handles a few cases where our very large and very active
repositories could serve mirrored git refs, but be missing lfs files:

## Case 1 (multiple variants): Race condition in git fetch
There was already a check for 'unable to resolve reference' on a failed
git fetch, after which a git prune and then subsequent fetch are
performed. This is to work around a race condition where the git remote
tells Gitea about a ref for some HEAD of a branch, then fails a few
seconds later because the remote branch was deleted, or the ref was
updated (force push).

There are two more variants to the error message you can get, but for
the same kind of race condition. These *may* be related to the git
binary version Gitea has access to (in my case, it was 2.48.1).

## Case 2: githttp.go can serve updated git refs before it's synced lfs
oids

There is probably a more aggressive refactor we could do here to have
the cat-file loop use FETCH_HEAD instead of relying on the commit graphs
to be committed locally (and thus serveable to clients of Gitea), but a
simple reduction in the occurrences of this for me was to move the lfs
sync block immediately after the commit-graph write and before any other
time-consuming (or potentially erroring/exiting) blocks.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit e0ad72e2233f885669c26d9063a91abd594fb9f6)
2025-04-01 02:28:02 +02:00