Compare commits

...

168 commits

Author SHA1 Message Date
0ko
bbb7f6ec6f feat(ui): enlarge metadata line gaps in issue list and refactor (#7580)
The metadata line can contain many things and can get very busy.

The main change this PR does is addition of `gap:0.5rem` to it's items, so they're better separated.

And there are some harmless refactors, too.

Preview:
https://codeberg.org/attachments/5854ee85-79b3-448a-aafd-4120f34e84e1 - before
https://codeberg.org/attachments/b546efe4-06b7-4cd5-84bf-0afb9e84b9d6 - after

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7580
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-22 14:58:32 +00:00
Gusted
358863999e fix: delay-write trace.dat for forgejo diagnosis (#7597)
- Delay the writing of `trace.dat` to the forgejo diagnosis zip file. It's not possible to write `cpu-profile.dat` and `trace.dat` at the same time. This caused the implemention to prematurely close `cpu-profile.dat` and leave it as an empty file.
- Regression of forgejo/forgejo#6470

## Testing
1. Go to `/admin/monitor`
2. Click on "Download diagnosis report"
3. Open the zip file and check that all files are non-empty.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7597
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-22 08:14:41 +00:00
0ko
603d655ec4 fix(i18n): prevent incorrect logging on strings missing in JSON locales (#7594)
Fixes https://codeberg.org/forgejo/forgejo/issues/7591
Followup to https://codeberg.org/forgejo/forgejo/pulls/6203

When the test runs without an actual fix included, an error message appears in the logs:
[E] Missing translation "incorrect_root_url"

With it, it does not.

Reported-by: Paweł Bogusławski <pboguslawski@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7594
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-22 03:49:37 +00:00
0ko
8e0b86a5dc fix(ui): overflow tabular menu CSS fixes (#7578)
Change 1

Followup to https://codeberg.org/forgejo/forgejo/pulls/7314
and https://codeberg.org/forgejo/forgejo/pulls/7356

Replace baseline with center, because baseline alignment is broken with Asian scripts.

Preview:
https://codeberg.org/attachments/f612ca9b-5033-44f1-8bea-b71170c1f595 - bug
https://codeberg.org/attachments/69e021eb-96dc-40b1-8c65-9fb4a378e051 - with fix applied

Change 2

Followup to https://codeberg.org/forgejo/forgejo/pulls/7108
and https://codeberg.org/forgejo/forgejo/issues/4169

Rescope `.ui.tabular.menu .item { height: 100%;}` to overflow menu, because it was only meant for overflow menu based on PR context, but started to negatively impact the other "bookmark" style menus: they've got an extra bottom line under active tabs.

Preview:
https://codeberg.org/attachments/b535e437-16fd-4af2-ae8c-221618ec6b8c - bug
https://codeberg.org/attachments/10a3086d-8fe7-4317-bd66-71e8139b2cc7 - bug in another area
https://codeberg.org/attachments/6a6b8994-c982-48d0-98fe-68e70ba709c2 - with fix applied
https://codeberg.org/attachments/8fd8a332-a9ec-4b28-948e-a4e986e301da - intended fix still applies

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7578
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-21 07:25:17 +00:00
Renovate Bot
424606c8a4 Update renovate to v39.252.0 (forgejo) (#7587)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-21 06:39:22 +00:00
0ko
507280b073 fix(ui): use gap in switch items (#7581)
Followup to PRs where the old switches were converted to this one.

The main change here is to the switch with counter. It was missing a gap.

Additionally, it removes tailwind helpers the other switches retained from before switch refactors, because they are now using gap.

Preview:
https://codeberg.org/attachments/6191f55e-0b61-49fa-ba8f-cd9c93ca7bd4
https://codeberg.org/attachments/a03fb681-45b7-40f5-929e-55154abeb20d
No visual change to the ones with icons.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7581
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-21 04:25:08 +00:00
0ko
acf6c13fd9 fix(ui/pr): use eye icon for reviews (#7584)
Followup to https://codeberg.org/forgejo/forgejo/pulls/6523
Reverts icon change introduced in https://codeberg.org/forgejo/forgejo/pulls/5695

It went unnoticed since v10 and was likely caused by bad copy paste and I don't think it's really worth a test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7584
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-20 13:41:51 +00:00
0ko
fda68ddf20 i18n(en): add positional hints to sync_fork placeholders (#7579)
Followup to https://codeberg.org/forgejo/forgejo/pulls/2364.

It's only possible to use them without hints in the correct order in the string, because our i18n is not smart enough to figure out types in such strings on it's own.

In some languages translators preferred to first specify branch name and then amount of commits without hints and got broken strings.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7579
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-04-20 07:06:03 +00:00
0ko
a0c9e81611 feat(ui): redesign migration selection screen (#6795)
Ref https://codeberg.org/forgejo/design/issues/9.

Changes:
* Updated SVGs which had inconsistent paddings making them look off
* Better usability on mobile
* Better space efficiency on desktop, up to 4 columns
* Nice responsive design
* Less bland look on desktop. The borders were already here but invisible in Forgejo dark theme

Preview:
* https://codeberg.org/attachments/3c9e10ae-3315-46e5-b8bb-8021f6fd8936
* https://codeberg.org/attachments/8196ad89-5ab6-443a-98ce-a70dcc75bca9
* https://codeberg.org/attachments/24f52a14-2ac4-4949-8108-55c34bd3c650

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6795
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Otto <otto@codeberg.org>
2025-04-19 13:51:35 +00:00
Gusted
78e56ee2f7 [gitea] week 2025-15 cherry pick (gitea/main -> forgejo) (#7538)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7538
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-19 12:59:09 +00:00
Beowulf
9a4ded7d80 fix(ui): use correct branch name in branch tag selector (#7575)
Regression from: https://codeberg.org/forgejo/forgejo/pulls/7571

Needed for: https://codeberg.org/forgejo/forgejo/pulls/7574

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7575
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2025-04-19 07:00:50 +00:00
Beowulf
3f673ce4d4 fix(ui): show commit icon in branch dropdown button when viewing a commit (#7571)
Closes https://codeberg.org/forgejo/forgejo/issues/7570

Fixed never running repo-home e2e test for language switcher

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7571
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Beowulf <beowulf@beocode.eu>
Co-committed-by: Beowulf <beowulf@beocode.eu>
2025-04-19 04:33:07 +00:00
Renovate Bot
6d7b1f87e4 Update dependency webpack to v5.99.6 (forgejo) (#7573)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7573
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-19 00:32:36 +00:00
Stefan
f3882d4553 fix: allow user with actions write permission to run a workflow from the web UI (#7245)
Users with permissions actions write can reschedule a workflow or start a new one over the API. But if the user try to use workflow dispatch on the web GUI it fails with 404 error.

Debug log says
```
router: completed POST /<owner>/<repo>/actions/manual for <client ip>, 404 Not Found in 21.6ms @ context/permission.go:17(web.registerRoutes.RequireRepoAdmin)
```

I think this is not correct, users with permissons action write should also be able to run a new workflow over the GUI. This can be fixed with this little change.

## Testing

- Create a repository in an organization with [a manual workflow](https://forgejo.org/docs/next/user/actions/#onworkflow_dispatch)
- Create a user and assign it action write permissions for this repository in a team
- Login as the user and verify they are allowed to run the workflow via the web UI

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

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- User Interface bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7245): <!--number 7245 --><!--line 0 --><!--description YWxsb3cgdXNlciB3aXRoIGFjdGlvbnMgd3JpdGUgcGVybWlzc2lvbiB0byBydW4gYSB3b3JrZmxvdyBmcm9tIHRoZSB3ZWIgVUk=-->allow user with actions write permission to run a workflow from the web UI<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7245
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Stefan <stku@noreply.codeberg.org>
Co-committed-by: Stefan <stku@noreply.codeberg.org>
2025-04-18 19:17:03 +00:00
Paul-Emmanuel Raoul
58653d3700 feat(ui): improve description in packages settings (#7531)
- Improve the description of the 'Cargo registry index' and 'Chef registry'.
  - Move 'For more information' to be the first senctence.
  - Better explain what Chef's keypair button does.
- Resolves https://codeberg.org/forgejo/forgejo/issues/7140

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7531
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Co-authored-by: Paul-Emmanuel Raoul <skyper@skyplabs.net>
Co-committed-by: Paul-Emmanuel Raoul <skyper@skyplabs.net>
2025-04-18 12:36:59 +00:00
Gusted
23cc1fdbbe feat(api): add last_commit_when to contents response (#7418)
- Add a new field `last_commit_when` to the `ContentResponse` type, which is populated with the last commit's commiter date. This can be used to determine when the last edit of the content was.
- This field is compatible with what Gitea will likely add, https://github.com/go-gitea/gitea/pull/32921. There's no field for this information in the Github API, so no way to be compatible with that (this API endpoint is otherwise fully compatible with Github's API).
- Ref: gitnex/GitNex#1225
- Integration test adjusted. The API tests cannot test the actual output, as `testify` tries to 'deep equal' the `time.Time` structs which will differ due how the `time.Time` struct is created. Unit tests still verify the output.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7418
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-18 09:31:40 +00:00
David Davies-Payne
813eabc340 fix: grammar in a release API error message (#7565)
This is small bug fix to correct the API's response description.

Currently returns "Release is has no Tag"
I think would read better as "Release has no Tag"

I have not added a test as it's a trivial change, however it's possible that consumers might be looking for that particular string.

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

- [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/7565
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: David Davies-Payne <d2p@me.com>
Co-committed-by: David Davies-Payne <d2p@me.com>
2025-04-18 07:04:40 +00:00
Earl Warren
9720418bb5 i18n: update of translations from Codeberg Translate (#7507)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7507
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-04-17 15:10:54 +00:00
Codeberg Translate
4fe172e4b2
i18n: update of translations from Codeberg Translate
Co-authored-by: Caesar Schinas <caesar@caesarschinas.com>
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: Edgarsons <edgarsons@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-authored-by: Miguel P.L <miguel_pl@noreply.codeberg.org>
Co-authored-by: PeterDaveHello <peterdavehello@noreply.codeberg.org>
Co-authored-by: SomeTr <sometr@noreply.codeberg.org>
Co-authored-by: Wuzzy <wuzzy@disroot.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: lucasmz.dev <git@lucasmz.dev>
Co-authored-by: oscarotero <oscarotero@noreply.codeberg.org>
Co-authored-by: otf31 <otf31@noreply.codeberg.org>
Co-authored-by: themandalorian <themandalorian@noreply.codeberg.org>
Co-authored-by: xtex <xtexchooser@duck.com>
Co-authored-by: zerica <zerica@noreply.codeberg.org>
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo-next/fi/
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/zh_Hans/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/de/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/es/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/fr/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/gl/
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/pt_BR/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/pt_PT/
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-17 14:36:28 +00:00
Renovate Bot
4ce232bcfe Update module github.com/mattn/go-sqlite3 to v1.14.28 (forgejo) (#7560)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7560
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-17 10:40:44 +00:00
Renovate Bot
aa9d89c846 Update module github.com/caddyserver/certmagic to v0.23.0 (forgejo) (#7561)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/caddyserver/certmagic](https://github.com/caddyserver/certmagic) | require | minor | `v0.22.2` -> `v0.23.0` |

---

### Release Notes

<details>
<summary>caddyserver/certmagic (github.com/caddyserver/certmagic)</summary>

### [`v0.23.0`](https://github.com/caddyserver/certmagic/compare/v0.22.2...v0.23.0)

[Compare Source](https://github.com/caddyserver/certmagic/compare/v0.22.2...v0.23.0)

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI0MC4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7561
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-17 05:03:23 +00:00
Remo Senekowitsch
a13414341b feat: inline public ssh key in verification command (#7516)
This makes it easier for people to verify their SSH key with various
setups. People with a key stored in a file won't have to manually
substitute the correct file path anymore. People who store their SSH
key in a password manager and access it via an ssh-agent won't have
to copy the private key to a temporary file or figure out the process
substitution thing anymore.

A slight disadvantage is that the fish shell doesn't have the same
syntax for process substitution as POSIX shells. For that reason, a
default-collapsed box with a custom command for fish users is provided,
just like for the Windows shells.

The Windows shells do not have an equivalent to process substitution, so
those commands remain unchanged.

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

## [](#testing)Testing

* `pr=7516 ; git fetch forgejo +refs/pull/$pr/head:refs/heads/wip-pr-$pr`

* `git checkout wip-pr-$pr`

* `make TAGS='sqlite sqlite_unlock_notify' watch`

* login

* visit /user/settings/keys and add an ssh key

* click verify

* see a CLI sample is displayed
      ![image](attachments/8edf43f4-9ae9-48dc-b275-0c466e9a161d)

* run CLI sample, copy paste the output and submit it

* check that the verification is successful
      ![image](attachments/20074f32-e06f-42fd-9732-32171016c47e)

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

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- User Interface features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/7516): <!--number 7516 --><!--line 0 --><!--description aW5saW5lIHB1YmxpYyBzc2gga2V5IGluIHZlcmlmaWNhdGlvbiBjb21tYW5k-->inline public ssh key in verification command<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7516
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Remo Senekowitsch <remo@buenzli.dev>
Co-committed-by: Remo Senekowitsch <remo@buenzli.dev>
2025-04-17 05:00:21 +00:00
forgejo-release-manager
0f35e87290 chore(release-notes): Forgejo v11.0.0 (#7469)
https://codeberg.org/forgejo/forgejo/milestone/9323
Co-authored-by: Earl Warren <contact@earl-warren.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7469
Reviewed-by: Earl Warren <earl-warren@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-04-16 19:10:03 +00:00
Gusted
5c1c514361 fix(ui): make tag dropdown clickable again (#7558)
- forgejo/forgejo#7187 removed the usage of `reference column` class names, however some javascript code depended on it. Adjust this code to instead use the new class `branch-tag-item`.
- Ref: forgejo/forgejo#7187

## Testing

- visit a compare tag page
- see it is possible search for a tag
   ![image](/attachments/8006fc35-96d0-49ad-94d4-078030cb2323)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7558
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-16 12:28:39 +00:00
Renovate Bot
1b0e3c717f Update dependency python to v3.13.3 (forgejo) (#7557)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7557
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-16 10:37:41 +00:00
Earl Warren
c35550f324 chore(release): v10.0 is EOL (#7555)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7555
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-04-16 10:06:26 +00:00
zam
f6a5b783d2 add port and schema to federation host (#7203)
## 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.

### Documentation

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

### Release notes

- [ ] 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.

Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7203
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: zam <mirco.zachmann@meissa.de>
Co-committed-by: zam <mirco.zachmann@meissa.de>
2025-04-16 08:07:51 +00:00
Michael Kriese
23360ad415 chore(renovate): fix package name matching for go majors [skip ci] (#7554)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7554
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-04-16 07:47:47 +00:00
Renovate Bot
f711aaceb8 Update module github.com/golangci/golangci-lint/v2/cmd/golangci-lint to v2.1.2 (forgejo) (#7552)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [github.com/golangci/golangci-lint/v2/cmd/golangci-lint](https://github.com/golangci/golangci-lint) | patch | `v2.1.1` -> `v2.1.2` |

---

### Release Notes

<details>
<summary>golangci/golangci-lint (github.com/golangci/golangci-lint/v2/cmd/golangci-lint)</summary>

### [`v2.1.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v212)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.1...v2.1.2)

1.  Linters bug fixes
    -   `exptostd`: from 0.4.2 to 0.4.3
    -   `gofumpt`: from 0.7.0 to 0.8.0
    -   `protogetter`: from 0.3.13 to 0.3.15
    -   `usetesting`: from 0.4.2 to 0.4.3

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI0MC4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7552
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-16 05:42:20 +00:00
Renovate Bot
f28dbe4306 Update dependency chart.js to v4.4.9 (forgejo) (#7550)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7550
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-16 00:39:48 +00:00
Renovate Bot
2accf24f72 Update https://data.forgejo.org/actions/git-backporting action to v4.8.5 (forgejo) (#7551)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7551
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-16 00:39:07 +00:00
Renovate Bot
2570be93a6 Update Node.js to v22 (forgejo) (#7545)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [node](https://nodejs.org) ([source](https://github.com/nodejs/node)) | major | `20` -> `22` |

---

### Release Notes

<details>
<summary>nodejs/node (node)</summary>

### [`v22.14.0`](https://github.com/nodejs/node/releases/tag/v22.14.0): 2025-02-11, Version 22.14.0 &#x27;Jod&#x27; (LTS), @&#8203;aduh95

[Compare Source](https://github.com/nodejs/node/compare/v22.13.1...v22.14.0)

##### Notable Changes

-   \[[`82a9000e9e`](https://github.com/nodejs/node/commit/82a9000e9e)] - **crypto**: update root certificates to NSS 3.107 (Node.js GitHub Bot) [#&#8203;56566](https://github.com/nodejs/node/pull/56566)
-   \[[`b7fe54fc88`](https://github.com/nodejs/node/commit/b7fe54fc88)] - **(SEMVER-MINOR)** **fs**: allow `exclude` option in globs to accept glob patterns (Daeyeon Jeong) [#&#8203;56489](https://github.com/nodejs/node/pull/56489)
-   \[[`3ac92ef607`](https://github.com/nodejs/node/commit/3ac92ef607)] - **(SEMVER-MINOR)** **lib**: add typescript support to STDIN eval (Marco Ippolito) [#&#8203;56359](https://github.com/nodejs/node/pull/56359)
-   \[[`1614e8e7bc`](https://github.com/nodejs/node/commit/1614e8e7bc)] - **(SEMVER-MINOR)** **module**: add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX (Marco Ippolito) [#&#8203;56610](https://github.com/nodejs/node/pull/56610)
-   \[[`6d6cffa9cc`](https://github.com/nodejs/node/commit/6d6cffa9cc)] - **(SEMVER-MINOR)** **module**: add `findPackageJSON` util (Jacob Smith) [#&#8203;55412](https://github.com/nodejs/node/pull/55412)
-   \[[`d35333ae18`](https://github.com/nodejs/node/commit/d35333ae18)] - **(SEMVER-MINOR)** **process**: add process.ref() and process.unref() methods (James M Snell) [#&#8203;56400](https://github.com/nodejs/node/pull/56400)
-   \[[`07ff3ddcb5`](https://github.com/nodejs/node/commit/07ff3ddcb5)] - **(SEMVER-MINOR)** **sqlite**: support TypedArray and DataView in `StatementSync` (Alex Yang) [#&#8203;56385](https://github.com/nodejs/node/pull/56385)
-   \[[`94d3fe1b62`](https://github.com/nodejs/node/commit/94d3fe1b62)] - **(SEMVER-MINOR)** **src**: add --disable-sigusr1 to prevent signal i/o thread (Rafael Gonzaga) [#&#8203;56441](https://github.com/nodejs/node/pull/56441)
-   \[[`5afffb4415`](https://github.com/nodejs/node/commit/5afffb4415)] - **(SEMVER-MINOR)** **src,worker**: add isInternalWorker (Carlos Espa) [#&#8203;56469](https://github.com/nodejs/node/pull/56469)
-   \[[`697a851fb3`](https://github.com/nodejs/node/commit/697a851fb3)] - **(SEMVER-MINOR)** **test_runner**: add TestContext.prototype.waitFor() (Colin Ihrig) [#&#8203;56595](https://github.com/nodejs/node/pull/56595)
-   \[[`047537b48c`](https://github.com/nodejs/node/commit/047537b48c)] - **(SEMVER-MINOR)** **test_runner**: add t.assert.fileSnapshot() (Colin Ihrig) [#&#8203;56459](https://github.com/nodejs/node/pull/56459)
-   \[[`926cf84e95`](https://github.com/nodejs/node/commit/926cf84e95)] - **(SEMVER-MINOR)** **test_runner**: add assert.register() API (Colin Ihrig) [#&#8203;56434](https://github.com/nodejs/node/pull/56434)
-   \[[`c658a8afdf`](https://github.com/nodejs/node/commit/c658a8afdf)] - **(SEMVER-MINOR)** **worker**: add eval ts input (Marco Ippolito) [#&#8203;56394](https://github.com/nodejs/node/pull/56394)

##### Commits

-   \[[`bad1ad8650`](https://github.com/nodejs/node/commit/bad1ad8650)] - **assert**: make myers_diff function more performant (Giovanni Bucci) [#&#8203;56303](https://github.com/nodejs/node/pull/56303)
-   \[[`e222e36f3b`](https://github.com/nodejs/node/commit/e222e36f3b)] - **assert**: make partialDeepStrictEqual work with urls and File prototypes (Giovanni Bucci) [#&#8203;56231](https://github.com/nodejs/node/pull/56231)
-   \[[`e232789fe2`](https://github.com/nodejs/node/commit/e232789fe2)] - **assert**: show diff when doing partial comparisons (Giovanni Bucci) [#&#8203;56211](https://github.com/nodejs/node/pull/56211)
-   \[[`c99de1fdcf`](https://github.com/nodejs/node/commit/c99de1fdcf)] - **assert**: make partialDeepStrictEqual throw when comparing \[0] with \[-0] (Giovanni) [#&#8203;56237](https://github.com/nodejs/node/pull/56237)
-   \[[`2386fd5840`](https://github.com/nodejs/node/commit/2386fd5840)] - **benchmark**: add validateStream to styleText bench (Rafael Gonzaga) [#&#8203;56556](https://github.com/nodejs/node/pull/56556)
-   \[[`b197dfa7ec`](https://github.com/nodejs/node/commit/b197dfa7ec)] - **build**: fix GN build for ngtcp2 (Cheng) [#&#8203;56300](https://github.com/nodejs/node/pull/56300)
-   \[[`2a3cdd34ff`](https://github.com/nodejs/node/commit/2a3cdd34ff)] - **build**: test macos-13 on GitHub actions (Michaël Zasso) [#&#8203;56307](https://github.com/nodejs/node/pull/56307)
-   \[[`12f716be0a`](https://github.com/nodejs/node/commit/12f716be0a)] - **build**: build v8 with -fvisibility=hidden on macOS (Joyee Cheung) [#&#8203;56275](https://github.com/nodejs/node/pull/56275)
-   \[[`c5ca15bd34`](https://github.com/nodejs/node/commit/c5ca15bd34)] - **child_process**: fix parsing messages with splitted length field (Maksim Gorkov) [#&#8203;56106](https://github.com/nodejs/node/pull/56106)
-   \[[`8346b8fc2c`](https://github.com/nodejs/node/commit/8346b8fc2c)] - **crypto**: add missing return value check (Michael Dawson) [#&#8203;56615](https://github.com/nodejs/node/pull/56615)
-   \[[`82a9000e9e`](https://github.com/nodejs/node/commit/82a9000e9e)] - **crypto**: update root certificates to NSS 3.107 (Node.js GitHub Bot) [#&#8203;56566](https://github.com/nodejs/node/pull/56566)
-   \[[`890eef20a1`](https://github.com/nodejs/node/commit/890eef20a1)] - **crypto**: fix checkPrime crash with large buffers (Santiago Gimeno) [#&#8203;56559](https://github.com/nodejs/node/pull/56559)
-   \[[`5edb7b5e87`](https://github.com/nodejs/node/commit/5edb7b5e87)] - **crypto**: fix warning of ignoring return value (Cheng) [#&#8203;56527](https://github.com/nodejs/node/pull/56527)
-   \[[`b89f123a0b`](https://github.com/nodejs/node/commit/b89f123a0b)] - **crypto**: make generatePrime/checkPrime interruptible (James M Snell) [#&#8203;56460](https://github.com/nodejs/node/pull/56460)
-   \[[`63c1859e01`](https://github.com/nodejs/node/commit/63c1859e01)] - **deps**: update corepack to 0.31.0 (Node.js GitHub Bot) [#&#8203;56795](https://github.com/nodejs/node/pull/56795)
-   \[[`a48430d4d3`](https://github.com/nodejs/node/commit/a48430d4d3)] - **deps**: move inspector_protocol to deps (Chengzhong Wu) [#&#8203;56649](https://github.com/nodejs/node/pull/56649)
-   \[[`74cccc824f`](https://github.com/nodejs/node/commit/74cccc824f)] - **deps**: macro ENODATA is deprecated in libc++ (Cheng) [#&#8203;56698](https://github.com/nodejs/node/pull/56698)
-   \[[`fa869ea0f2`](https://github.com/nodejs/node/commit/fa869ea0f2)] - **deps**: fixup some minor coverity warnings (James M Snell) [#&#8203;56612](https://github.com/nodejs/node/pull/56612)
-   \[[`1a4fa2b015`](https://github.com/nodejs/node/commit/1a4fa2b015)] - **deps**: update amaro to 0.3.0 (Node.js GitHub Bot) [#&#8203;56568](https://github.com/nodejs/node/pull/56568)
-   \[[`b47076fd82`](https://github.com/nodejs/node/commit/b47076fd82)] - **deps**: update amaro to 0.2.2 (Node.js GitHub Bot) [#&#8203;56568](https://github.com/nodejs/node/pull/56568)
-   \[[`46bd4b8731`](https://github.com/nodejs/node/commit/46bd4b8731)] - **deps**: update simdutf to 6.0.3 (Node.js GitHub Bot) [#&#8203;56567](https://github.com/nodejs/node/pull/56567)
-   \[[`8ead9c693b`](https://github.com/nodejs/node/commit/8ead9c693b)] - **deps**: update simdutf to 5.7.2 (Node.js GitHub Bot) [#&#8203;56388](https://github.com/nodejs/node/pull/56388)
-   \[[`18d4b502af`](https://github.com/nodejs/node/commit/18d4b502af)] - **deps**: update amaro to 0.2.1 (Node.js GitHub Bot) [#&#8203;56390](https://github.com/nodejs/node/pull/56390)
-   \[[`d938d7cc86`](https://github.com/nodejs/node/commit/d938d7cc86)] - **deps**: update googletest to [`7d76a23`](https://github.com/nodejs/node/commit/7d76a23) (Node.js GitHub Bot) [#&#8203;56387](https://github.com/nodejs/node/pull/56387)
-   \[[`9761e7dccb`](https://github.com/nodejs/node/commit/9761e7dccb)] - **deps**: update googletest to [`e54519b`](https://github.com/nodejs/node/commit/e54519b) (Node.js GitHub Bot) [#&#8203;56370](https://github.com/nodejs/node/pull/56370)
-   \[[`8319dc6bc5`](https://github.com/nodejs/node/commit/8319dc6bc5)] - **deps**: update ngtcp2 to 1.10.0 (Node.js GitHub Bot) [#&#8203;56334](https://github.com/nodejs/node/pull/56334)
-   \[[`6eacd19d6a`](https://github.com/nodejs/node/commit/6eacd19d6a)] - **deps**: update simdutf to 5.7.0 (Node.js GitHub Bot) [#&#8203;56332](https://github.com/nodejs/node/pull/56332)
-   \[[`28bec2dda3`](https://github.com/nodejs/node/commit/28bec2dda3)] - **diagnostics_channel**: capture console messages (Stephen Belanger) [#&#8203;56292](https://github.com/nodejs/node/pull/56292)
-   \[[`d519d33502`](https://github.com/nodejs/node/commit/d519d33502)] - **doc**: update macOS and Xcode versions for releases (Michaël Zasso) [#&#8203;56337](https://github.com/nodejs/node/pull/56337)
-   \[[`fcfe650507`](https://github.com/nodejs/node/commit/fcfe650507)] - **doc**: add note for features using `InternalWorker` with permission model (Antoine du Hamel) [#&#8203;56706](https://github.com/nodejs/node/pull/56706)
-   \[[`efbba182b5`](https://github.com/nodejs/node/commit/efbba182b5)] - **doc**: add entry to changelog about SQLite Session Extension (Bart Louwers) [#&#8203;56318](https://github.com/nodejs/node/pull/56318)
-   \[[`31bf9c7dd9`](https://github.com/nodejs/node/commit/31bf9c7dd9)] - **doc**: move anatoli to emeritus (Michael Dawson) [#&#8203;56592](https://github.com/nodejs/node/pull/56592)
-   \[[`6096e38c7c`](https://github.com/nodejs/node/commit/6096e38c7c)] - **doc**: fix styles of the expandable TOC (Antoine du Hamel) [#&#8203;56755](https://github.com/nodejs/node/pull/56755)
-   \[[`d423638281`](https://github.com/nodejs/node/commit/d423638281)] - **doc**: add "Skip to content" button (Antoine du Hamel) [#&#8203;56750](https://github.com/nodejs/node/pull/56750)
-   \[[`edeb157d75`](https://github.com/nodejs/node/commit/edeb157d75)] - **doc**: improve accessibility of expandable lists (Antoine du Hamel) [#&#8203;56749](https://github.com/nodejs/node/pull/56749)
-   \[[`1a79e87687`](https://github.com/nodejs/node/commit/1a79e87687)] - **doc**: add note regarding commit message trailers (Dario Piotrowicz) [#&#8203;56736](https://github.com/nodejs/node/pull/56736)
-   \[[`927c7e47e4`](https://github.com/nodejs/node/commit/927c7e47e4)] - **doc**: fix typo in example code for util.styleText (Robin Mehner) [#&#8203;56720](https://github.com/nodejs/node/pull/56720)
-   \[[`fade522538`](https://github.com/nodejs/node/commit/fade522538)] - **doc**: fix inconsistencies in `WeakSet` and `WeakMap` comparison details (Shreyans Pathak) [#&#8203;56683](https://github.com/nodejs/node/pull/56683)
-   \[[`55533bf147`](https://github.com/nodejs/node/commit/55533bf147)] - **doc**: add RafaelGSS as latest sec release stewards (Rafael Gonzaga) [#&#8203;56682](https://github.com/nodejs/node/pull/56682)
-   \[[`8e978bdee1`](https://github.com/nodejs/node/commit/8e978bdee1)] - **doc**: clarify cjs/esm diff in `queueMicrotask()` vs `process.nextTick()` (Dario Piotrowicz) [#&#8203;56659](https://github.com/nodejs/node/pull/56659)
-   \[[`ae360c30dc`](https://github.com/nodejs/node/commit/ae360c30dc)] - **doc**: `WeakSet` and `WeakMap` comparison details (Shreyans Pathak) [#&#8203;56648](https://github.com/nodejs/node/pull/56648)
-   \[[`acd2a2fda5`](https://github.com/nodejs/node/commit/acd2a2fda5)] - **doc**: mention prepare --security (Rafael Gonzaga) [#&#8203;56617](https://github.com/nodejs/node/pull/56617)
-   \[[`d3c0a2831d`](https://github.com/nodejs/node/commit/d3c0a2831d)] - **doc**: tweak info on reposts in ambassador program (Michael Dawson) [#&#8203;56589](https://github.com/nodejs/node/pull/56589)
-   \[[`3299505b49`](https://github.com/nodejs/node/commit/3299505b49)] - **doc**: add type stripping to ambassadors program (Marco Ippolito) [#&#8203;56598](https://github.com/nodejs/node/pull/56598)
-   \[[`b1a6ffa4e4`](https://github.com/nodejs/node/commit/b1a6ffa4e4)] - **doc**: improve internal documentation on built-in snapshot (Joyee Cheung) [#&#8203;56505](https://github.com/nodejs/node/pull/56505)
-   \[[`1641a28930`](https://github.com/nodejs/node/commit/1641a28930)] - **doc**: document CLI way to open the nodejs/bluesky PR (Antoine du Hamel) [#&#8203;56506](https://github.com/nodejs/node/pull/56506)
-   \[[`2042628fda`](https://github.com/nodejs/node/commit/2042628fda)] - **doc**: add section about using npx with permission model (Rafael Gonzaga) [#&#8203;56539](https://github.com/nodejs/node/pull/56539)
-   \[[`ace19a0263`](https://github.com/nodejs/node/commit/ace19a0263)] - **doc**: update gcc-version for ubuntu-lts (Kunal Kumar) [#&#8203;56553](https://github.com/nodejs/node/pull/56553)
-   \[[`4aa57b50f8`](https://github.com/nodejs/node/commit/4aa57b50f8)] - **doc**: fix parentheses in options (Tobias Nießen) [#&#8203;56563](https://github.com/nodejs/node/pull/56563)
-   \[[`b40b01b4d3`](https://github.com/nodejs/node/commit/b40b01b4d3)] - **doc**: include CVE to EOL lines as sec release process (Rafael Gonzaga) [#&#8203;56520](https://github.com/nodejs/node/pull/56520)
-   \[[`6701360113`](https://github.com/nodejs/node/commit/6701360113)] - **doc**: add esm examples to node:trace_events (Alfredo González) [#&#8203;56514](https://github.com/nodejs/node/pull/56514)
-   \[[`d3207cca3e`](https://github.com/nodejs/node/commit/d3207cca3e)] - **doc**: add message for Ambassadors to promote (Michael Dawson) [#&#8203;56235](https://github.com/nodejs/node/pull/56235)
-   \[[`97ece4ae06`](https://github.com/nodejs/node/commit/97ece4ae06)] - **doc**: allow request for TSC reviews via the GitHub UI (Antoine du Hamel) [#&#8203;56493](https://github.com/nodejs/node/pull/56493)
-   \[[`03f25055ab`](https://github.com/nodejs/node/commit/03f25055ab)] - **doc**: add example for piping ReadableStream (Gabriel Schulhof) [#&#8203;56415](https://github.com/nodejs/node/pull/56415)
-   \[[`516d07482c`](https://github.com/nodejs/node/commit/516d07482c)] - **doc**: expand description of `parseArg`'s `default` (Kevin Gibbons) [#&#8203;54431](https://github.com/nodejs/node/pull/54431)
-   \[[`a6491effcb`](https://github.com/nodejs/node/commit/a6491effcb)] - **doc**: use `<ul>` instead of `<ol>` in `SECURITY.md` (Antoine du Hamel) [#&#8203;56346](https://github.com/nodejs/node/pull/56346)
-   \[[`e4ec134b21`](https://github.com/nodejs/node/commit/e4ec134b21)] - **doc**: clarify that WASM is trusted (Matteo Collina) [#&#8203;56345](https://github.com/nodejs/node/pull/56345)
-   \[[`0f7aed8a59`](https://github.com/nodejs/node/commit/0f7aed8a59)] - **doc**: fix the `crc32` documentation (Kevin Toshihiro Uehara) [#&#8203;55898](https://github.com/nodejs/node/pull/55898)
-   \[[`721104a296`](https://github.com/nodejs/node/commit/721104a296)] - **doc**: fix links in `module.md` (Antoine du Hamel) [#&#8203;56283](https://github.com/nodejs/node/pull/56283)
-   \[[`928540d792`](https://github.com/nodejs/node/commit/928540d792)] - **doc**: fix typos (Nathan Baulch) [#&#8203;55066](https://github.com/nodejs/node/pull/55066)
-   \[[`e69d35f03b`](https://github.com/nodejs/node/commit/e69d35f03b)] - **doc**: add history info for Permission Model (Antoine du Hamel) [#&#8203;56707](https://github.com/nodejs/node/pull/56707)
-   \[[`c6fd867ab5`](https://github.com/nodejs/node/commit/c6fd867ab5)] - **esm**: fix jsdoc type refs to `ModuleJobBase` in esm/loader (Jacob Smith) [#&#8203;56499](https://github.com/nodejs/node/pull/56499)
-   \[[`9cf9046bd7`](https://github.com/nodejs/node/commit/9cf9046bd7)] - ***Revert*** "**events**: add hasEventListener util for validate" (origranot) [#&#8203;56282](https://github.com/nodejs/node/pull/56282)
-   \[[`b7fe54fc88`](https://github.com/nodejs/node/commit/b7fe54fc88)] - **(SEMVER-MINOR)** **fs**: allow `exclude` option in globs to accept glob patterns (Daeyeon Jeong) [#&#8203;56489](https://github.com/nodejs/node/pull/56489)
-   \[[`6ca27c2a59`](https://github.com/nodejs/node/commit/6ca27c2a59)] - **http2**: omit server name when HTTP2 host is IP address (islandryu) [#&#8203;56530](https://github.com/nodejs/node/pull/56530)
-   \[[`9f1fa199bf`](https://github.com/nodejs/node/commit/9f1fa199bf)] - **inspector**: roll inspector_protocol (Chengzhong Wu) [#&#8203;56649](https://github.com/nodejs/node/pull/56649)
-   \[[`0dae4bb3ab`](https://github.com/nodejs/node/commit/0dae4bb3ab)] - **inspector**: add undici http tracking support (Chengzhong Wu) [#&#8203;56488](https://github.com/nodejs/node/pull/56488)
-   \[[`2c6124cec4`](https://github.com/nodejs/node/commit/2c6124cec4)] - **inspector**: report loadingFinished until the response data is consumed (Chengzhong Wu) [#&#8203;56372](https://github.com/nodejs/node/pull/56372)
-   \[[`96ec862ce2`](https://github.com/nodejs/node/commit/96ec862ce2)] - **lib**: refactor execution.js (Marco Ippolito) [#&#8203;56358](https://github.com/nodejs/node/pull/56358)
-   \[[`3ac92ef607`](https://github.com/nodejs/node/commit/3ac92ef607)] - **(SEMVER-MINOR)** **lib**: add typescript support to STDIN eval (Marco Ippolito) [#&#8203;56359](https://github.com/nodejs/node/pull/56359)
-   \[[`d5bf3db0cf`](https://github.com/nodejs/node/commit/d5bf3db0cf)] - **lib**: allow skipping source maps in node_modules (Chengzhong Wu) [#&#8203;56639](https://github.com/nodejs/node/pull/56639)
-   \[[`d33eaf2bcb`](https://github.com/nodejs/node/commit/d33eaf2bcb)] - **lib**: ensure FORCE_COLOR forces color output in non-TTY environments (Pietro Marchini) [#&#8203;55404](https://github.com/nodejs/node/pull/55404)
-   \[[`dc003218a8`](https://github.com/nodejs/node/commit/dc003218a8)] - **lib**: optimize `prepareStackTrace` on builtin frames (Chengzhong Wu) [#&#8203;56299](https://github.com/nodejs/node/pull/56299)
-   \[[`df06524863`](https://github.com/nodejs/node/commit/df06524863)] - **lib**: suppress source map lookup exceptions (Chengzhong Wu) [#&#8203;56299](https://github.com/nodejs/node/pull/56299)
-   \[[`35335a5a66`](https://github.com/nodejs/node/commit/35335a5a66)] - **meta**: move one or more collaborators to emeritus (Node.js GitHub Bot) [#&#8203;56580](https://github.com/nodejs/node/pull/56580)
-   \[[`1faabdb150`](https://github.com/nodejs/node/commit/1faabdb150)] - **meta**: add codeowners of security release document (Rafael Gonzaga) [#&#8203;56521](https://github.com/nodejs/node/pull/56521)
-   \[[`b4ece22ef5`](https://github.com/nodejs/node/commit/b4ece22ef5)] - **meta**: move one or more collaborators to emeritus (Node.js GitHub Bot) [#&#8203;56342](https://github.com/nodejs/node/pull/56342)
-   \[[`9ec67e7ce0`](https://github.com/nodejs/node/commit/9ec67e7ce0)] - **meta**: move MoLow to TSC regular member (Moshe Atlow) [#&#8203;56276](https://github.com/nodejs/node/pull/56276)
-   \[[`bae4b2e20a`](https://github.com/nodejs/node/commit/bae4b2e20a)] - **module**: use more defensive code when handling SWC errors (Antoine du Hamel) [#&#8203;56646](https://github.com/nodejs/node/pull/56646)
-   \[[`1614e8e7bc`](https://github.com/nodejs/node/commit/1614e8e7bc)] - **(SEMVER-MINOR)** **module**: add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX (Marco Ippolito) [#&#8203;56610](https://github.com/nodejs/node/pull/56610)
-   \[[`174d88eab1`](https://github.com/nodejs/node/commit/174d88eab1)] - **module**: support eval with ts syntax detection (Marco Ippolito) [#&#8203;56285](https://github.com/nodejs/node/pull/56285)
-   \[[`299d6fa829`](https://github.com/nodejs/node/commit/299d6fa829)] - **module**: fix jsdoc for `format` parameter in cjs/loader (pacexy) [#&#8203;56501](https://github.com/nodejs/node/pull/56501)
-   \[[`0307e4dd59`](https://github.com/nodejs/node/commit/0307e4dd59)] - **module**: unify TypeScript and .mjs handling in CommonJS (Joyee Cheung) [#&#8203;55590](https://github.com/nodejs/node/pull/55590)
-   \[[`1f4f9be93d`](https://github.com/nodejs/node/commit/1f4f9be93d)] - **module**: fix async resolution error within the sync `findPackageJSON` (Jacob Smith) [#&#8203;56382](https://github.com/nodejs/node/pull/56382)
-   \[[`bbedffa0f0`](https://github.com/nodejs/node/commit/bbedffa0f0)] - **module**: simplify `findPackageJSON` implementation (Antoine du Hamel) [#&#8203;55543](https://github.com/nodejs/node/pull/55543)
-   \[[`6d6cffa9cc`](https://github.com/nodejs/node/commit/6d6cffa9cc)] - **(SEMVER-MINOR)** **module**: add `findPackageJSON` util (Jacob Smith) [#&#8203;55412](https://github.com/nodejs/node/pull/55412)
-   \[[`cd7ce18233`](https://github.com/nodejs/node/commit/cd7ce18233)] - **module**: fix bad `require.resolve` with option paths for `.` and `..` (Dario Piotrowicz) [#&#8203;56735](https://github.com/nodejs/node/pull/56735)
-   \[[`152df4da21`](https://github.com/nodejs/node/commit/152df4da21)] - **module**: rethrow amaro error message (Marco Ippolito) [#&#8203;56568](https://github.com/nodejs/node/pull/56568)
-   \[[`acba5dc87e`](https://github.com/nodejs/node/commit/acba5dc87e)] - **module**: use buffer.toString base64 (Chengzhong Wu) [#&#8203;56315](https://github.com/nodejs/node/pull/56315)
-   \[[`01e69be8ff`](https://github.com/nodejs/node/commit/01e69be8ff)] - **node-api**: define version 10 (Gabriel Schulhof) [#&#8203;55676](https://github.com/nodejs/node/pull/55676)
-   \[[`724524528e`](https://github.com/nodejs/node/commit/724524528e)] - **node-api**: remove deprecated attribute from napi_module_register (Vladimir Morozov) [#&#8203;56162](https://github.com/nodejs/node/pull/56162)
-   \[[`c78e11064f`](https://github.com/nodejs/node/commit/c78e11064f)] - **process**: remove support for undocumented symbol (Antoine du Hamel) [#&#8203;56552](https://github.com/nodejs/node/pull/56552)
-   \[[`3f69b18a23`](https://github.com/nodejs/node/commit/3f69b18a23)] - **process**: fix symbol key and mark experimental new `node:process` methods (Antoine du Hamel) [#&#8203;56517](https://github.com/nodejs/node/pull/56517)
-   \[[`d35333ae18`](https://github.com/nodejs/node/commit/d35333ae18)] - **(SEMVER-MINOR)** **process**: add process.ref() and process.unref() methods (James M Snell) [#&#8203;56400](https://github.com/nodejs/node/pull/56400)
-   \[[`fa49f0f7d5`](https://github.com/nodejs/node/commit/fa49f0f7d5)] - **punycode**: limit deprecation warning (Colin Ihrig) [#&#8203;56632](https://github.com/nodejs/node/pull/56632)
-   \[[`d77c7073b7`](https://github.com/nodejs/node/commit/d77c7073b7)] - **sqlite**: disable memstatus APIs at build time (Colin Ihrig) [#&#8203;56541](https://github.com/nodejs/node/pull/56541)
-   \[[`07ff3ddcb5`](https://github.com/nodejs/node/commit/07ff3ddcb5)] - **(SEMVER-MINOR)** **sqlite**: support TypedArray and DataView in `StatementSync` (Alex Yang) [#&#8203;56385](https://github.com/nodejs/node/pull/56385)
-   \[[`b6c2e91365`](https://github.com/nodejs/node/commit/b6c2e91365)] - **sqlite**: enable SQL math functions (Colin Ihrig) [#&#8203;56447](https://github.com/nodejs/node/pull/56447)
-   \[[`3462263e8b`](https://github.com/nodejs/node/commit/3462263e8b)] - **sqlite**: pass conflict type to conflict resolution handler (Bart Louwers) [#&#8203;56352](https://github.com/nodejs/node/pull/56352)
-   \[[`89ba3af743`](https://github.com/nodejs/node/commit/89ba3af743)] - **src**: add nullptr handling from X509\_STORE_new() (Burkov Egor) [#&#8203;56700](https://github.com/nodejs/node/pull/56700)
-   \[[`89a7c82e0c`](https://github.com/nodejs/node/commit/89a7c82e0c)] - **src**: add default value for RSACipherConfig mode field (Burkov Egor) [#&#8203;56701](https://github.com/nodejs/node/pull/56701)
-   \[[`7bae51e62e`](https://github.com/nodejs/node/commit/7bae51e62e)] - **src**: fix build with GCC 15 (tjuhaszrh) [#&#8203;56740](https://github.com/nodejs/node/pull/56740)
-   \[[`432a4b8bd6`](https://github.com/nodejs/node/commit/432a4b8bd6)] - **src**: fix to generate path from wchar_t via wstring (yamachu) [#&#8203;56696](https://github.com/nodejs/node/pull/56696)
-   \[[`8c9eaf82f0`](https://github.com/nodejs/node/commit/8c9eaf82f0)] - **src**: initialize FSReqWrapSync in path that uses it (Michaël Zasso) [#&#8203;56613](https://github.com/nodejs/node/pull/56613)
-   \[[`bcdb42d40b`](https://github.com/nodejs/node/commit/bcdb42d40b)] - **src**: handle duplicate paths granted (Rafael Gonzaga) [#&#8203;56591](https://github.com/nodejs/node/pull/56591)
-   \[[`d6a7acc207`](https://github.com/nodejs/node/commit/d6a7acc207)] - **src**: update ECKeyPointer in ncrypto (James M Snell) [#&#8203;56526](https://github.com/nodejs/node/pull/56526)
-   \[[`01922f8b1f`](https://github.com/nodejs/node/commit/01922f8b1f)] - **src**: update ECPointPointer in ncrypto (James M Snell) [#&#8203;56526](https://github.com/nodejs/node/pull/56526)
-   \[[`2a3a36eceb`](https://github.com/nodejs/node/commit/2a3a36eceb)] - **src**: update ECGroupPointer in ncrypto (James M Snell) [#&#8203;56526](https://github.com/nodejs/node/pull/56526)
-   \[[`67c10cdacb`](https://github.com/nodejs/node/commit/67c10cdacb)] - **src**: update ECDASSigPointer implementation in ncrypto (James M Snell) [#&#8203;56526](https://github.com/nodejs/node/pull/56526)
-   \[[`17f931c68b`](https://github.com/nodejs/node/commit/17f931c68b)] - **src**: cleaning up more crypto internals for ncrypto (James M Snell) [#&#8203;56526](https://github.com/nodejs/node/pull/56526)
-   \[[`94d3fe1b62`](https://github.com/nodejs/node/commit/94d3fe1b62)] - **(SEMVER-MINOR)** **src**: add --disable-sigusr1 to prevent signal i/o thread (Rafael Gonzaga) [#&#8203;56441](https://github.com/nodejs/node/pull/56441)
-   \[[`6594ee8dff`](https://github.com/nodejs/node/commit/6594ee8dff)] - **src**: fix undefined script name in error source (Chengzhong Wu) [#&#8203;56502](https://github.com/nodejs/node/pull/56502)
-   \[[`b46bad3e91`](https://github.com/nodejs/node/commit/b46bad3e91)] - **src**: refactor --trace-env to reuse option selection and handling (Joyee Cheung) [#&#8203;56293](https://github.com/nodejs/node/pull/56293)
-   \[[`76921b822b`](https://github.com/nodejs/node/commit/76921b822b)] - **src**: minor cleanups on OneByteString usage (James M Snell) [#&#8203;56482](https://github.com/nodejs/node/pull/56482)
-   \[[`3f0d1dd4fe`](https://github.com/nodejs/node/commit/3f0d1dd4fe)] - **src**: move more crypto impl detail to ncrypto dep (James M Snell) [#&#8203;56421](https://github.com/nodejs/node/pull/56421)
-   \[[`04f623b283`](https://github.com/nodejs/node/commit/04f623b283)] - **src**: fixup more ToLocalChecked uses in node_file (James M Snell) [#&#8203;56484](https://github.com/nodejs/node/pull/56484)
-   \[[`5aa436f5a1`](https://github.com/nodejs/node/commit/5aa436f5a1)] - **src**: make some minor ToLocalChecked cleanups (James M Snell) [#&#8203;56483](https://github.com/nodejs/node/pull/56483)
-   \[[`6eec5e7ec2`](https://github.com/nodejs/node/commit/6eec5e7ec2)] - **src**: lock the thread properly in snapshot builder (Joyee Cheung) [#&#8203;56327](https://github.com/nodejs/node/pull/56327)
-   \[[`5614993968`](https://github.com/nodejs/node/commit/5614993968)] - **src**: drain platform tasks before creating startup snapshot (Chengzhong Wu) [#&#8203;56403](https://github.com/nodejs/node/pull/56403)
-   \[[`48493e9fd5`](https://github.com/nodejs/node/commit/48493e9fd5)] - **src**: use LocalVector in more places (James M Snell) [#&#8203;56457](https://github.com/nodejs/node/pull/56457)
-   \[[`7e5ea0681e`](https://github.com/nodejs/node/commit/7e5ea0681e)] - **src**: use v8::LocalVector consistently with other minor cleanups (James M Snell) [#&#8203;56417](https://github.com/nodejs/node/pull/56417)
-   \[[`ad3d857f2b`](https://github.com/nodejs/node/commit/ad3d857f2b)] - **src**: use starts_with in fs_permission.cc (ishabi) [#&#8203;55811](https://github.com/nodejs/node/pull/55811)
-   \[[`5afffb4415`](https://github.com/nodejs/node/commit/5afffb4415)] - **(SEMVER-MINOR)** **src,worker**: add isInternalWorker (Carlos Espa) [#&#8203;56469](https://github.com/nodejs/node/pull/56469)
-   \[[`7d1676e72e`](https://github.com/nodejs/node/commit/7d1676e72e)] - **stream**: fix typo in ReadableStreamBYOBReader.readIntoRequests (Mattias Buelens) [#&#8203;56560](https://github.com/nodejs/node/pull/56560)
-   \[[`e658ea6b26`](https://github.com/nodejs/node/commit/e658ea6b26)] - **stream**: validate undefined sizeAlgorithm in WritableStream (Jason Zhang) [#&#8203;56067](https://github.com/nodejs/node/pull/56067)
-   \[[`e4f133c20c`](https://github.com/nodejs/node/commit/e4f133c20c)] - **test**: add ts eval snapshots (Marco Ippolito) [#&#8203;56358](https://github.com/nodejs/node/pull/56358)
-   \[[`f041742400`](https://github.com/nodejs/node/commit/f041742400)] - **test**: remove empty lines from snapshots (Marco Ippolito) [#&#8203;56358](https://github.com/nodejs/node/pull/56358)
-   \[[`801cde91f6`](https://github.com/nodejs/node/commit/801cde91f6)] - **test**: reduce number of written chunks (Luigi Pinca) [#&#8203;56757](https://github.com/nodejs/node/pull/56757)
-   \[[`6fdf1879ab`](https://github.com/nodejs/node/commit/6fdf1879ab)] - **test**: fix invalid common.mustSucceed() usage (Luigi Pinca) [#&#8203;56756](https://github.com/nodejs/node/pull/56756)
-   \[[`d2bfbfa364`](https://github.com/nodejs/node/commit/d2bfbfa364)] - **test**: use strict mode in global setters test (Rich Trott) [#&#8203;56742](https://github.com/nodejs/node/pull/56742)
-   \[[`5c030da42f`](https://github.com/nodejs/node/commit/5c030da42f)] - **test**: cleanup and simplify test-crypto-aes-wrap (James M Snell) [#&#8203;56748](https://github.com/nodejs/node/pull/56748)
-   \[[`f1442d6eaf`](https://github.com/nodejs/node/commit/f1442d6eaf)] - **test**: do not use common.isMainThread (Luigi Pinca) [#&#8203;56768](https://github.com/nodejs/node/pull/56768)
-   \[[`49405bd9e7`](https://github.com/nodejs/node/commit/49405bd9e7)] - **test**: make some requires lazy in common/index (James M Snell) [#&#8203;56715](https://github.com/nodejs/node/pull/56715)
-   \[[`52ef376788`](https://github.com/nodejs/node/commit/52ef376788)] - **test**: add test that uses multibyte for path and resolves modules (yamachu) [#&#8203;56696](https://github.com/nodejs/node/pull/56696)
-   \[[`b811dea85a`](https://github.com/nodejs/node/commit/b811dea85a)] - **test**: replace more uses of `global` with `globalThis` (James M Snell) [#&#8203;56712](https://github.com/nodejs/node/pull/56712)
-   \[[`eb97076199`](https://github.com/nodejs/node/commit/eb97076199)] - **test**: make common/index slightly less node.js specific (James M Snell) [#&#8203;56712](https://github.com/nodejs/node/pull/56712)
-   \[[`1795202d19`](https://github.com/nodejs/node/commit/1795202d19)] - **test**: rely less on duplicative common test harness utilities (James M Snell) [#&#8203;56712](https://github.com/nodejs/node/pull/56712)
-   \[[`5be29a274e`](https://github.com/nodejs/node/commit/5be29a274e)] - **test**: simplify common/index.js (James M Snell) [#&#8203;56712](https://github.com/nodejs/node/pull/56712)
-   \[[`92e99780f0`](https://github.com/nodejs/node/commit/92e99780f0)] - **test**: move hasMultiLocalhost to common/net (James M Snell) [#&#8203;56716](https://github.com/nodejs/node/pull/56716)
-   \[[`1c3204a4cc`](https://github.com/nodejs/node/commit/1c3204a4cc)] - **test**: move crypto related common utilities in common/crypto (James M Snell) [#&#8203;56714](https://github.com/nodejs/node/pull/56714)
-   \[[`fe79d63be0`](https://github.com/nodejs/node/commit/fe79d63be0)] - **test**: add missing test for env file (Jonas) [#&#8203;56642](https://github.com/nodejs/node/pull/56642)
-   \[[`e08af61537`](https://github.com/nodejs/node/commit/e08af61537)] - **test**: enforce strict mode in test-zlib-const (Rich Trott) [#&#8203;56689](https://github.com/nodejs/node/pull/56689)
-   \[[`c96792d7f8`](https://github.com/nodejs/node/commit/c96792d7f8)] - **test**: fix localization data for ICU 74.2 (Antoine du Hamel) [#&#8203;56661](https://github.com/nodejs/node/pull/56661)
-   \[[`48b72f1195`](https://github.com/nodejs/node/commit/48b72f1195)] - **test**: use --permission instead of --experimental-permission (Rafael Gonzaga) [#&#8203;56685](https://github.com/nodejs/node/pull/56685)
-   \[[`de81d90fce`](https://github.com/nodejs/node/commit/de81d90fce)] - **test**: test-stream-compose.js doesn't need internals (Meghan Denny) [#&#8203;56619](https://github.com/nodejs/node/pull/56619)
-   \[[`f5b8499ad0`](https://github.com/nodejs/node/commit/f5b8499ad0)] - **test**: add maxCount and gcOptions to gcUntil() (Joyee Cheung) [#&#8203;56522](https://github.com/nodejs/node/pull/56522)
-   \[[`d9e5a81041`](https://github.com/nodejs/node/commit/d9e5a81041)] - **test**: add line break at end of file (Rafael Gonzaga) [#&#8203;56588](https://github.com/nodejs/node/pull/56588)
-   \[[`59be346fbf`](https://github.com/nodejs/node/commit/59be346fbf)] - **test**: mark test-worker-prof as flaky on smartos (Joyee Cheung) [#&#8203;56583](https://github.com/nodejs/node/pull/56583)
-   \[[`12a2cae9e5`](https://github.com/nodejs/node/commit/12a2cae9e5)] - **test**: update test-child-process-bad-stdio to use node:test (Colin Ihrig) [#&#8203;56562](https://github.com/nodejs/node/pull/56562)
-   \[[`2dc4a30e19`](https://github.com/nodejs/node/commit/2dc4a30e19)] - **test**: disable openssl 3.4.0 incompatible tests (Jelle van der Waa) [#&#8203;56160](https://github.com/nodejs/node/pull/56160)
-   \[[`1950fbf51d`](https://github.com/nodejs/node/commit/1950fbf51d)] - **test**: make test-crypto-hash compatible with OpenSSL > 3.4.0 (Jelle van der Waa) [#&#8203;56160](https://github.com/nodejs/node/pull/56160)
-   \[[`a533420a91`](https://github.com/nodejs/node/commit/a533420a91)] - **test**: clarify fork inherit permission flags (Rafael Gonzaga) [#&#8203;56523](https://github.com/nodejs/node/pull/56523)
-   \[[`697e799dc1`](https://github.com/nodejs/node/commit/697e799dc1)] - **test**: add error only reporter for node:test (Carlos Espa) [#&#8203;56438](https://github.com/nodejs/node/pull/56438)
-   \[[`4844fa212d`](https://github.com/nodejs/node/commit/4844fa212d)] - **test**: mark test-http-server-request-timeouts-mixed as flaky (Joyee Cheung) [#&#8203;56503](https://github.com/nodejs/node/pull/56503)
-   \[[`843c2389b9`](https://github.com/nodejs/node/commit/843c2389b9)] - **test**: update error code in tls-psk-circuit for for OpenSSL 3.4 (sebastianas) [#&#8203;56420](https://github.com/nodejs/node/pull/56420)
-   \[[`ccb2ddbd83`](https://github.com/nodejs/node/commit/ccb2ddbd83)] - **test**: update compiled sqlite tests to match other tests (Colin Ihrig) [#&#8203;56446](https://github.com/nodejs/node/pull/56446)
-   \[[`b40f50324d`](https://github.com/nodejs/node/commit/b40f50324d)] - **test**: add initial test426 coverage (Chengzhong Wu) [#&#8203;56436](https://github.com/nodejs/node/pull/56436)
-   \[[`059f81e4fd`](https://github.com/nodejs/node/commit/059f81e4fd)] - **test**: update test-set-http-max-http-headers to use node:test (Colin Ihrig) [#&#8203;56439](https://github.com/nodejs/node/pull/56439)
-   \[[`ec2940b418`](https://github.com/nodejs/node/commit/ec2940b418)] - **test**: update test-child-process-windows-hide to use node:test (Colin Ihrig) [#&#8203;56437](https://github.com/nodejs/node/pull/56437)
-   \[[`0362924880`](https://github.com/nodejs/node/commit/0362924880)] - **test**: use unusual chars in the path to ensure our tests are robust (Antoine du Hamel) [#&#8203;48409](https://github.com/nodejs/node/pull/48409)
-   \[[`b6c3869910`](https://github.com/nodejs/node/commit/b6c3869910)] - **test**: improve abort signal dropping test (Edy Silva) [#&#8203;56339](https://github.com/nodejs/node/pull/56339)
-   \[[`cc648ef923`](https://github.com/nodejs/node/commit/cc648ef923)] - **test**: enable ts test on win arm64 (Marco Ippolito) [#&#8203;56349](https://github.com/nodejs/node/pull/56349)
-   \[[`68819b4997`](https://github.com/nodejs/node/commit/68819b4997)] - **test**: deflake test-watch-file-shared-dependency (Luigi Pinca) [#&#8203;56344](https://github.com/nodejs/node/pull/56344)
-   \[[`ca6ed2190c`](https://github.com/nodejs/node/commit/ca6ed2190c)] - **test**: skip `test-sqlite-extensions` when SQLite is not built by us (Antoine du Hamel) [#&#8203;56341](https://github.com/nodejs/node/pull/56341)
-   \[[`8ffeb8b58c`](https://github.com/nodejs/node/commit/8ffeb8b58c)] - **test**: increase spin for eventloop test on s390 (Michael Dawson) [#&#8203;56228](https://github.com/nodejs/node/pull/56228)
-   \[[`6ae9950f08`](https://github.com/nodejs/node/commit/6ae9950f08)] - **test**: migrate message eval tests from Python to JS (Yiyun Lei) [#&#8203;50482](https://github.com/nodejs/node/pull/50482)
-   \[[`4352bf69e9`](https://github.com/nodejs/node/commit/4352bf69e9)] - **test**: check typescript loader (Marco Ippolito) [#&#8203;54657](https://github.com/nodejs/node/pull/54657)
-   \[[`406e7db9c3`](https://github.com/nodejs/node/commit/406e7db9c3)] - **test**: remove async-hooks/test-writewrap flaky designation (Luigi Pinca) [#&#8203;56048](https://github.com/nodejs/node/pull/56048)
-   \[[`fa56ab2bba`](https://github.com/nodejs/node/commit/fa56ab2bba)] - **test**: deflake test-esm-loader-hooks-inspect-brk (Luigi Pinca) [#&#8203;56050](https://github.com/nodejs/node/pull/56050)
-   \[[`8e149aac99`](https://github.com/nodejs/node/commit/8e149aac99)] - **test**: add test case for listeners (origranot) [#&#8203;56282](https://github.com/nodejs/node/pull/56282)
-   \[[`a3f5ef22cd`](https://github.com/nodejs/node/commit/a3f5ef22cd)] - **test**: make `test-permission-sqlite-load-extension` more robust (Antoine du Hamel) [#&#8203;56295](https://github.com/nodejs/node/pull/56295)
-   \[[`8cbb7cc838`](https://github.com/nodejs/node/commit/8cbb7cc838)] - **test_runner**: print failing assertion only once with spec reporter (Pietro Marchini) [#&#8203;56662](https://github.com/nodejs/node/pull/56662)
-   \[[`1f426bad9a`](https://github.com/nodejs/node/commit/1f426bad9a)] - **test_runner**: remove unused errors (Pietro Marchini) [#&#8203;56607](https://github.com/nodejs/node/pull/56607)
-   \[[`697a851fb3`](https://github.com/nodejs/node/commit/697a851fb3)] - **(SEMVER-MINOR)** **test_runner**: add TestContext.prototype.waitFor() (Colin Ihrig) [#&#8203;56595](https://github.com/nodejs/node/pull/56595)
-   \[[`047537b48c`](https://github.com/nodejs/node/commit/047537b48c)] - **(SEMVER-MINOR)** **test_runner**: add t.assert.fileSnapshot() (Colin Ihrig) [#&#8203;56459](https://github.com/nodejs/node/pull/56459)
-   \[[`19b4aa4b14`](https://github.com/nodejs/node/commit/19b4aa4b14)] - **test_runner**: run single test file benchmark (Pietro Marchini) [#&#8203;56479](https://github.com/nodejs/node/pull/56479)
-   \[[`926cf84e95`](https://github.com/nodejs/node/commit/926cf84e95)] - **(SEMVER-MINOR)** **test_runner**: add assert.register() API (Colin Ihrig) [#&#8203;56434](https://github.com/nodejs/node/pull/56434)
-   \[[`fb4661a4cf`](https://github.com/nodejs/node/commit/fb4661a4cf)] - **test_runner**: finish marking snapshot testing as stable (Colin Ihrig) [#&#8203;56425](https://github.com/nodejs/node/pull/56425)
-   \[[`900c6c3940`](https://github.com/nodejs/node/commit/900c6c3940)] - **tls**: fix error stack conversion in cryptoErrorListToException() (Joyee Cheung) [#&#8203;56554](https://github.com/nodejs/node/pull/56554)
-   \[[`e9f185b658`](https://github.com/nodejs/node/commit/e9f185b658)] - **tools**: update doc to new version (Node.js GitHub Bot) [#&#8203;56259](https://github.com/nodejs/node/pull/56259)
-   \[[`7644c7e619`](https://github.com/nodejs/node/commit/7644c7e619)] - **tools**: update inspector_protocol roller (Chengzhong Wu) [#&#8203;56649](https://github.com/nodejs/node/pull/56649)
-   \[[`362272b0a4`](https://github.com/nodejs/node/commit/362272b0a4)] - **tools**: do not throw on missing `create-release-proposal.sh` (Antoine du Hamel) [#&#8203;56704](https://github.com/nodejs/node/pull/56704)
-   \[[`df8b835953`](https://github.com/nodejs/node/commit/df8b835953)] - **tools**: fix tools-deps-update (Daniel Lemire) [#&#8203;56684](https://github.com/nodejs/node/pull/56684)
-   \[[`feba5d3274`](https://github.com/nodejs/node/commit/feba5d3274)] - **tools**: do not throw on missing `create-release-proposal.sh` (Antoine du Hamel) [#&#8203;56695](https://github.com/nodejs/node/pull/56695)
-   \[[`9827f7d395`](https://github.com/nodejs/node/commit/9827f7d395)] - **tools**: fix permissions in `lint-release-proposal` workflow (Antoine du Hamel) [#&#8203;56614](https://github.com/nodejs/node/pull/56614)
-   \[[`14c562c0dc`](https://github.com/nodejs/node/commit/14c562c0dc)] - **tools**: remove github reporter (Carlos Espa) [#&#8203;56468](https://github.com/nodejs/node/pull/56468)
-   \[[`ed1785d0ae`](https://github.com/nodejs/node/commit/ed1785d0ae)] - **tools**: edit `create-release-proposal` workflow (Antoine du Hamel) [#&#8203;56540](https://github.com/nodejs/node/pull/56540)
-   \[[`294e4c42f5`](https://github.com/nodejs/node/commit/294e4c42f5)] - **tools**: validate commit list as part of `lint-release-commit` (Antoine du Hamel) [#&#8203;56291](https://github.com/nodejs/node/pull/56291)
-   \[[`98d3474267`](https://github.com/nodejs/node/commit/98d3474267)] - **tools**: fix loong64 build failed (Xiao-Tao) [#&#8203;56466](https://github.com/nodejs/node/pull/56466)
-   \[[`3e729ceec8`](https://github.com/nodejs/node/commit/3e729ceec8)] - **tools**: disable unneeded rule ignoring in Python linting (Rich Trott) [#&#8203;56429](https://github.com/nodejs/node/pull/56429)
-   \[[`d5c05328e2`](https://github.com/nodejs/node/commit/d5c05328e2)] - **tools**: use a configurable value for number of open dependabot PRs (Antoine du Hamel) [#&#8203;56427](https://github.com/nodejs/node/pull/56427)
-   \[[`1705cbe002`](https://github.com/nodejs/node/commit/1705cbe002)] - **tools**: bump the eslint group in /tools/eslint with 4 updates (dependabot\[bot]) [#&#8203;56426](https://github.com/nodejs/node/pull/56426)
-   \[[`53b29b0469`](https://github.com/nodejs/node/commit/53b29b0469)] - **tools**: fix `require-common-first` lint rule from subfolder (Antoine du Hamel) [#&#8203;56325](https://github.com/nodejs/node/pull/56325)
-   \[[`105c4ed4fb`](https://github.com/nodejs/node/commit/105c4ed4fb)] - **tools**: add release line label when opening release proposal (Antoine du Hamel) [#&#8203;56317](https://github.com/nodejs/node/pull/56317)
-   \[[`30f61f4aa5`](https://github.com/nodejs/node/commit/30f61f4aa5)] - **url**: use resolved path to convert UNC paths to URL (Antoine du Hamel) [#&#8203;56302](https://github.com/nodejs/node/pull/56302)
-   \[[`a0aef4dfb6`](https://github.com/nodejs/node/commit/a0aef4dfb6)] - **util**: inspect: do not crash on an Error stack that contains a Symbol (Jordan Harband) [#&#8203;56573](https://github.com/nodejs/node/pull/56573)
-   \[[`a8a060341f`](https://github.com/nodejs/node/commit/a8a060341f)] - **util**: inspect: do not crash on an Error with a regex `name` (Jordan Harband) [#&#8203;56574](https://github.com/nodejs/node/pull/56574)
-   \[[`ea66bf3553`](https://github.com/nodejs/node/commit/ea66bf3553)] - **util**: rename CallSite.column to columnNumber (Chengzhong Wu) [#&#8203;56584](https://github.com/nodejs/node/pull/56584)
-   \[[`9cdc3b373c`](https://github.com/nodejs/node/commit/9cdc3b373c)] - **util**: do not crash on inspecting function with `Symbol` name (Jordan Harband) [#&#8203;56572](https://github.com/nodejs/node/pull/56572)
-   \[[`0bfbb68569`](https://github.com/nodejs/node/commit/0bfbb68569)] - **util**: expose CallSite.scriptId (Chengzhong Wu) [#&#8203;56551](https://github.com/nodejs/node/pull/56551)
-   \[[`5dd7116e09`](https://github.com/nodejs/node/commit/5dd7116e09)] - **watch**: reload env file for --env-file-if-exists (Jonas) [#&#8203;56643](https://github.com/nodejs/node/pull/56643)
-   \[[`c658a8afdf`](https://github.com/nodejs/node/commit/c658a8afdf)] - **(SEMVER-MINOR)** **worker**: add eval ts input (Marco Ippolito) [#&#8203;56394](https://github.com/nodejs/node/pull/56394)
-   \[[`2e5d038f48`](https://github.com/nodejs/node/commit/2e5d038f48)] - **worker**: refactor stdio to improve performance (Matteo Collina) [#&#8203;56630](https://github.com/nodejs/node/pull/56630)
-   \[[`f959805d01`](https://github.com/nodejs/node/commit/f959805d01)] - **worker**: flush stdout and stderr on exit (Matteo Collina) [#&#8203;56428](https://github.com/nodejs/node/pull/56428)

### [`v22.13.1`](https://github.com/nodejs/node/releases/tag/v22.13.1): 2025-01-21, Version 22.13.1 &#x27;Jod&#x27; (LTS), @&#8203;RafaelGSS

[Compare Source](https://github.com/nodejs/node/compare/v22.13.0...v22.13.1)

This is a security release.

##### Notable Changes

-   CVE-2025-23083 - src,loader,permission: throw on InternalWorker use when permission model is enabled (High)
-   CVE-2025-23085 - src: fix HTTP2 mem leak on premature close and ERR_PROTO (Medium)
-   CVE-2025-23084 - path: fix path traversal in normalize() on Windows (Medium)

Dependency update:

-   CVE-2025-22150 - Use of Insufficiently Random Values in undici fetch() (Medium)

##### Commits

-   \[[`520da342e0`](https://github.com/nodejs/node/commit/520da342e0)] - **(CVE-2025-22150)** **deps**: update undici to v6.21.1 (Matteo Collina) [nodejs-private/node-private#662](https://github.com/nodejs-private/node-private/pull/662)
-   \[[`99f217369f`](https://github.com/nodejs/node/commit/99f217369f)] - **(CVE-2025-23084)** **path**: fix path traversal in normalize() on Windows (Tobias Nießen) [nodejs-private/node-private#555](https://github.com/nodejs-private/node-private/pull/555)
-   \[[`984f735e35`](https://github.com/nodejs/node/commit/984f735e35)] - **(CVE-2025-23085)** **src**: fix HTTP2 mem leak on premature close and ERR_PROTO (RafaelGSS) [nodejs-private/node-private#650](https://github.com/nodejs-private/node-private/pull/650)
-   \[[`2446870618`](https://github.com/nodejs/node/commit/2446870618)] - **(CVE-2025-23083)** **src,loader,permission**: throw on InternalWorker use (RafaelGSS) [nodejs-private/node-private#651](https://github.com/nodejs-private/node-private/pull/651)

### [`v22.13.0`](https://github.com/nodejs/node/releases/tag/v22.13.0): 2025-01-07, Version 22.13.0 &#x27;Jod&#x27; (LTS), @&#8203;ruyadorno

[Compare Source](https://github.com/nodejs/node/compare/v22.12.0...v22.13.0)

##### Notable Changes

##### Stabilize Permission Model

Upgrades the Permission Model status from Active Development to Stable.

Contributed by Rafael Gonzaga [#&#8203;56201](https://github.com/nodejs/node/pull/56201)

##### Graduate WebCryptoAPI [`Ed25519`](https://github.com/nodejs/node/commit/Ed25519) and X25519 algorithms as stable

Following the merge of Curve25519 into the [Web Cryptography API Editor's Draft](https://w3c.github.io/webcrypto/) the `Ed25519` and `X25519` algorithm identifiers are now stable and will no longer emit an ExperimentalWarning upon use.

Contributed by (Filip Skokan) [#&#8203;56142](https://github.com/nodejs/node/pull/56142)

##### Other Notable Changes

-   \[[`05d6227a88`](https://github.com/nodejs/node/commit/05d6227a88)] - **(SEMVER-MINOR)** **assert**: add partialDeepStrictEqual (Giovanni Bucci) [#&#8203;54630](https://github.com/nodejs/node/pull/54630)
-   \[[`a933103499`](https://github.com/nodejs/node/commit/a933103499)] - **(SEMVER-MINOR)** **cli**: implement --trace-env and --trace-env-\[js|native]-stack (Joyee Cheung) [#&#8203;55604](https://github.com/nodejs/node/pull/55604)
-   \[[`ba9d5397de`](https://github.com/nodejs/node/commit/ba9d5397de)] - **(SEMVER-MINOR)** **dgram**: support blocklist in udp (theanarkh) [#&#8203;56087](https://github.com/nodejs/node/pull/56087)
-   \[[`f6d0c01303`](https://github.com/nodejs/node/commit/f6d0c01303)] - **doc**: stabilize util.styleText (Rafael Gonzaga) [#&#8203;56265](https://github.com/nodejs/node/pull/56265)
-   \[[`34c68827af`](https://github.com/nodejs/node/commit/34c68827af)] - **doc**: move typescript support to active development (Marco Ippolito) [#&#8203;55536](https://github.com/nodejs/node/pull/55536)
-   \[[`dd14b80350`](https://github.com/nodejs/node/commit/dd14b80350)] - **doc**: add LJHarb to collaborators (Jordan Harband) [#&#8203;56132](https://github.com/nodejs/node/pull/56132)
-   \[[`5263086169`](https://github.com/nodejs/node/commit/5263086169)] - **(SEMVER-MINOR)** **doc**: add report version and history section (Chengzhong Wu) [#&#8203;56130](https://github.com/nodejs/node/pull/56130)
-   \[[`8cb3c2018d`](https://github.com/nodejs/node/commit/8cb3c2018d)] - **(SEMVER-MINOR)** **doc**: sort --report-exclude alphabetically (Rafael Gonzaga) [#&#8203;55788](https://github.com/nodejs/node/pull/55788)
-   \[[`55239a48b6`](https://github.com/nodejs/node/commit/55239a48b6)] - **(SEMVER-MINOR)** **doc,lib,src,test**: unflag sqlite module (Colin Ihrig) [#&#8203;55890](https://github.com/nodejs/node/pull/55890)
-   \[[`7cbe3de1d8`](https://github.com/nodejs/node/commit/7cbe3de1d8)] - **(SEMVER-MINOR)** **module**: only emit require(esm) warning under --trace-require-module (Joyee Cheung) [#&#8203;56194](https://github.com/nodejs/node/pull/56194)
-   \[[`6575b76042`](https://github.com/nodejs/node/commit/6575b76042)] - **(SEMVER-MINOR)** **module**: add module.stripTypeScriptTypes (Marco Ippolito) [#&#8203;55282](https://github.com/nodejs/node/pull/55282)
-   \[[`bacfe6d5c9`](https://github.com/nodejs/node/commit/bacfe6d5c9)] - **(SEMVER-MINOR)** **net**: support blocklist in net.connect (theanarkh) [#&#8203;56075](https://github.com/nodejs/node/pull/56075)
-   \[[`b47888d390`](https://github.com/nodejs/node/commit/b47888d390)] - **(SEMVER-MINOR)** **net**: support blocklist for net.Server (theanarkh) [#&#8203;56079](https://github.com/nodejs/node/pull/56079)
-   \[[`566f0a1d25`](https://github.com/nodejs/node/commit/566f0a1d25)] - **(SEMVER-MINOR)** **net**: add SocketAddress.parse (James M Snell) [#&#8203;56076](https://github.com/nodejs/node/pull/56076)
-   \[[`ed7eab1421`](https://github.com/nodejs/node/commit/ed7eab1421)] - **(SEMVER-MINOR)** **net**: add net.BlockList.isBlockList(value) (James M Snell) [#&#8203;56078](https://github.com/nodejs/node/pull/56078)
-   \[[`ea4891856d`](https://github.com/nodejs/node/commit/ea4891856d)] - **(SEMVER-MINOR)** **process**: deprecate `features.{ipv6,uv}` and `features.tls_*` (René) [#&#8203;55545](https://github.com/nodejs/node/pull/55545)
-   \[[`01eb308f26`](https://github.com/nodejs/node/commit/01eb308f26)] - **(SEMVER-MINOR)** **report**: fix typos in report keys and bump the version (Yuan-Ming Hsu) [#&#8203;56068](https://github.com/nodejs/node/pull/56068)
-   \[[`97c38352d0`](https://github.com/nodejs/node/commit/97c38352d0)] - **(SEMVER-MINOR)** **sqlite**: aggregate constants in a single property (Edigleysson Silva (Edy)) [#&#8203;56213](https://github.com/nodejs/node/pull/56213)
-   \[[`b4041e554a`](https://github.com/nodejs/node/commit/b4041e554a)] - **(SEMVER-MINOR)** **sqlite**: add `StatementSync.prototype.iterate` method (tpoisseau) [#&#8203;54213](https://github.com/nodejs/node/pull/54213)
-   \[[`2e3ca1bbdd`](https://github.com/nodejs/node/commit/2e3ca1bbdd)] - **(SEMVER-MINOR)** **src**: add cli option to preserve env vars on diagnostic reports (Rafael Gonzaga) [#&#8203;55697](https://github.com/nodejs/node/pull/55697)
-   \[[`bcfe9c80fc`](https://github.com/nodejs/node/commit/bcfe9c80fc)] - **(SEMVER-MINOR)** **util**: add sourcemap support to getCallSites (Marco Ippolito) [#&#8203;55589](https://github.com/nodejs/node/pull/55589)

##### Commits

-   \[[`e9024779c0`](https://github.com/nodejs/node/commit/e9024779c0)] - **assert**: make Maps be partially compared in partialDeepStrictEqual (Giovanni Bucci) [#&#8203;56195](https://github.com/nodejs/node/pull/56195)
-   \[[`4c13d8e587`](https://github.com/nodejs/node/commit/4c13d8e587)] - **assert**: make partialDeepStrictEqual work with ArrayBuffers (Giovanni Bucci) [#&#8203;56098](https://github.com/nodejs/node/pull/56098)
-   \[[`a4fa31a86e`](https://github.com/nodejs/node/commit/a4fa31a86e)] - **assert**: optimize partial comparison of two `Set`s (Antoine du Hamel) [#&#8203;55970](https://github.com/nodejs/node/pull/55970)
-   \[[`05d6227a88`](https://github.com/nodejs/node/commit/05d6227a88)] - **(SEMVER-MINOR)** **assert**: add partialDeepStrictEqual (Giovanni Bucci) [#&#8203;54630](https://github.com/nodejs/node/pull/54630)
-   \[[`5e1321abd7`](https://github.com/nodejs/node/commit/5e1321abd7)] - **buffer**: document concat zero-fill (Duncan) [#&#8203;55562](https://github.com/nodejs/node/pull/55562)
-   \[[`be5ba7c648`](https://github.com/nodejs/node/commit/be5ba7c648)] - **build**: set DESTCPU correctly for 'make binary' on loongarch64 (吴小白) [#&#8203;56271](https://github.com/nodejs/node/pull/56271)
-   \[[`38cf37ee2d`](https://github.com/nodejs/node/commit/38cf37ee2d)] - **build**: fix missing fp16 dependency in d8 builds (Joyee Cheung) [#&#8203;56266](https://github.com/nodejs/node/pull/56266)
-   \[[`dbb7557455`](https://github.com/nodejs/node/commit/dbb7557455)] - **build**: add major release action (Rafael Gonzaga) [#&#8203;56199](https://github.com/nodejs/node/pull/56199)
-   \[[`27cc90f3be`](https://github.com/nodejs/node/commit/27cc90f3be)] - **build**: fix C string encoding for `PRODUCT_DIR_ABS` (Anna Henningsen) [#&#8203;56111](https://github.com/nodejs/node/pull/56111)
-   \[[`376561c2b4`](https://github.com/nodejs/node/commit/376561c2b4)] - **build**: use variable for simdutf path (Shelley Vohr) [#&#8203;56196](https://github.com/nodejs/node/pull/56196)
-   \[[`126ae15000`](https://github.com/nodejs/node/commit/126ae15000)] - **build**: allow overriding clang usage (Shelley Vohr) [#&#8203;56016](https://github.com/nodejs/node/pull/56016)
-   \[[`97bb8f7c76`](https://github.com/nodejs/node/commit/97bb8f7c76)] - **build**: remove defaults for create-release-proposal (Rafael Gonzaga) [#&#8203;56042](https://github.com/nodejs/node/pull/56042)
-   \[[`a8fb1a06f3`](https://github.com/nodejs/node/commit/a8fb1a06f3)] - **build**: set node_arch to target_cpu in GN (Shelley Vohr) [#&#8203;55967](https://github.com/nodejs/node/pull/55967)
-   \[[`9f48ca27f1`](https://github.com/nodejs/node/commit/9f48ca27f1)] - **build**: use variable for crypto dep path (Shelley Vohr) [#&#8203;55928](https://github.com/nodejs/node/pull/55928)
-   \[[`e47ccd2287`](https://github.com/nodejs/node/commit/e47ccd2287)] - **build**: fix GN build for sqlite (Cheng) [#&#8203;55912](https://github.com/nodejs/node/pull/55912)
-   \[[`8d70b99a5a`](https://github.com/nodejs/node/commit/8d70b99a5a)] - **build**: compile bundled simdutf conditionally (Jakub Jirutka) [#&#8203;55886](https://github.com/nodejs/node/pull/55886)
-   \[[`826fd35242`](https://github.com/nodejs/node/commit/826fd35242)] - **build**: compile bundled simdjson conditionally (Jakub Jirutka) [#&#8203;55886](https://github.com/nodejs/node/pull/55886)
-   \[[`1015b22085`](https://github.com/nodejs/node/commit/1015b22085)] - **build**: compile bundled ada conditionally (Jakub Jirutka) [#&#8203;55886](https://github.com/nodejs/node/pull/55886)
-   \[[`77e2869ca6`](https://github.com/nodejs/node/commit/77e2869ca6)] - **build**: use glob for dependencies of out/Makefile (Richard Lau) [#&#8203;55789](https://github.com/nodejs/node/pull/55789)
-   \[[`a933103499`](https://github.com/nodejs/node/commit/a933103499)] - **(SEMVER-MINOR)** **cli**: implement --trace-env and --trace-env-\[js|native]-stack (Joyee Cheung) [#&#8203;55604](https://github.com/nodejs/node/pull/55604)
-   \[[`72e8e0684e`](https://github.com/nodejs/node/commit/72e8e0684e)] - **crypto**: graduate WebCryptoAPI [`Ed25519`](https://github.com/nodejs/node/commit/Ed25519) and X25519 algorithms as stable (Filip Skokan) [#&#8203;56142](https://github.com/nodejs/node/pull/56142)
-   \[[`fe2b344ddb`](https://github.com/nodejs/node/commit/fe2b344ddb)] - **crypto**: ensure CryptoKey usages and algorithm are cached objects (Filip Skokan) [#&#8203;56108](https://github.com/nodejs/node/pull/56108)
-   \[[`9ee9f524a7`](https://github.com/nodejs/node/commit/9ee9f524a7)] - **crypto**: allow non-multiple of 8 in SubtleCrypto.deriveBits (Filip Skokan) [#&#8203;55296](https://github.com/nodejs/node/pull/55296)
-   \[[`76f242d993`](https://github.com/nodejs/node/commit/76f242d993)] - **deps**: update nghttp3 to 1.6.0 (Node.js GitHub Bot) [#&#8203;56258](https://github.com/nodejs/node/pull/56258)
-   \[[`c7ff2ea6b5`](https://github.com/nodejs/node/commit/c7ff2ea6b5)] - **deps**: update simdutf to 5.6.4 (Node.js GitHub Bot) [#&#8203;56255](https://github.com/nodejs/node/pull/56255)
-   \[[`04230be1ef`](https://github.com/nodejs/node/commit/04230be1ef)] - **deps**: update libuv to 1.49.2 (Luigi Pinca) [#&#8203;56224](https://github.com/nodejs/node/pull/56224)
-   \[[`88589b85b7`](https://github.com/nodejs/node/commit/88589b85b7)] - **deps**: update c-ares to v1.34.4 (Node.js GitHub Bot) [#&#8203;56256](https://github.com/nodejs/node/pull/56256)
-   \[[`5c2e0618f3`](https://github.com/nodejs/node/commit/5c2e0618f3)] - **deps**: define V8\_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) [#&#8203;56238](https://github.com/nodejs/node/pull/56238)
-   \[[`9f8f3c9658`](https://github.com/nodejs/node/commit/9f8f3c9658)] - **deps**: update sqlite to 3.47.2 (Node.js GitHub Bot) [#&#8203;56178](https://github.com/nodejs/node/pull/56178)
-   \[[`17b6931d3b`](https://github.com/nodejs/node/commit/17b6931d3b)] - **deps**: update ngtcp2 to 1.9.1 (Node.js GitHub Bot) [#&#8203;56095](https://github.com/nodejs/node/pull/56095)
-   \[[`22b453b619`](https://github.com/nodejs/node/commit/22b453b619)] - **deps**: upgrade npm to 10.9.2 (npm team) [#&#8203;56135](https://github.com/nodejs/node/pull/56135)
-   \[[`d7eb41b382`](https://github.com/nodejs/node/commit/d7eb41b382)] - **deps**: update sqlite to 3.47.1 (Node.js GitHub Bot) [#&#8203;56094](https://github.com/nodejs/node/pull/56094)
-   \[[`669c722aa9`](https://github.com/nodejs/node/commit/669c722aa9)] - **deps**: update zlib to 1.3.0.1-motley-82a5fec (Node.js GitHub Bot) [#&#8203;55980](https://github.com/nodejs/node/pull/55980)
-   \[[`f61a0454d2`](https://github.com/nodejs/node/commit/f61a0454d2)] - **deps**: update corepack to 0.30.0 (Node.js GitHub Bot) [#&#8203;55977](https://github.com/nodejs/node/pull/55977)
-   \[[`d98bf0b891`](https://github.com/nodejs/node/commit/d98bf0b891)] - **deps**: update ngtcp2 to 1.9.0 (Node.js GitHub Bot) [#&#8203;55975](https://github.com/nodejs/node/pull/55975)
-   \[[`fc362624bf`](https://github.com/nodejs/node/commit/fc362624bf)] - **deps**: update simdutf to 5.6.3 (Node.js GitHub Bot) [#&#8203;55973](https://github.com/nodejs/node/pull/55973)
-   \[[`f61dcc4df4`](https://github.com/nodejs/node/commit/f61dcc4df4)] - **deps**: upgrade npm to 10.9.1 (npm team) [#&#8203;55951](https://github.com/nodejs/node/pull/55951)
-   \[[`bfe7982491`](https://github.com/nodejs/node/commit/bfe7982491)] - **deps**: update zlib to 1.3.0.1-motley-7e2e4d7 (Node.js GitHub Bot) [#&#8203;54432](https://github.com/nodejs/node/pull/54432)
-   \[[`d714367ef8`](https://github.com/nodejs/node/commit/d714367ef8)] - **deps**: update simdjson to 3.10.1 (Node.js GitHub Bot) [#&#8203;54678](https://github.com/nodejs/node/pull/54678)
-   \[[`ccc9b105ec`](https://github.com/nodejs/node/commit/ccc9b105ec)] - **deps**: update simdutf to 5.6.2 (Node.js GitHub Bot) [#&#8203;55889](https://github.com/nodejs/node/pull/55889)
-   \[[`ba9d5397de`](https://github.com/nodejs/node/commit/ba9d5397de)] - **(SEMVER-MINOR)** **dgram**: support blocklist in udp (theanarkh) [#&#8203;56087](https://github.com/nodejs/node/pull/56087)
-   \[[`7ddbf94849`](https://github.com/nodejs/node/commit/7ddbf94849)] - **dgram**: check udp buffer size to avoid fd leak (theanarkh) [#&#8203;56084](https://github.com/nodejs/node/pull/56084)
-   \[[`360d68de0f`](https://github.com/nodejs/node/commit/360d68de0f)] - **doc**: fix color contrast issue in light mode (Rich Trott) [#&#8203;56272](https://github.com/nodejs/node/pull/56272)
-   \[[`f6d0c01303`](https://github.com/nodejs/node/commit/f6d0c01303)] - **doc**: stabilize util.styleText (Rafael Gonzaga) [#&#8203;56265](https://github.com/nodejs/node/pull/56265)
-   \[[`9436c3c949`](https://github.com/nodejs/node/commit/9436c3c949)] - **doc**: clarify util.aborted resource usage (Kunal Kumar) [#&#8203;55780](https://github.com/nodejs/node/pull/55780)
-   \[[`b1cec2cef9`](https://github.com/nodejs/node/commit/b1cec2cef9)] - **doc**: add esm examples to node:repl (Alfredo González) [#&#8203;55432](https://github.com/nodejs/node/pull/55432)
-   \[[`d6a84cf781`](https://github.com/nodejs/node/commit/d6a84cf781)] - **doc**: add esm examples to node:readline (Alfredo González) [#&#8203;55335](https://github.com/nodejs/node/pull/55335)
-   \[[`a11ac1c0f2`](https://github.com/nodejs/node/commit/a11ac1c0f2)] - **doc**: fix 'which' to 'that' and add commas (Selveter Senitro) [#&#8203;56216](https://github.com/nodejs/node/pull/56216)
-   \[[`5331df7911`](https://github.com/nodejs/node/commit/5331df7911)] - **doc**: fix winget config path (Alex Yang) [#&#8203;56233](https://github.com/nodejs/node/pull/56233)
-   \[[`7a8071b43c`](https://github.com/nodejs/node/commit/7a8071b43c)] - **doc**: add esm examples to node:tls (Alfredo González) [#&#8203;56229](https://github.com/nodejs/node/pull/56229)
-   \[[`7d8c1e72d5`](https://github.com/nodejs/node/commit/7d8c1e72d5)] - **doc**: add esm examples to node:perf_hooks (Alfredo González) [#&#8203;55257](https://github.com/nodejs/node/pull/55257)
-   \[[`ea53c4b1ae`](https://github.com/nodejs/node/commit/ea53c4b1ae)] - **doc**: `sea.getRawAsset(key)` always returns an ArrayBuffer (沈鸿飞) [#&#8203;56206](https://github.com/nodejs/node/pull/56206)
-   \[[`7a94100a3e`](https://github.com/nodejs/node/commit/7a94100a3e)] - **doc**: update announce documentation for releases (Rafael Gonzaga) [#&#8203;56200](https://github.com/nodejs/node/pull/56200)
-   \[[`44c4e57e32`](https://github.com/nodejs/node/commit/44c4e57e32)] - **doc**: update blog link to /vulnerability (Rafael Gonzaga) [#&#8203;56198](https://github.com/nodejs/node/pull/56198)
-   \[[`5e5b4b0cbd`](https://github.com/nodejs/node/commit/5e5b4b0cbd)] - **doc**: call out import.meta is only supported in ES modules (Anton Kastritskii) [#&#8203;56186](https://github.com/nodejs/node/pull/56186)
-   \[[`a83de32d35`](https://github.com/nodejs/node/commit/a83de32d35)] - **doc**: add ambassador message - benefits of Node.js (Michael Dawson) [#&#8203;56085](https://github.com/nodejs/node/pull/56085)
-   \[[`bb880dd21a`](https://github.com/nodejs/node/commit/bb880dd21a)] - **doc**: fix incorrect link to style guide (Yuan-Ming Hsu) [#&#8203;56181](https://github.com/nodejs/node/pull/56181)
-   \[[`39ce902e58`](https://github.com/nodejs/node/commit/39ce902e58)] - **doc**: fix c++ addon hello world sample (Edigleysson Silva (Edy)) [#&#8203;56172](https://github.com/nodejs/node/pull/56172)
-   \[[`19c72c4acc`](https://github.com/nodejs/node/commit/19c72c4acc)] - **doc**: update blog release-post link (Ruy Adorno) [#&#8203;56123](https://github.com/nodejs/node/pull/56123)
-   \[[`b667cc4669`](https://github.com/nodejs/node/commit/b667cc4669)] - **doc**: fix module.md headings (Chengzhong Wu) [#&#8203;56131](https://github.com/nodejs/node/pull/56131)
-   \[[`34c68827af`](https://github.com/nodejs/node/commit/34c68827af)] - **doc**: move typescript support to active development (Marco Ippolito) [#&#8203;55536](https://github.com/nodejs/node/pull/55536)
-   \[[`c4a97d810b`](https://github.com/nodejs/node/commit/c4a97d810b)] - **doc**: mention `-a` flag for the release script (Ruy Adorno) [#&#8203;56124](https://github.com/nodejs/node/pull/56124)
-   \[[`dd14b80350`](https://github.com/nodejs/node/commit/dd14b80350)] - **doc**: add LJHarb to collaborators (Jordan Harband) [#&#8203;56132](https://github.com/nodejs/node/pull/56132)
-   \[[`2feb0781ed`](https://github.com/nodejs/node/commit/2feb0781ed)] - **doc**: add create-release-action to process (Rafael Gonzaga) [#&#8203;55993](https://github.com/nodejs/node/pull/55993)
-   \[[`71f6263942`](https://github.com/nodejs/node/commit/71f6263942)] - **doc**: rename file to advocacy-ambassador-program.md (Tobias Nießen) [#&#8203;56046](https://github.com/nodejs/node/pull/56046)
-   \[[`8efa240500`](https://github.com/nodejs/node/commit/8efa240500)] - **doc**: remove unused import from sample code (Blended Bram) [#&#8203;55570](https://github.com/nodejs/node/pull/55570)
-   \[[`e64cef8bf4`](https://github.com/nodejs/node/commit/e64cef8bf4)] - **doc**: add FAQ to releases section (Rafael Gonzaga) [#&#8203;55992](https://github.com/nodejs/node/pull/55992)
-   \[[`4bb0f30f92`](https://github.com/nodejs/node/commit/4bb0f30f92)] - **doc**: move history entry to class description (Luigi Pinca) [#&#8203;55991](https://github.com/nodejs/node/pull/55991)
-   \[[`6d02bd6873`](https://github.com/nodejs/node/commit/6d02bd6873)] - **doc**: add history entry for textEncoder.encodeInto() (Luigi Pinca) [#&#8203;55990](https://github.com/nodejs/node/pull/55990)
-   \[[`e239382ed8`](https://github.com/nodejs/node/commit/e239382ed8)] - **doc**: improve GN build documentation a bit (Shelley Vohr) [#&#8203;55968](https://github.com/nodejs/node/pull/55968)
-   \[[`78b6aef6bc`](htt

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7545
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-15 08:36:10 +00:00
Earl Warren
1b11ca6f36 fix: match PackageBlob.HashBlake2b definition and migration (#7543)
If not a migration will show a warning:

`[W] Table public.package_blob column hash_blake2b db type is VARCHAR(255), struct type is CHAR(128)`

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7543
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-04-15 07:05:21 +00:00
tacaly
6d703bb6e3 fix(UI): i18n: improve naming (#7539)
## 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)).
  - [x] I will test the UI with a screenshot. And attach it in a comment when test has passed.

### Documentation

- [x] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
https://codeberg.org/forgejo/docs/pulls/1145

- [ ] 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.

### Reason for the PR?

The reason is to correct the naming of the lang in the UI. It was discussed in the matrix chat and requested by @0ko.
https://matrix.to/#/!UJgSZwuZLRYXEOyjPb:matrix.org/$TbMlNm9L1P9gHFwJYZ3vTIPBKtUHyaoQVEDdzfTQIxI?via=matrix.org&via=envs.net&via=mozilla.org

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7539
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: tacaly <frederick@tacaly.com>
Co-committed-by: tacaly <frederick@tacaly.com>
2025-04-15 05:48:19 +00:00
TheFox0x7
504bb09319 fix github migration error when using multiple tokens (#34144)
Git authorization was not taking into account multiple token feature,
leading to auth failures

Closes: https://github.com/go-gitea/gitea/issues/34141

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 8a6df00c532becd4d10efb70827ccf80b2bf74e2)
2025-04-14 16:21:28 +02:00
hiifong
82dd00873d fix webhook url (#34186)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit aada0370e7d72a591d58788f6db76bdbc3dddbb7)
2025-04-14 16:10:20 +02:00
Kerwin Bryant
9144726e4f Update milestones.tmpl (#34184)
(cherry picked from commit 5015992db578659a47b9a0949f1773ebac2b2b4b)
2025-04-14 16:03:04 +02:00
ManInDark
23b713464c bugfix check for alternate ssh host certificate location (#34146)
fixes #34145

Edited all locations to actually be correct.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit fac6b87dd24be5021d9c656edc2072397cfd6bed)
2025-04-14 15:53:35 +02:00
wxiaoguang
89e4144855 Set MERMAID_MAX_SOURCE_CHARACTERS to 50000 (#34152)
Fix #32015

(cherry picked from commit f8edc29f5dd1a99e3be1a2ff764d1d7315862345)
2025-04-14 15:47:37 +02:00
Renovate Bot
8665bbc085 Update renovate to v39.240.1 (forgejo) (#7532)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [data.forgejo.org/renovate/renovate](https://renovatebot.com) ([source](https://github.com/renovatebot/renovate)) | container | minor | `39.233.5` -> `39.240.1` |
| [renovate](https://renovatebot.com) ([source](https://github.com/renovatebot/renovate)) |  | minor | `39.233.5` -> `39.240.1` |

---

### Release Notes

<details>
<summary>renovatebot/renovate (data.forgejo.org/renovate/renovate)</summary>

### [`v39.240.1`](https://github.com/renovatebot/renovate/releases/tag/39.240.1)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.240.0...39.240.1)

##### Build System

-   **deps:** update dependency cronstrue to v2.58.0 (main) ([#&#8203;35346](https://github.com/renovatebot/renovate/issues/35346)) ([7da63b4](7da63b485a))

### [`v39.240.0`](https://github.com/renovatebot/renovate/releases/tag/39.240.0)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.238.2...39.240.0)

##### Features

-   **datasource/azure-pipelines-tasks:** add built-in tasks changelog url ([#&#8203;35325](https://github.com/renovatebot/renovate/issues/35325)) ([5091b14](5091b14184))

##### Miscellaneous Chores

-   **deps:** update dependency [@&#8203;types/better-sqlite3](https://github.com/types/better-sqlite3) to v7.6.13 (main) ([#&#8203;35333](https://github.com/renovatebot/renovate/issues/35333)) ([05b3fc0](05b3fc0e25))
-   **deps:** update dependency renovatebot/github-action to v41.0.19 (main) ([#&#8203;35337](https://github.com/renovatebot/renovate/issues/35337)) ([479886f](479886f676))
-   **deps:** update dependency typescript to v5.8.3 (main) ([#&#8203;35336](https://github.com/renovatebot/renovate/issues/35336)) ([abe1f18](abe1f185cb))
-   **deps:** update dependency vitest-mock-extended to v3.1.0 (main) ([#&#8203;35334](https://github.com/renovatebot/renovate/issues/35334)) ([680e161](680e161030))

### [`v39.238.2`](https://github.com/renovatebot/renovate/releases/tag/39.238.2)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.238.1...39.238.2)

##### Bug Fixes

-   **workers/auto-replace:** correctly handle prefix replacements ([#&#8203;35265](https://github.com/renovatebot/renovate/issues/35265)) ([afd6415](afd6415ad8))

##### Miscellaneous Chores

-   **deps:** update dependency [@&#8203;types/luxon](https://github.com/types/luxon) to v3.6.1 (main) ([#&#8203;35313](https://github.com/renovatebot/renovate/issues/35313)) ([05ebbf3](05ebbf3b79))
-   **deps:** update dependency [@&#8203;types/luxon](https://github.com/types/luxon) to v3.6.2 (main) ([#&#8203;35319](https://github.com/renovatebot/renovate/issues/35319)) ([790d0ea](790d0ea50d))
-   **deps:** update dependency [@&#8203;types/node](https://github.com/types/node) to v22.14.0 (main) ([#&#8203;35295](https://github.com/renovatebot/renovate/issues/35295)) ([2188ebb](2188ebb98f))
-   **deps:** update dependency [@&#8203;vitest/eslint-plugin](https://github.com/vitest/eslint-plugin) to v1.1.39 (main) ([#&#8203;35293](https://github.com/renovatebot/renovate/issues/35293)) ([043d665](043d665677))
-   **deps:** update dependency type-fest to v4.39.1 (main) ([#&#8203;35302](https://github.com/renovatebot/renovate/issues/35302)) ([21e1e6f](21e1e6f9cd))

##### Code Refactoring

-   **gerrit:** remove deprecated source branch as hashtags support ([#&#8203;33329](https://github.com/renovatebot/renovate/issues/33329)) ([e64ca6b](e64ca6b852))

### [`v39.238.1`](https://github.com/renovatebot/renovate/releases/tag/39.238.1)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.238.0...39.238.1)

##### Bug Fixes

-   **deps:** update ghcr.io/containerbase/sidecar docker tag to v13.8.13 (main) ([#&#8203;35289](https://github.com/renovatebot/renovate/issues/35289)) ([25eafdb](25eafdb379))

##### Miscellaneous Chores

-   **deps:** update ghcr.io/containerbase/devcontainer docker tag to v13.8.13 (main) ([#&#8203;35288](https://github.com/renovatebot/renovate/issues/35288)) ([e0b85f3](e0b85f3b38))

### [`v39.238.0`](https://github.com/renovatebot/renovate/releases/tag/39.238.0)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.237.0...39.238.0)

##### Features

-   **datasource/github-runners:** mark Windows Server 2025 as stable ([#&#8203;35284](https://github.com/renovatebot/renovate/issues/35284)) ([ad5c45f](ad5c45f437))

### [`v39.237.0`](https://github.com/renovatebot/renovate/releases/tag/39.237.0)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.236.2...39.237.0)

##### Features

-   **bitbucket-server:** add support for changelogs ([#&#8203;34569](https://github.com/renovatebot/renovate/issues/34569)) ([68a66a0](68a66a05a9))

### [`v39.236.2`](https://github.com/renovatebot/renovate/releases/tag/39.236.2)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.236.1...39.236.2)

##### Bug Fixes

-   **deps:** update ghcr.io/containerbase/sidecar docker tag to v13.8.12 (main) ([#&#8203;35279](https://github.com/renovatebot/renovate/issues/35279)) ([702f18f](702f18f6a5))

### [`v39.236.1`](https://github.com/renovatebot/renovate/releases/tag/39.236.1)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.236.0...39.236.1)

##### Bug Fixes

-   **tool/pixi:** remove `v` prefix from raw version ([#&#8203;35277](https://github.com/renovatebot/renovate/issues/35277)) ([e938454](e938454903))

##### Miscellaneous Chores

-   **deps:** update dependency pdm to v2.23.1 (main) ([#&#8203;35275](https://github.com/renovatebot/renovate/issues/35275)) ([78ecd13](78ecd13a8c))
-   **deps:** update ghcr.io/containerbase/devcontainer docker tag to v13.8.12 (main) ([#&#8203;35278](https://github.com/renovatebot/renovate/issues/35278)) ([84454cf](84454cfd62))

### [`v39.236.0`](https://github.com/renovatebot/renovate/releases/tag/39.236.0)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.235.4...39.236.0)

##### Features

-   **conan:** Add support for lockfile maintenance ([#&#8203;28174](https://github.com/renovatebot/renovate/issues/28174)) ([564ee83](564ee83fb7))

### [`v39.235.4`](https://github.com/renovatebot/renovate/releases/tag/39.235.4)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.235.3...39.235.4)

##### Bug Fixes

-   **changelogs:** support massaging self-hosted gitlab URLs ([#&#8203;35258](https://github.com/renovatebot/renovate/issues/35258)) ([8a93407](8a93407a78))

##### Miscellaneous Chores

-   **deps:** update dependency [@&#8203;types/node](https://github.com/types/node) to v22.13.17 (main) ([#&#8203;35263](https://github.com/renovatebot/renovate/issues/35263)) ([12ea7e1](12ea7e1474))

### [`v39.235.3`](https://github.com/renovatebot/renovate/releases/tag/39.235.3)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.235.2...39.235.3)

##### Bug Fixes

-   **deps:** update ghcr.io/containerbase/sidecar docker tag to v13.8.11 (main) ([#&#8203;35260](https://github.com/renovatebot/renovate/issues/35260)) ([e4eefde](e4eefde273))

##### Miscellaneous Chores

-   **deps:** update dependency [@&#8203;types/luxon](https://github.com/types/luxon) to v3.6.0 (main) ([#&#8203;35236](https://github.com/renovatebot/renovate/issues/35236)) ([3619702](361970298b))
-   **deps:** update dependency [@&#8203;types/node](https://github.com/types/node) to v22.13.15 (main) ([#&#8203;35237](https://github.com/renovatebot/renovate/issues/35237)) ([6fbcdb3](6fbcdb3c09))
-   **deps:** update dependency [@&#8203;types/node](https://github.com/types/node) to v22.13.16 (main) ([#&#8203;35246](https://github.com/renovatebot/renovate/issues/35246)) ([781a9cf](781a9cf331))
-   **deps:** update dependency pnpm to v10.7.1 (main) ([#&#8203;35249](https://github.com/renovatebot/renovate/issues/35249)) ([b88a306](b88a3068a3))
-   **deps:** update dependency type-fest to v4.39.0 (main) ([#&#8203;35250](https://github.com/renovatebot/renovate/issues/35250)) ([d4da4a1](d4da4a1055))
-   **deps:** update ghcr.io/containerbase/devcontainer docker tag to v13.8.11 (main) ([#&#8203;35259](https://github.com/renovatebot/renovate/issues/35259)) ([f6f5f4e](f6f5f4e912))
-   **deps:** update github/codeql-action action to v3.28.15 (main) ([#&#8203;35235](https://github.com/renovatebot/renovate/issues/35235)) ([1de6ec9](1de6ec9a39))
-   **deps:** update python:3.13 docker digest to [`18ecbd0`](https://github.com/renovatebot/renovate/commit/18ecbd0) (main) ([#&#8203;35243](https://github.com/renovatebot/renovate/issues/35243)) ([1b6f9df](1b6f9dfa5a))
-   **deps:** update python:3.13 docker digest to [`aaf6d3c`](https://github.com/renovatebot/renovate/commit/aaf6d3c) (main) ([#&#8203;35247](https://github.com/renovatebot/renovate/issues/35247)) ([e9ba9fc](e9ba9fc2e3))
-   **deps:** update vitest monorepo to v3.1.1 (main) ([#&#8203;35221](https://github.com/renovatebot/renovate/issues/35221)) ([558809f](558809f1aa))

##### Code Refactoring

-   **circleci:** Simplify CircleCI extraction ([#&#8203;35233](https://github.com/renovatebot/renovate/issues/35233)) ([8c00b15](8c00b15ffc))

### [`v39.235.2`](https://github.com/renovatebot/renovate/releases/tag/39.235.2)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.235.1...39.235.2)

##### Build System

-   **deps:** update dependency [@&#8203;renovatebot/osv-offline](https://github.com/renovatebot/osv-offline) to v1.6.5 (main) ([#&#8203;35232](https://github.com/renovatebot/renovate/issues/35232)) ([fcc9b47](fcc9b47101))

### [`v39.235.1`](https://github.com/renovatebot/renovate/releases/tag/39.235.1)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.235.0...39.235.1)

##### Build System

-   **deps:** update dependency luxon to v3.6.1 (main) ([#&#8203;35230](https://github.com/renovatebot/renovate/issues/35230)) ([c91c875](c91c87594b))

### [`v39.235.0`](https://github.com/renovatebot/renovate/releases/tag/39.235.0)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.234.0...39.235.0)

##### Features

-   **schema:** Add utility for detecting circular data ([#&#8203;35223](https://github.com/renovatebot/renovate/issues/35223)) ([5ad8030](5ad8030a8e))

##### Miscellaneous Chores

-   **deps:** update github/codeql-action action to v3.28.14 (main) ([#&#8203;35220](https://github.com/renovatebot/renovate/issues/35220)) ([a13f5da](a13f5daca9))
-   **label-actions:** capitalize Renovate brandname ([#&#8203;35222](https://github.com/renovatebot/renovate/issues/35222)) ([b53f2a9](b53f2a9ffe))

### [`v39.234.0`](https://github.com/renovatebot/renovate/releases/tag/39.234.0)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.233.6...39.234.0)

##### Features

-   add Azure Pipelines preset ([#&#8203;35207](https://github.com/renovatebot/renovate/issues/35207)) ([4cb2bb2](4cb2bb2d77))
-   **manager/nuget:** extract msbuild sdk from `Import` ([#&#8203;35206](https://github.com/renovatebot/renovate/issues/35206)) ([727792a](727792a3ce))

##### Documentation

-   **upgrade best practices:** update preset code plus small rewrite ([#&#8203;34837](https://github.com/renovatebot/renovate/issues/34837)) ([0be280b](0be280ba8a))

### [`v39.233.6`](https://github.com/renovatebot/renovate/releases/tag/39.233.6)

[Compare Source](https://github.com/renovatebot/renovate/compare/39.233.5...39.233.6)

##### Bug Fixes

-   **circleci:** Ignore non-image alias items ([#&#8203;35212](https://github.com/renovatebot/renovate/issues/35212)) ([e746331](e7463311b8))

##### Documentation

-   update references to renovate/renovate (main) ([#&#8203;35213](https://github.com/renovatebot/renovate/issues/35213)) ([73c9fac](73c9faca22))

##### Miscellaneous Chores

-   **deps:** lock file maintenance (main) ([#&#8203;35214](https://github.com/renovatebot/renovate/issues/35214)) ([3598dfb](3598dfb8f9))
-   **deps:** lock file maintenance (main) ([#&#8203;35217](https://github.com/renovatebot/renovate/issues/35217)) ([57972f6](57972f613a))
-   **deps:** update containerbase/internal-tools action to v3.10.19 (main) ([#&#8203;35215](https://github.com/renovatebot/renovate/issues/35215)) ([60ef7bf](60ef7bfcf1))
-   **deps:** update containerbase/internal-tools action to v3.10.20 (main) ([#&#8203;35218](https://github.com/renovatebot/renovate/issues/35218)) ([7cc1fb2](7cc1fb2d68))
-   **deps:** update dependency esbuild to v0.25.2 (main) ([#&#8203;35210](https://github.com/renovatebot/renovate/issues/35210)) ([1107833](1107833bcd))

##### Tests

-   **yaml:** Fix code block indents ([#&#8203;35211](https://github.com/renovatebot/renovate/issues/35211)) ([5d48319](5d4831961b))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzMuNSIsInVwZGF0ZWRJblZlciI6IjM5LjIzMy41IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJmb3JnZWpvL2NpIiwidGVzdC9ub3QtbmVlZGVkIl19-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7532
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-14 10:39:25 +00:00
Renovate Bot
bc02a82338 Lock file maintenance (forgejo) (#7534)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7534
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-14 08:53:00 +00:00
Gusted
442958df1d [gitea] week 2025-14 cherry pick (gitea/main -> forgejo) (#7486)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7486
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-04-13 12:00:15 +00:00
Renovate Bot
7861d2ffcf Update module github.com/golangci/golangci-lint/v2/cmd/golangci-lint to v2.1.1 (forgejo) (#7528)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [github.com/golangci/golangci-lint/v2/cmd/golangci-lint](https://github.com/golangci/golangci-lint) | minor | `v2.0.2` -> `v2.1.1` |

---

### Release Notes

<details>
<summary>golangci/golangci-lint (github.com/golangci/golangci-lint/v2/cmd/golangci-lint)</summary>

### [`v2.1.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v211)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.0...v2.1.1)

The release process of v2.1.0 failed due to a regression inside goreleaser.

The binaries of v2.1.0 have been published, but not the other artifacts (AUR, Docker, etc.).

### [`v2.1.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v210)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.0.2...v2.1.0)

1.  Enhancements
    -   Add an option to display absolute paths (`--path-mode=abs`)
    -   Add configuration path placeholder (`${config-path}`)
    -   Add `warn-unused` option for `fmt` command
    -   Colored diff for `fmt` command (`golangci-lint fmt --diff-colored`)
2.  New linters
    -   Add `funcorder` linter https://github.com/manuelarte/funcorder
3.  Linters new features or changes
    -   `go-errorlint`: from 1.7.1 to 1.8.0 (automatic error comparison and type assertion fixes)
    -   ⚠️ `goconst`: `ignore-strings` is deprecated and replaced by `ignore-string-values`
    -   `goconst`: from 1.7.1 to 1.8.1 (new options: `find-duplicates`, `eval-const-expressions`)
    -   `govet`: add `httpmux` analyzer
    -   `nilnesserr`: from 0.1.2 to 0.2.0 (detect more cases)
    -   `paralleltest`: from 1.0.10 to 1.0.14 (checks only `_test.go` files)
    -   `revive`: from 1.7.0 to 1.9.0 (support kebab case for setting names)
    -   `sloglint`: from 0.9.0 to 0.11.0 (autofix, new option `msg-style`, suggest `slog.DiscardHandler`)
    -   `wrapcheck`: from 2.10.0 to 2.11.0 (new option `report-internal-errors`)
    -   `wsl`: from 4.6.0 to 4.7.0 (cgo files are always excluded)
4.  Linters bug fixes
    -   `fatcontext`: from 0.7.1 to 0.7.2
    -   `gocritic`: fix `importshadow` checker
    -   `gosec`: from 2.22.2 to 2.22.3
    -   `ireturn`: from 0.3.1 to 0.4.0
    -   `loggercheck`: from 0.10.1 to 0.11.0
    -   `nakedret`: from 2.0.5 to 2.0.6
    -   `nonamedreturns`: from 1.0.5 to 1.0.6
    -   `protogetter`: from 0.3.12 to 0.3.13
    -   `testifylint`: from 1.6.0 to 1.6.1
    -   `unconvert`: update to HEAD
5.  Misc.
    -   Fixes memory leaks when using go1.(N) with golangci-lint built with go1.(N-X)
    -   Adds `golangci-lint-fmt` pre-commit hook
6.  Documentation
    -   Improvements
    -   Updates section about vscode integration

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzMuNSIsInVwZGF0ZWRJblZlciI6IjM5LjIzMy41IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7528
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-13 07:47:07 +00:00
Gusted
b86aefc038 chore: use sharp to generate images (#7512)
- `tools/generate-images.js` is used to convert SVGs to resized optimized SVGs and resized optimized PNG. Although it would be best to drop generating images from SVG, the usage of these images do not accept a SVG.
- The script relied on two dependencies being installed on-the-fly, this is suboptimal as it means its integrity was not saved in package-lock.json and no specific version was specified which makes reproducible builds harder. `imagemin-zopfli` was not updated in 4 years and seems to use dependency that generate funny message about memory leaks and using no longer maintained dependencies.
- Use [`sharp`](https://sharp.pixelplumbing.com/) to do the image conversion, this installs two binaries on Linux (glibc/musl) and are responsible for 5% of the `node_modules` directory size. Add this to package.json as a dev dependencies to ensure the integrity can be verified and help reproducible builds.
- Drop the `gitea` conversion, I cannot find this being used within Forgejo (my best guess is that e20cd83bc5 dropped the usage of it).
- Resolves forgejo/forgejo#7232

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7512
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-04-11 15:12:50 +00:00
Gusted
b55c72828e feat(sec): Add SSH signing support for instances (#6897)
- Add support to set `gpg.format` in the Git config, via the new `[repository.signing].FORMAT` option. This is to tell Git that the instance would like to use SSH instead of OpenPGP to sign its commits. This is guarded behind a Git version check for v2.34.0 and a check that a `ssh-keygen` binary is present.
- Add support to recognize the public SSH key that is given to `[repository.signing].SIGNING_KEY` as the signing key by the instance.
- Thus this allows the instance to use SSH commit signing for commits that the instance creates (e.g. initial and squash commits) instead of using PGP.
- Technically (although I have no clue how as this is not documented) you can have a different PGP signing key for different repositories; this is not implemented for SSH signing.
- Add unit and integration testing.
  - `TestInstanceSigning` was reworked from `TestGPGGit`, now also includes testing for SHA256 repositories. Is the main integration test that actually signs commits and checks that they are marked as verified by Forgejo.
  - `TestParseCommitWithSSHSignature` is a unit test that makes sure that if a SSH instnace signing key is set, that it is used to possibly verify instance SSH signed commits.
  - `TestSyncConfigGPGFormat` is a unit test that makes sure the correct git config is set according to the signing format setting. Also checks that the guarded git version check and ssh-keygen binary presence check is done correctly.
  - `TestSSHInstanceKey` is a unit test that makes sure the parsing of a SSH signing key is done correctly.
  - `TestAPISSHSigningKey` is a integration test that makes sure the newly added API route `/api/v1/signing-key.ssh` responds correctly.

Documentation PR: forgejo/docs#1122

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6897
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-11 13:25:35 +00:00
Earl Warren
eb85681b41 fix: package_blob.has_blake2b may be null (#7520)
- When looking for an existing blob, has_blake2b will be null when it was created prior to v26 migration in v11, when the field was introduced.
- Add unit test and minimal refactoring to load fixtures. The AddFixture function should not be where it currently is because it cannot be used by some packages (circular import). But that's a refactor that needs to be elsewhere for backporting purposes.

Fixes https://codeberg.org/forgejo/forgejo/issues/7519
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-04-11 12:28:03 +00:00
Michael Jerger
2a1759ba3b use base.TruncateString instead of TruncateRune 2025-04-10 13:49:18 +02:00
0ko
eb3feaad45 chore(i18n): update contributing documentation with JSON format (#7499)
Things have changed and the readme file in `locale` became significantly less relevant, suggesting things like
> When you work on Forgejo features, you should only modify `locale_en-US.ini`.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7499
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-04-10 10:30:22 +00:00
Earl Warren
a783a72d6b chore: refactor for Actions Done Notification (#7510)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7510
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-04-10 09:51:57 +00:00
christopher-besch
cdb4682bca feat: move UpdateTaskByState to services
This function is also can't be in models in order to enable calling
the action run state change notification channel.
2025-04-10 08:38:28 +02:00
christopher-besch
81b5c7ca6f feat: move StopTask, CancelPreviousJobs and CleanRepoScheduleTasks to services/actions
This enables all action run state changes (from a not done to a done
state) to also send a notification.

Moved these:

- models/actions/task.go|423 col 6| func StopTask(ctx context.Context, taskID int64, status Status) error {
- models/actions/run.go|190 col 6| func CancelPreviousJobs(ctx context.Context, repoID int64, ref, workflowID string, event webhook_module.HookEventType) error {
- models/actions/schedule.go|122 col 6| func CleanRepoScheduleTasks(ctx context.Context, repo *repo_model.Repository, cancelPreviousJobs bool) error {
2025-04-10 08:38:27 +02:00
Renovate Bot
1c2a29807b Update dependency katex to v0.16.22 (forgejo) (#7503)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [katex](https://katex.org) ([source](https://github.com/KaTeX/KaTeX)) | dependencies | patch | [`0.16.21` -> `0.16.22`](https://renovatebot.com/diffs/npm/katex/0.16.21/0.16.22) |

---

### Release Notes

<details>
<summary>KaTeX/KaTeX (katex)</summary>

### [`v0.16.22`](https://github.com/KaTeX/KaTeX/blob/HEAD/CHANGELOG.md#01622-2025-04-09)

[Compare Source](https://github.com/KaTeX/KaTeX/compare/v0.16.21...v0.16.22)

##### Bug Fixes

-   \relax in base or exponent of super/subscript ([#&#8203;4045](https://github.com/KaTeX/KaTeX/issues/4045)) ([1f43c84](1f43c84a17))

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzMuNSIsInVwZGF0ZWRJblZlciI6IjM5LjIzMy41IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7503
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-10 05:58:44 +00:00
Earl Warren
7d9d48819a i18n: update of translations from Codeberg Translate (#7438)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7438
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-04-10 05:55:43 +00:00
Codeberg Translate
0bfb3751fb
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: Edgarsons <edgarsons@noreply.codeberg.org>
Co-authored-by: Fjuro <fjuro@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
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: Porrumentzio <porrumentzio@noreply.codeberg.org>
Co-authored-by: SomeTr <sometr@noreply.codeberg.org>
Co-authored-by: Wuzzy <wuzzy@disroot.org>
Co-authored-by: artnay <artnay@noreply.codeberg.org>
Co-authored-by: earl-warren <earl-warren@noreply.codeberg.org>
Co-authored-by: nekoedges <nekoedges@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/
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/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/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/es/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/fi/
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/lv/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/nds/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/ru/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/uk/
Translate-URL: https://translate.codeberg.org/projects/forgejo/forgejo/zh_Hans/
Translation: Forgejo/forgejo
Translation: Forgejo/forgejo-next
2025-04-10 05:25:01 +00:00
Renovate Bot
911806879f Update module golang.org/x/tools/cmd/deadcode to v0.32.0 (forgejo) (#7505)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-04-10 02:36:29 +00:00
Renovate Bot
c31be003d1 Update module golang.org/x/net to v0.39.0 (forgejo) (#7504)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7504
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-10 01:41:48 +00:00
0ko
282125e90f fix(ui): ensure consistent switch position in markdown editor (#7492)
Followup to https://codeberg.org/forgejo/forgejo/pulls/7481.

Fix a bug reported by @Gusted where the switch would jump ~1px up when switched to preview mode.

It was because the switch is always center-aligning to the largest element in the toolbar. With toolbar buttons disappearing, the largest element was the switch itself. By placing it in a box with same height as the buttons we can ensure it can always stay in the same position.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7492
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-09 17:37:46 +00:00
Renovate Bot
eca57cc3e9 Update dependency webpack to v5.99.5 (forgejo) (#7494)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7494
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-09 09:51:31 +00:00
Renovate Bot
3be290457f Update module golang.org/x/image to v0.26.0 (forgejo) (#7497)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [golang.org/x/image](https://pkg.go.dev/golang.org/x/image) | require | minor | [`v0.25.0` -> `v0.26.0`](https://cs.opensource.google/go/x/image/+/refs/tags/v0.25.0...refs/tags/v0.26.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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzMuNSIsInVwZGF0ZWRJblZlciI6IjM5LjIzMy41IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7497
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-09 06:11:23 +00:00
Renovate Bot
bca6ae7862 Update module github.com/minio/minio-go/v7 to v7.0.90 (forgejo) (#7495)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) | require | patch | `v7.0.88` -> `v7.0.90` |

---

### Release Notes

<details>
<summary>minio/minio-go (github.com/minio/minio-go/v7)</summary>

### [`v7.0.90`](https://github.com/minio/minio-go/releases/tag/v7.0.90): Bugfix v7.0.90

[Compare Source](https://github.com/minio/minio-go/compare/v7.0.89...v7.0.90)

#### What's Changed

-   Add anonymous chunked encoding with trailing headers by [@&#8203;klauspost](https://github.com/klauspost) in https://github.com/minio/minio-go/pull/2084
-   Implement AppendObject() API by [@&#8203;harshavardhana](https://github.com/harshavardhana) in https://github.com/minio/minio-go/pull/2082
-   Update x/net version by [@&#8203;BorjaOuterelo](https://github.com/BorjaOuterelo) in https://github.com/minio/minio-go/pull/2085
-   Rety iterators by [@&#8203;tlyons-cs](https://github.com/tlyons-cs) in https://github.com/minio/minio-go/pull/2087
-   Add function for getting creds of remote client by [@&#8203;shtripat](https://github.com/shtripat) in https://github.com/minio/minio-go/pull/2089

#### New Contributors

-   [@&#8203;BorjaOuterelo](https://github.com/BorjaOuterelo) made their first contribution in https://github.com/minio/minio-go/pull/2085
-   [@&#8203;tlyons-cs](https://github.com/tlyons-cs) made their first contribution in https://github.com/minio/minio-go/pull/2087

**Full Changelog**: https://github.com/minio/minio-go/compare/v7.0.89...v7.0.90

### [`v7.0.89`](https://github.com/minio/minio-go/releases/tag/v7.0.89): Bugfix Release

[Compare Source](https://github.com/minio/minio-go/compare/v7.0.88...v7.0.89)

#### What's Changed

-   add PurgeOnDelete to versioning config by [@&#8203;poornas](https://github.com/poornas) in https://github.com/minio/minio-go/pull/2074
-   Adds `TokenRevokeType` field to credential providers. by [@&#8203;taran-p](https://github.com/taran-p) in https://github.com/minio/minio-go/pull/2075
-   make downtime info as map to denote per target info by [@&#8203;Praveenrajmani](https://github.com/Praveenrajmani) in https://github.com/minio/minio-go/pull/2079
-   update deps and move CI/CD to go1.23, go1.24 by [@&#8203;harshavardhana](https://github.com/harshavardhana) in https://github.com/minio/minio-go/pull/2080
-   update golint version by [@&#8203;harshavardhana](https://github.com/harshavardhana) in https://github.com/minio/minio-go/pull/2083

#### New Contributors

-   [@&#8203;taran-p](https://github.com/taran-p) made their first contribution in https://github.com/minio/minio-go/pull/2075

**Full Changelog**: https://github.com/minio/minio-go/compare/v7.0.88...v7.0.89

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzMuNSIsInVwZGF0ZWRJblZlciI6IjM5LjIzMy41IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7495
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-09 06:05:01 +00:00
Renovate Bot
5b6cbd8195 Update module go.uber.org/mock to v0.5.1 (forgejo) (#7488)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [go.uber.org/mock](https://github.com/uber/mock) | require | patch | `v0.5.0` -> `v0.5.1` |

---

### Release Notes

<details>
<summary>uber/mock (go.uber.org/mock)</summary>

### [`v0.5.1`](https://github.com/uber-go/mock/releases/tag/v0.5.1)

[Compare Source](https://github.com/uber/mock/compare/v0.5.0...v0.5.1)

#### 0.5.1 (7 Apr 2025)

##### Fixed

-   [#&#8203;220][]: Package mode will now generate code that uses aliases of types
    when they are used in the source.
-   [#&#8203;219][]: Fixed a collision between function argument names and package names
    in generated code.
-   [#&#8203;165][]: Fixed an issue where aliases specified by `-imports` were not being
    respected in generated code.

[#&#8203;220]: https://github.com/uber-go/mock/pull/220

[#&#8203;219]: https://github.com/uber-go/mock/pull/219

[#&#8203;165]: https://github.com/uber-go/mock/pull/165

Thanks to [@&#8203;mtoader](https://github.com/mtoader) and [@&#8203;bstncartwright](https://github.com/bstncartwright) for their contributions to this release.

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzMuNSIsInVwZGF0ZWRJblZlciI6IjM5LjIzMy41IiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiLCJ0ZXN0L25vdC1uZWVkZWQiXX0=-->

Co-authored-by: Gusted <postmaster@gusted.xyz>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7488
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-08 11:11:21 +00:00
Renovate Bot
b54d210eb3 Update dependency webpack to v5.99.1 (forgejo) (#7490)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7490
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-08 05:19:29 +00:00
Mopcho
64cc883ac1 Fix discord webhook 400 status code when description limit is exceeded (#34084)
Fixes [#34027](https://github.com/go-gitea/gitea/issues/34027)

Discord does not allow for description bigger than 2048 bytes. If the
description is bigger than that it will throw 400 and the event won't
appear in discord. To fix that, in the createPayload method we now slice
the description to ensure it doesn’t exceed the limit.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 013b2686fe6d306c4fb800147207b099866683b9)
2025-04-07 18:27:08 +02:00
KN4CK3R
3e3a109dd2 Fix invalid version in RPM package path (#34112)
(cherry picked from commit 8fed70afdc0f63636cdd6f5ea3fdf88061ad8dc2)
2025-04-07 18:05:29 +02:00
ManInDark
51990751a6 also check default ssh-cert location for host (#34099) (#34100)
(cherry picked from commit f8d549436ea70142514557b6a1d23d578d6aef42)
2025-04-07 18:03:33 +02:00
Kemal Zebari
f7b19964a7 Add new CLI flags to set name and scopes when creating a user with access token (#34080)
Resolves #33474.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 55a69ae4c63ee8551eadb161cb901ba0a2a2e194)
2025-04-07 17:26:34 +02:00
Lunny Xiao
02d9c7cd27 Return default avatar url when user id is zero rather than updating database (#34094)
(cherry picked from commit 88352e0b252e9186a5633d39124a8a65ab89f831)
2025-04-07 16:48:15 +02:00
0ko
afffbe2982 ui: use switch for markdown editor modes (#7481)
Replaces https://codeberg.org/forgejo/forgejo/pulls/5478
Closes https://codeberg.org/forgejo/forgejo/issues/244

Use switch for preview mode switching instead of tabs. It is placed in line with the toolbar buttons.

Preview:
* https://codeberg.org/attachments/38910747-c14c-41d1-9935-c35f3e17033b
* https://codeberg.org/attachments/ff8ea47a-f157-424f-8b7f-af1008d5e8b5

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7481
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
2025-04-07 13:47:13 +00:00
Kerwin Bryant
39341df8cb Fix markup content overflow (#34072)
Fix #34069: use `overflow-wrap: anywhere` to correctly wrap overflowed
content.

(cherry picked from commit 0fd5392087d35ebe2268f32de422342020e573b9)
2025-04-07 14:54:45 +02:00
JakobDev
8296a23d79 feat: sync forks (#2364)
This allows syncing a branch of a fork with a branch of the base repo. It looks like this:
![grafik](/attachments/4508920c-7d0b-4330-9083-e3048733e38d)
This is only possible, if the fork don't have commits that are not in the main repo.

The feature is already working, but it is missing Finetuning, a better API, translations and tests, so this is currently WIP. It is also not tested with go-git.

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

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Features
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/2364): <!--number 2364 --><!--line 0 --><!--description c3luYyBmb3Jrcw==-->sync forks<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2364
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: JakobDev <jakobdev@gmx.de>
Co-committed-by: JakobDev <jakobdev@gmx.de>
2025-04-07 07:00:38 +00:00
Renovate Bot
3272e3588a Update module golang.org/x/crypto to v0.37.0 (forgejo) (#7485)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [golang.org/x/crypto](https://pkg.go.dev/golang.org/x/crypto) | require | minor | [`v0.36.0` -> `v0.37.0`](https://cs.opensource.google/go/x/crypto/+/refs/tags/v0.36.0...refs/tags/v0.37.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/7485
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-07 06:31:07 +00:00
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
silverwind
6d5fc19464
Enable color output in govulncheck (#34012)
Make `govulncheck` show color, which by default it doesn't for some
reason.

(cherry picked from commit 2089401653cb4d351aa6e0bb6a86d987d115acb8)
2025-04-01 02:28:02 +02:00
Lunny Xiao
50f8563c67
Git client will follow 301 but 307 (#34005)
Fix #28460

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 356b707dde00f61f806c8a27879830a1d9b5b895)
2025-04-01 02:28:02 +02:00
Lunny Xiao
f68d49cb9e
Move ParseBool to optional (#33979)
(cherry picked from commit 25b6f388651c893ecafce918f27bef7e4ae9a967)
2025-04-01 02:28:02 +02:00
silverwind
9018e5bc19
Cover go.mod and go.sum in .editorconfig (#33960)
These files were previously set to use spaces for indendation but they
are supposed to use tabs, so set this in editorconfig.

(cherry picked from commit d1a755e5b7c676750f3dfad2254e047e2d23c4ac)
2025-04-01 02:28:02 +02:00
charles
9d8624f341
Fix file name could not be searched if the file was not a text file when using the Bleve indexer (#33959)
Close #33828

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit b956cee06f462c4f34a7911351b7c878ce890725)
2025-04-01 02:28:02 +02:00
wxiaoguang
839739fb71
Defer captcha script loading (#33919)
Fix #33899

(cherry picked from commit fdaf1cca65e118562b3cc2eb9e7c077b28f77213)
2025-04-01 02:28:02 +02:00
ChristopherHX
4ba5c957e0
Fix cannot delete runners via the modal dialog (#33895)
delete-button and show-modal class are conflicting

Closes #33894

(cherry picked from commit 7e8168f555b0a463866afcc10e9fddc34d363811)
2025-04-01 02:28:02 +02:00
Panagiotis "Ivory" Vasilopoulos
dbeab2a0c3 chore: introduce gitNeeded bool in setup (#7348)
There are various commands of the Forgejo CLI that do not actually need Git, because i.e. they only issue network requests. Matter of fact, most occurrences do not actually require Git.

By removing the Git initialization, operations by e.g. the manager will not fail in the absence of a Git binary. This is mostly relevant for an in-the-works Landlock implementation, which aims to minimize access to paths depending on the situation. Although we should expect that Git will be installed on the same system that the user is running Forgejo from, it somewhat slows things down, whereas the same edge cases that we are trying to protect the user from _could_ be achieved by keeping the `setting.RepoRootPath` check.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7348
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-03-31 16:35:20 +00:00
Panagiotis "Ivory" Vasilopoulos
10c8ca62d2 refactor(cli): improve dump's temporary file handling (#7350)
- Create temporary directory inside of a temporary directory (useful for a work-in-progress Landlock implementation, as we will not want to "whitelist" the entirety of the /tmp directory in our case, i.e. /tmp/forgejo-dump-133552095).
- The database is always removed after dump is complete.
- The temporary directory is removed if no temporary directory has been explicitly set (as in, created by Forgejo in /tmp or equivalent).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7350
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-03-31 16:33:47 +00:00
Renovate Bot
a9faf1ff7b Update renovate to v39.222.0 (forgejo) (#7399)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-03-31 06:49:32 +00:00
Gusted
4b56c05e65 fix: validate input for default_{merge,update}_style (#7395)
- Add `binding:"In(...)"` to the `default_merge_style` and `default_update_style` fields to only accept recognized merge and update styles.
- Resolves https://codeberg.org/forgejo/forgejo/issues/7389
- Added integration test for the API (`binding` works in the exact same way for the API and web routes).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7395
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-31 03:33:18 +00:00
Renovate Bot
114cd6d4b6 Lock file maintenance (forgejo) (#7400)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7400
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-03-31 00:40:07 +00:00
Ellen Emilia Anna Zscheile
b0dd490ae1 feat(repo,locale): merge PR/issues cases for some repo/issue strings (#7092)
- Merge `archive.nocomment` and `comment.blocked_by_user`'s variants for issue and pull request to a unified string and no longer have a issue and pull request variant.
- Fixes #6443

Signed-off-by: Ellen Emilia Anna Zscheile <fogti+devel@ytrizja.de>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7092
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
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-03-30 21:58:34 +00:00
Gusted
3769259c93 chore: use dynamic id (#7396)
- Follow up forgejo/forgejo#7378
- See https://codeberg.org/forgejo/forgejo/pulls/7378#issuecomment-3167157

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7396
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-03-30 21:41:33 +00:00
Gusted
5275fbd4ea fix(ui): clarify repo init instruction for sha256 (#7394)
- When the repository is initalized with a different objectformat than sha1, ensure that the empty repository instructions reflects that the `git init` command also needs to be initialized with that objectformat.
- Resolves https://codeberg.org/codeberg/community/issues/1837
- Added integration test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7394
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-30 18:08:05 +00:00
Andreas Shimokawa
86039a89fc fix(a11y): unreadable image captcha with dark themes (#7390)
- When the user has a dark theme selected, image captchas are sometimes unreadable.
- Make sure the image captcha always has a white background color.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7390
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org>
Co-committed-by: Andreas Shimokawa <shimokawa@fsfe.org>
2025-03-30 14:51:37 +00:00
Renovate Bot
2348955af5 Lock file maintenance (forgejo) (#7392)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7392
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-03-30 14:49:48 +00:00
Gusted
7baf9994bd chore: improve repo migrate e2e test (#7378)
- Generate a repository name for each run, such that retries will use a new repository and not have any leftover.
- Make the test actually pass by ensuring the unauthenticated page didn't reuse storage state that contained authenticated cookies.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7378
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-30 14:48:52 +00:00
Renovate Bot
facc2bb28e Update github.com/google/pprof digest to a4b03ec (forgejo) (#7391)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7391
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-03-30 14:33:38 +00:00
Lucas Grzegorczyk
ba1e3405d6 feat(ui): Suggest git switch instead of git checkout (#7385)
- A minor change that replaces the usages of `git checkout` to `git switch` in the UI. `git switch` is preferred over `git checkout` by git.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7385
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Lucas Grzegorczyk <furai@thd.vg>
Co-committed-by: Lucas Grzegorczyk <furai@thd.vg>
2025-03-30 11:37:15 +00:00
pat-s
63a80bf2b9 feat: use XORM EngineGroup instead of single Engine connection (#7212)
Resolves #7207

Add new configuration to make XORM work with a main and replicas database instances. The follow configuration parameters were added:

- `HOST_PRIMARY`
- `HOST_REPLICAS`
- `LOAD_BALANCE_POLICY`. Options:
    - `"WeightRandom"` -> `xorm.WeightRandomPolicy`
    - `"WeightRoundRobin`  -> `WeightRoundRobinPolicy`
    - `"LeastCon"` -> `LeastConnPolicy`
    - `"RoundRobin"` -> `xorm.RoundRobinPolicy()`
    - default: `xorm.RandomPolicy()`
- `LOAD_BALANCE_WEIGHTS`

Co-authored-by: pat-s <patrick.schratz@gmail.com@>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7212
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-03-30 11:34:02 +00:00
0ko
a23d0453a3 feat(ui/migrations): clarify desired autocompletion type for clone_addr (#7377)
* Firefox thinks that this is a login form and that `clone_addr` is it's username field
* It would have been an easy fix with with `autocomplete="off"`, but there's an issue with that approach:  Firefox plays a cat-mouse game with web developers and intentionally ignores `autocomplete="off"` "for users' security".
* Set it to the `url` autocompletion type, Firefox and maybe other browsers give actually somewhat relevant completion entries. They will not be always relevant, but they may be when a migration has to be re-done with different settings.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7377
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-03-30 11:31:42 +00:00
Gusted
bb4e1f426f feat: include a default robots.txt to reduce the impact of crawlers (#7387)
- Add a strong strict default robots.txt, if one is not provided by the instance administrators.
- Remove code for the legacy public asset path, the error has been logged for a few releases already (existed since v1.21).
- Resolves forgejo/forgejo#923

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7387
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-30 11:28:19 +00:00
Gusted
51caba694a fix(ui): prepend AppSubURL to visibility hint URLs (#7379)
- If configured, add `AppSubUrl` to the visibility hint URLs shown to the user on the profile activity page.
- Resolves https://codeberg.org/forgejo/forgejo/issues/7327
- Integration testing adjusted.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7379
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-30 05:04:36 +00:00
Renovate Bot
d59495a4db Update vitest monorepo to v3.0.9 (forgejo) (#7382)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-03-30 00:32:48 +00:00
Renovate Bot
32005ad2ab Update linters (forgejo) (#7384)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-03-29 23:08:52 +00:00
Renovate Bot
50798d0a63 Update dependency yamllint to v1.37.0 (forgejo) (#7383)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-03-29 23:02:53 +00:00
Renovate Bot
aecf60f233 Update dependency @vitest/eslint-plugin to v1.1.38 (forgejo) (#7381)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-03-29 22:50:26 +00:00
YuviPanda
c9853e9e3a fix: ignore trailing slash for autogenerated name (#7307)
- During the migration process, if a valid GitHub clone URL was pasted, https://github.com/yuvipanda/notebooksharing.space/, the form automatically generates an invalid Forgejo repository name that included the trailing slash.
- Change the regex used to generate the name to ignore the trailing slash.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7307
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: YuviPanda <yuvipanda@gmail.com>
Co-committed-by: YuviPanda <yuvipanda@gmail.com>
2025-03-29 19:35:01 +00:00
Mat
8df8381f51 feat(ui/migrations): add placeholder to clarify empty description behavior (#7373)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7373
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Mat <m.falkowski@dotmat.de>
Co-committed-by: Mat <m.falkowski@dotmat.de>
2025-03-29 10:21:07 +00:00
0ko
bf8bdf12df chore(tests): refactor migration form test (#7374)
Ref https://codeberg.org/forgejo/forgejo/pulls/7373.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7374
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2025-03-29 09:06:03 +00:00
0ko
49ea851da9 chore(tests): fix testing failure caused by dep update (#7376)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7376
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-03-29 08:17:44 +00:00
Renovate Bot
fed2d81c44 Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-03-28 22:22:21 +00:00
0ko
51ff4970ec ui: improve error pages (#7274)
* add testing
* make each page accessible via `/devtest/error`
* allow translating the `Page not found` part of the title
* code: improve consistency, remove unused
* devtest: put index page in a container to fix alignment
* 500: make navbar more like the real one, remove fake menu button
* deadcode: remove unused `func NotFound`: it was added in bdd32f152d and the only usage was removed in 1bfb0a24d8

Preview:
https://codeberg.org/attachments/1b75afb3-e898-410f-be02-f036a5400143

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7274
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
2025-03-28 19:50:43 +00:00
Renovate Bot
683eb5bf78 Update https://data.forgejo.org/tj-actions/changed-files action to v46 (forgejo) (#7366)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7366
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-03-28 14:25:27 +00:00
Renovate Bot
cdf254816b Update module golang.org/x/net to v0.38.0 (forgejo) (#7362)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7362
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-03-28 14:12:05 +00:00
Renovate Bot
adce8fa7dd Update dependency eslint-plugin-unicorn to v58 (forgejo) (#7372)
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
2025-03-28 13:23:33 +00:00
Gusted
5380f23dab chore: use correct import (#7371)
- follow up for forgejo/forgejo#7355. It was merged before being rebased
on the forgejo branch

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7371
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-28 12:06:07 +00:00
ThomasBoom89
6cac7702e9 fix(api): encode empty requested reviewers as an empty array (#7355)
- Always initialize `RequestedReviewers` and `RequestedReviewersTeams`, this avoids the JSON encoder from encoding it to the zero value `null` and instead return a empty array.
- Resolves #4108
- Integration test added.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7355
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: ThomasBoom89 <thomasboom89@noreply.codeberg.org>
Co-committed-by: ThomasBoom89 <thomasboom89@noreply.codeberg.org>
2025-03-28 11:50:05 +00:00
Simon Ochsenreither
85ae9d710c fix(ui): improve vertical alignment of icons with text in the overflow menu (#7356)
- Follow up for #7314. Turns out this impacted the positioning of icons in tabs negatively, like the "Conversation"/"Commits"/"Files changed".
- Limit the change to the `overflow-menu` element.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7356
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Simon Ochsenreither <simon@ochsenreither.de>
Co-committed-by: Simon Ochsenreither <simon@ochsenreither.de>
2025-03-28 11:47:58 +00:00
Simon Ochsenreither
da8aa01466 fix(ui): improve vertical alignment of icons with text in the overflow menu (#7314)
- Add `vertical-align: baseline` to the svg class.
- Improves the vertical alignment of the icons that contain text in the overflow menu, and possibly in other places.
Co-authored-by: Simon Ochsenreither <simon@ochsenreither.de>
Co-committed-by: Simon Ochsenreither <simon@ochsenreither.de>
2025-03-27 21:07:59 +00:00
0ko
7990bcf333 feat(ui): improve button gap consistency, make it variable, larger on touchscreens (#7271)
* home buttons: use `button-sequence` for consistency of gaps with other ui
* folder-actions: use `button-sequence` for better overflowing and so gap actually works instead of relying on whitespace, because currently it doesn't due to lack of flex
* introduce variable `--button-spacing` for `button-row` and `button-sequence`
    * it's `0.33rem` on desktop for more pleasant hovering over button rows
    * it's `0.5rem` on touchscreens for worrying less about misstapping

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7271
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: 0ko <0ko@noreply.codeberg.org>
Co-committed-by: 0ko <0ko@noreply.codeberg.org>
2025-03-27 21:01:29 +00:00
Gusted
2457f5ff22 chore: branding import path (#7337)
- Massive replacement of changing `code.gitea.io/gitea` to `forgejo.org`.
- Resolves forgejo/discussions#258

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7337
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-27 19:40:14 +00:00
Codeberg Translate
372a3dad83 i18n: update of translations from Codeberg Translate (#7275)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7275
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-committed-by: Codeberg Translate <translate@codeberg.org>
2025-03-27 07:35:27 +00:00
Ellen Emilia Anna Zscheile
d0a5531ebc feat(build): lint-locale-usage should detect more Tr functions (#7278)
Followup to https://codeberg.org/forgejo/forgejo/pulls/7109

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7278
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-03-26 14:06:44 +00:00
Gusted
e84d3a0f53 fix(ui): Do not check for vertical-align (#7344)
- This makes the `repo-settings` e2e testing happy.
- There's no point into checking `vertical-align`; it has no effect when `position: absolute` is set, which is is currently set unconditionally for checkboxes and radios on forms.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7344
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-26 13:08:03 +00:00
Renovate Bot
6d7b4c8000 Update dependency mermaid to v11.6.0 (forgejo) (#7339)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7339
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-03-26 12:47:35 +00:00
2373 changed files with 23133 additions and 17544 deletions

View file

@ -1,7 +1,7 @@
code.gitea.io/gitea/cmd forgejo.org/cmd
NoMainListener NoMainListener
code.gitea.io/gitea/cmd/forgejo forgejo.org/cmd/forgejo
ContextSetNoInit ContextSetNoInit
ContextSetNoExit ContextSetNoExit
ContextSetStderr ContextSetStderr
@ -9,48 +9,48 @@ code.gitea.io/gitea/cmd/forgejo
ContextSetStdout ContextSetStdout
ContextSetStdin ContextSetStdin
code.gitea.io/gitea/models forgejo.org/models
IsErrSHANotFound IsErrSHANotFound
IsErrMergeDivergingFastForwardOnly IsErrMergeDivergingFastForwardOnly
code.gitea.io/gitea/models/auth forgejo.org/models/auth
WebAuthnCredentials WebAuthnCredentials
code.gitea.io/gitea/models/db forgejo.org/models/db
TruncateBeans TruncateBeans
InTransaction InTransaction
DumpTables DumpTables
code.gitea.io/gitea/models/dbfs forgejo.org/models/dbfs
file.renameTo file.renameTo
Create Create
Rename Rename
code.gitea.io/gitea/models/forgefed forgejo.org/models/forgefed
GetFederationHost GetFederationHost
code.gitea.io/gitea/models/forgejo/semver forgejo.org/models/forgejo/semver
GetVersion GetVersion
SetVersionString SetVersionString
SetVersion SetVersion
code.gitea.io/gitea/models/git forgejo.org/models/git
RemoveDeletedBranchByID RemoveDeletedBranchByID
code.gitea.io/gitea/models/issues forgejo.org/models/issues
IsErrUnknownDependencyType IsErrUnknownDependencyType
IsErrIssueWasClosed IsErrIssueWasClosed
code.gitea.io/gitea/models/organization forgejo.org/models/organization
SearchMembersOptions.ToConds SearchMembersOptions.ToConds
code.gitea.io/gitea/models/perm/access forgejo.org/models/perm/access
GetRepoWriters GetRepoWriters
code.gitea.io/gitea/models/repo forgejo.org/models/repo
WatchRepoMode WatchRepoMode
code.gitea.io/gitea/models/user forgejo.org/models/user
IsErrExternalLoginUserAlreadyExist IsErrExternalLoginUserAlreadyExist
IsErrExternalLoginUserNotExist IsErrExternalLoginUserNotExist
NewFederatedUser NewFederatedUser
@ -58,35 +58,35 @@ code.gitea.io/gitea/models/user
GetUserAllSettings GetUserAllSettings
DeleteUserSetting DeleteUserSetting
code.gitea.io/gitea/modules/activitypub forgejo.org/modules/activitypub
NewContext NewContext
Context.APClientFactory Context.APClientFactory
code.gitea.io/gitea/modules/assetfs forgejo.org/modules/assetfs
Bindata Bindata
code.gitea.io/gitea/modules/auth/password/hash forgejo.org/modules/auth/password/hash
DummyHasher.HashWithSaltBytes DummyHasher.HashWithSaltBytes
NewDummyHasher NewDummyHasher
code.gitea.io/gitea/modules/auth/password/pwn forgejo.org/modules/auth/password/pwn
WithHTTP WithHTTP
code.gitea.io/gitea/modules/base forgejo.org/modules/base
SetupGiteaRoot SetupGiteaRoot
code.gitea.io/gitea/modules/cache forgejo.org/modules/cache
GetInt GetInt
WithNoCacheContext WithNoCacheContext
RemoveContextData RemoveContextData
code.gitea.io/gitea/modules/emoji forgejo.org/modules/emoji
ReplaceCodes ReplaceCodes
code.gitea.io/gitea/modules/eventsource forgejo.org/modules/eventsource
Event.String Event.String
code.gitea.io/gitea/modules/forgefed forgejo.org/modules/forgefed
NewForgeUndoLike NewForgeUndoLike
ForgeUndoLike.UnmarshalJSON ForgeUndoLike.UnmarshalJSON
ForgeUndoLike.Validate ForgeUndoLike.Validate
@ -96,7 +96,7 @@ code.gitea.io/gitea/modules/forgefed
ToRepository ToRepository
OnRepository OnRepository
code.gitea.io/gitea/modules/git forgejo.org/modules/git
AllowLFSFiltersArgs AllowLFSFiltersArgs
AddChanges AddChanges
AddChangesWithArgs AddChangesWithArgs
@ -106,55 +106,55 @@ code.gitea.io/gitea/modules/git
openRepositoryWithDefaultContext openRepositoryWithDefaultContext
ToEntryMode ToEntryMode
code.gitea.io/gitea/modules/gitrepo forgejo.org/modules/gitrepo
GetBranchCommitID GetBranchCommitID
GetWikiDefaultBranch GetWikiDefaultBranch
code.gitea.io/gitea/modules/graceful forgejo.org/modules/graceful
Manager.TerminateContext Manager.TerminateContext
Manager.Err Manager.Err
Manager.Value Manager.Value
Manager.Deadline Manager.Deadline
code.gitea.io/gitea/modules/hcaptcha forgejo.org/modules/hcaptcha
WithHTTP WithHTTP
code.gitea.io/gitea/modules/hostmatcher forgejo.org/modules/hostmatcher
HostMatchList.AppendPattern HostMatchList.AppendPattern
code.gitea.io/gitea/modules/json forgejo.org/modules/json
StdJSON.Marshal StdJSON.Marshal
StdJSON.Unmarshal StdJSON.Unmarshal
StdJSON.NewEncoder StdJSON.NewEncoder
StdJSON.NewDecoder StdJSON.NewDecoder
StdJSON.Indent StdJSON.Indent
code.gitea.io/gitea/modules/log forgejo.org/modules/log
NewEventWriterBuffer NewEventWriterBuffer
code.gitea.io/gitea/modules/markup forgejo.org/modules/markup
GetRendererByType GetRendererByType
RenderString RenderString
IsMarkupFile IsMarkupFile
code.gitea.io/gitea/modules/markup/console forgejo.org/modules/markup/console
Render Render
RenderString RenderString
code.gitea.io/gitea/modules/markup/markdown forgejo.org/modules/markup/markdown
RenderRawString RenderRawString
code.gitea.io/gitea/modules/markup/mdstripper forgejo.org/modules/markup/mdstripper
stripRenderer.AddOptions stripRenderer.AddOptions
StripMarkdown StripMarkdown
code.gitea.io/gitea/modules/markup/orgmode forgejo.org/modules/markup/orgmode
RenderString RenderString
code.gitea.io/gitea/modules/process forgejo.org/modules/process
Manager.ExecTimeout Manager.ExecTimeout
code.gitea.io/gitea/modules/queue forgejo.org/modules/queue
newBaseChannelSimple newBaseChannelSimple
newBaseChannelUnique newBaseChannelUnique
newBaseRedisSimple newBaseRedisSimple
@ -163,26 +163,26 @@ code.gitea.io/gitea/modules/queue
testStateRecorder.Reset testStateRecorder.Reset
newWorkerPoolQueueForTest newWorkerPoolQueueForTest
code.gitea.io/gitea/modules/queue/lqinternal forgejo.org/modules/queue/lqinternal
QueueItemIDBytes QueueItemIDBytes
QueueItemKeyBytes QueueItemKeyBytes
ListLevelQueueKeys ListLevelQueueKeys
code.gitea.io/gitea/modules/setting forgejo.org/modules/setting
NewConfigProviderFromData NewConfigProviderFromData
GitConfigType.GetOption GitConfigType.GetOption
InitLoggersForTest InitLoggersForTest
code.gitea.io/gitea/modules/sync forgejo.org/modules/sync
StatusTable.Start StatusTable.Start
StatusTable.IsRunning StatusTable.IsRunning
code.gitea.io/gitea/modules/timeutil forgejo.org/modules/timeutil
GetExecutableModTime GetExecutableModTime
MockSet MockSet
MockUnset MockUnset
code.gitea.io/gitea/modules/translation forgejo.org/modules/translation
MockLocale.Language MockLocale.Language
MockLocale.TrString MockLocale.TrString
MockLocale.Tr MockLocale.Tr
@ -192,42 +192,42 @@ code.gitea.io/gitea/modules/translation
MockLocale.HasKey MockLocale.HasKey
MockLocale.PrettyNumber MockLocale.PrettyNumber
code.gitea.io/gitea/modules/util forgejo.org/modules/translation/localeiter
IterateMessagesContent
forgejo.org/modules/util
OptionalArg OptionalArg
code.gitea.io/gitea/modules/util/filebuffer forgejo.org/modules/util/filebuffer
CreateFromReader CreateFromReader
code.gitea.io/gitea/modules/validation forgejo.org/modules/validation
IsErrNotValid IsErrNotValid
code.gitea.io/gitea/modules/web forgejo.org/modules/web
RouteMock RouteMock
RouteMockReset RouteMockReset
code.gitea.io/gitea/modules/zstd forgejo.org/modules/zstd
NewWriter NewWriter
Writer.Write Writer.Write
Writer.Close Writer.Close
code.gitea.io/gitea/routers/web forgejo.org/routers/web/org
NotFound
code.gitea.io/gitea/routers/web/org
MustEnableProjects MustEnableProjects
code.gitea.io/gitea/services/context forgejo.org/services/context
GetPrivateContext GetPrivateContext
code.gitea.io/gitea/services/repository forgejo.org/services/repository
IsErrForkAlreadyExist IsErrForkAlreadyExist
code.gitea.io/gitea/services/repository/files forgejo.org/services/repository/files
ContentType.String ContentType.String
code.gitea.io/gitea/services/repository/gitgraph forgejo.org/services/repository/gitgraph
Parser.Reset Parser.Reset
code.gitea.io/gitea/services/webhook forgejo.org/services/webhook
NewNotifier NewNotifier

View file

@ -4,12 +4,12 @@
"features": { "features": {
// installs nodejs into container // installs nodejs into container
"ghcr.io/devcontainers/features/node:1": { "ghcr.io/devcontainers/features/node:1": {
"version": "20" "version": "22"
}, },
"ghcr.io/devcontainers/features/git-lfs:1.2.3": {}, "ghcr.io/devcontainers/features/git-lfs:1.2.3": {},
"ghcr.io/devcontainers-contrib/features/poetry:2": {}, "ghcr.io/devcontainers-contrib/features/poetry:2": {},
"ghcr.io/devcontainers/features/python:1": { "ghcr.io/devcontainers/features/python:1": {
"version": "3.12" "version": "3.13"
}, },
"ghcr.io/warrenbuckley/codespace-features/sqlite:1": {} "ghcr.io/warrenbuckley/codespace-features/sqlite:1": {}
}, },

View file

@ -12,6 +12,9 @@ insert_final_newline = true
[{*.{go,tmpl,html},Makefile,go.mod}] [{*.{go,tmpl,html},Makefile,go.mod}]
indent_style = tab indent_style = tab
[go.*]
indent_style = tab
[templates/custom/*.tmpl] [templates/custom/*.tmpl]
insert_final_newline = false insert_final_newline = false

View file

@ -1,3 +1,3 @@
module code.gitea.io/gitea module forgejo.org
go 1.23.3 go 1.23.3

View file

@ -47,7 +47,7 @@ jobs:
cat <<'EOF' cat <<'EOF'
${{ toJSON(github) }} ${{ toJSON(github) }}
EOF EOF
- uses: https://data.forgejo.org/actions/git-backporting@v4.8.4 - uses: https://data.forgejo.org/actions/git-backporting@v4.8.5
with: with:
target-branch-pattern: "^backport/(?<target>(v.*))$" target-branch-pattern: "^backport/(?<target>(v.*))$"
strategy: ort strategy: ort

View file

@ -28,7 +28,7 @@ jobs:
runs-on: docker runs-on: docker
container: container:
image: data.forgejo.org/renovate/renovate:39.212.0 image: data.forgejo.org/renovate/renovate:39.252.0
steps: steps:
- name: Load renovate repo cache - name: Load renovate repo cache

View file

@ -116,7 +116,7 @@ jobs:
- uses: ./.forgejo/workflows-composite/build-backend - uses: ./.forgejo/workflows-composite/build-backend
- name: Get changed files - name: Get changed files
id: changed-files id: changed-files
uses: https://data.forgejo.org/tj-actions/changed-files@v45 uses: https://data.forgejo.org/tj-actions/changed-files@v46
with: with:
separator: '\n' separator: '\n'
- run: | - run: |

1
.gitignore vendored
View file

@ -57,6 +57,7 @@ cpu.out
/gitea-vet /gitea-vet
/debug /debug
/integrations.test /integrations.test
/forgejo
/bin /bin
/dist /dist

View file

@ -1,7 +1,9 @@
version: "2"
output:
sort-order:
- file
linters: linters:
enable-all: false default: none
disable-all: true
fast: false
enable: enable:
- bidichk - bidichk
- depguard - depguard
@ -9,142 +11,155 @@ linters:
- errcheck - errcheck
- forbidigo - forbidigo
- gocritic - gocritic
- gofmt
- gofumpt
- gosimple
- govet - govet
- ineffassign - ineffassign
- nakedret - nakedret
- nolintlint - nolintlint
- revive - revive
- staticcheck - staticcheck
- stylecheck
- testifylint - testifylint
- typecheck
- unconvert - unconvert
- unused
- unparam - unparam
- unused
- usetesting - usetesting
- wastedassign - wastedassign
settings:
run: depguard:
timeout: 10m rules:
main:
output: deny:
sort-results: true - pkg: encoding/json
sort-order: [file] desc: use gitea's modules/json instead of encoding/json
show-stats: true - pkg: github.com/unknwon/com
desc: use gitea's util and replacements
linters-settings: - pkg: io/ioutil
stylecheck: desc: use os or io instead
checks: ["all", "-ST1005", "-ST1003"] - pkg: golang.org/x/exp
nakedret: desc: it's experimental and unreliable
max-func-lines: 0 - pkg: forgejo.org/modules/git/internal
gocritic: desc: do not use the internal package, use AddXxx function instead
disabled-checks: - pkg: gopkg.in/ini.v1
- ifElseChain desc: do not use the ini package, use gitea's config system instead
revive: - pkg: github.com/minio/sha256-simd
severity: error desc: use crypto/sha256 instead, see https://codeberg.org/forgejo/forgejo/pulls/1528
gocritic:
disabled-checks:
- ifElseChain
revive:
severity: error
rules:
- name: atomic
- name: bare-return
- name: blank-imports
- name: constant-logical-expr
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: duplicated-imports
- name: empty-lines
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: identical-branches
- name: if-return
- name: increment-decrement
- name: indent-error-flow
- name: modifies-value-receiver
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: string-of-int
- name: superfluous-else
- name: time-naming
- name: unconditional-recursion
- name: unexported-return
- name: unreachable-code
- name: var-declaration
- name: var-naming
- name: redefines-builtin-id
disabled: true
staticcheck:
checks:
- all
testifylint:
disable:
- go-require
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules: rules:
- name: atomic - linters:
- name: bare-return - nolintlint
- name: blank-imports path: models/db/sql_postgres_with_schema.go
- name: constant-logical-expr - linters:
- name: context-as-argument - dupl
- name: context-keys-type - errcheck
- name: dot-imports - gocyclo
- name: duplicated-imports - gosec
- name: empty-lines - staticcheck
- name: error-naming - unparam
- name: error-return path: _test\.go
- name: error-strings - linters:
- name: errorf - dupl
- name: exported - errcheck
- name: identical-branches - gocyclo
- name: if-return - gosec
- name: increment-decrement path: models/migrations/v
- name: indent-error-flow - linters:
- name: modifies-value-receiver - forbidigo
- name: package-comments path: cmd
- name: range - linters:
- name: receiver-naming - dupl
- name: redefines-builtin-id text: (?i)webhook
- name: string-of-int - linters:
- name: superfluous-else - gocritic
- name: time-naming text: (?i)`ID' should not be capitalized
- name: unconditional-recursion - linters:
- name: unexported-return - deadcode
- name: unreachable-code - unused
- name: var-declaration text: (?i)swagger
- name: var-naming - linters:
- name: redefines-builtin-id - staticcheck
disabled: true text: (?i)argument x is overwritten before first use
gofumpt: - linters:
extra-rules: true - gocritic
depguard: text: '(?i)commentFormatting: put a space between `//` and comment text'
rules: - linters:
main: - gocritic
deny: text: '(?i)exitAfterDefer:'
- pkg: encoding/json - linters:
desc: use gitea's modules/json instead of encoding/json - staticcheck
- pkg: github.com/unknwon/com text: "(ST1005|ST1003|QF1001):"
desc: use gitea's util and replacements paths:
- pkg: io/ioutil - node_modules
desc: use os or io instead - public
- pkg: golang.org/x/exp - web_src
desc: it's experimental and unreliable - third_party$
- pkg: code.gitea.io/gitea/modules/git/internal - builtin$
desc: do not use the internal package, use AddXxx function instead - examples$
- pkg: gopkg.in/ini.v1
desc: do not use the ini package, use gitea's config system instead
- pkg: github.com/minio/sha256-simd
desc: use crypto/sha256 instead, see https://codeberg.org/forgejo/forgejo/pulls/1528
testifylint:
disable:
- go-require
issues: issues:
max-issues-per-linter: 0 max-issues-per-linter: 0
max-same-issues: 0 max-same-issues: 0
exclude-dirs: [node_modules, public, web_src] formatters:
exclude-case-sensitive: true enable:
exclude-rules: - gofmt
- path: models/db/sql_postgres_with_schema.go - gofumpt
linters: settings:
- nolintlint gofumpt:
- path: _test\.go extra-rules: true
linters: exclusions:
- gocyclo generated: lax
- errcheck paths:
- dupl - node_modules
- gosec - public
- unparam - web_src
- staticcheck - third_party$
- path: models/migrations/v - builtin$
linters: - examples$
- gocyclo
- errcheck
- dupl
- gosec
- path: cmd
linters:
- forbidigo
- text: "webhook"
linters:
- dupl
- text: "`ID' should not be capitalized"
linters:
- gocritic
- text: "swagger"
linters:
- unused
- deadcode
- text: "argument x is overwritten before first use"
linters:
- staticcheck
- text: "commentFormatting: put a space between `//` and comment text"
linters:
- gocritic
- text: "exitAfterDefer:"
linters:
- gocritic

View file

@ -30,8 +30,8 @@ RUN cp /*-alpine-linux-musl*/lib/ld-musl-*.so.1 /lib || true
RUN apk --no-cache add build-base git nodejs npm RUN apk --no-cache add build-base git nodejs npm
COPY . ${GOPATH}/src/code.gitea.io/gitea COPY . ${GOPATH}/src/forgejo.org
WORKDIR ${GOPATH}/src/code.gitea.io/gitea WORKDIR ${GOPATH}/src/forgejo.org
RUN make clean RUN make clean
RUN make frontend RUN make frontend
@ -47,9 +47,9 @@ RUN chmod 755 /tmp/local/usr/bin/entrypoint \
/tmp/local/etc/s6/gitea/* \ /tmp/local/etc/s6/gitea/* \
/tmp/local/etc/s6/openssh/* \ /tmp/local/etc/s6/openssh/* \
/tmp/local/etc/s6/.s6-svscan/* \ /tmp/local/etc/s6/.s6-svscan/* \
/go/src/code.gitea.io/gitea/gitea \ /go/src/forgejo.org/gitea \
/go/src/code.gitea.io/gitea/environment-to-ini /go/src/forgejo.org/environment-to-ini
RUN chmod 644 /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete RUN chmod 644 /go/src/forgejo.org/contrib/autocompletion/bash_autocomplete
FROM data.forgejo.org/oci/alpine:3.21 FROM data.forgejo.org/oci/alpine:3.21
ARG RELEASE_VERSION ARG RELEASE_VERSION
@ -102,7 +102,7 @@ CMD ["/usr/bin/s6-svscan", "/etc/s6"]
COPY --from=build-env /tmp/local / COPY --from=build-env /tmp/local /
RUN cd /usr/local/bin ; ln -s gitea forgejo RUN cd /usr/local/bin ; ln -s gitea forgejo
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea COPY --from=build-env /go/src/forgejo.org/gitea /app/gitea/gitea
RUN ln -s /app/gitea/gitea /app/gitea/forgejo-cli RUN ln -s /app/gitea/gitea /app/gitea/forgejo-cli
COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini COPY --from=build-env /go/src/forgejo.org/environment-to-ini /usr/local/bin/environment-to-ini
COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh COPY --from=build-env /go/src/forgejo.org/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh

View file

@ -30,8 +30,8 @@ RUN cp /*-alpine-linux-musl*/lib/ld-musl-*.so.1 /lib || true
RUN apk --no-cache add build-base git nodejs npm RUN apk --no-cache add build-base git nodejs npm
COPY . ${GOPATH}/src/code.gitea.io/gitea COPY . ${GOPATH}/src/forgejo.org
WORKDIR ${GOPATH}/src/code.gitea.io/gitea WORKDIR ${GOPATH}/src/forgejo.org
RUN make clean RUN make clean
RUN make frontend RUN make frontend
@ -45,9 +45,9 @@ COPY docker/rootless /tmp/local
RUN chmod 755 /tmp/local/usr/local/bin/docker-entrypoint.sh \ RUN chmod 755 /tmp/local/usr/local/bin/docker-entrypoint.sh \
/tmp/local/usr/local/bin/docker-setup.sh \ /tmp/local/usr/local/bin/docker-setup.sh \
/tmp/local/usr/local/bin/gitea \ /tmp/local/usr/local/bin/gitea \
/go/src/code.gitea.io/gitea/gitea \ /go/src/forgejo.org/gitea \
/go/src/code.gitea.io/gitea/environment-to-ini /go/src/forgejo.org/environment-to-ini
RUN chmod 644 /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete RUN chmod 644 /go/src/forgejo.org/contrib/autocompletion/bash_autocomplete
FROM data.forgejo.org/oci/alpine:3.21 FROM data.forgejo.org/oci/alpine:3.21
ARG RELEASE_VERSION ARG RELEASE_VERSION
@ -91,10 +91,10 @@ RUN chown git:git /var/lib/gitea /etc/gitea
COPY --from=build-env /tmp/local / COPY --from=build-env /tmp/local /
RUN cd /usr/local/bin ; ln -s gitea forgejo RUN cd /usr/local/bin ; ln -s gitea forgejo
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea COPY --from=build-env --chown=root:root /go/src/forgejo.org/gitea /app/gitea/gitea
RUN ln -s /app/gitea/gitea /app/gitea/forgejo-cli RUN ln -s /app/gitea/gitea /app/gitea/forgejo-cli
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini COPY --from=build-env --chown=root:root /go/src/forgejo.org/environment-to-ini /usr/local/bin/environment-to-ini
COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh COPY --from=build-env /go/src/forgejo.org/contrib/autocompletion/bash_autocomplete /etc/profile.d/gitea_bash_autocomplete.sh
#git:git #git:git
USER 1000:1000 USER 1000:1000

View file

@ -16,7 +16,7 @@ else
DIST := dist DIST := dist
DIST_DIRS := $(DIST)/binaries $(DIST)/release DIST_DIRS := $(DIST)/binaries $(DIST)/release
IMPORT := code.gitea.io/gitea IMPORT := forgejo.org
GO ?= $(shell go env GOROOT)/bin/go GO ?= $(shell go env GOROOT)/bin/go
SHASUM ?= shasum -a 256 SHASUM ?= shasum -a 256
@ -39,17 +39,17 @@ XGO_VERSION := go-1.21.x
AIR_PACKAGE ?= github.com/air-verse/air@v1 # renovate: datasource=go AIR_PACKAGE ?= github.com/air-verse/air@v1 # renovate: datasource=go
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3.2.1 # renovate: datasource=go EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3.2.1 # renovate: datasource=go
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.7.0 # renovate: datasource=go GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.7.0 # renovate: datasource=go
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.7 # renovate: datasource=go GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.2 # renovate: datasource=go
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.11 # renovate: datasource=go GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.11 # renovate: datasource=go
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.6.0 # renovate: datasource=go MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.6.0 # renovate: datasource=go
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0 # renovate: datasource=go SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0 # renovate: datasource=go
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.6.0 # renovate: datasource=go GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.6.0 # renovate: datasource=go
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1 # renovate: datasource=go GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1 # renovate: datasource=go
DEADCODE_PACKAGE ?= golang.org/x/tools/cmd/deadcode@v0.31.0 # renovate: datasource=go DEADCODE_PACKAGE ?= golang.org/x/tools/cmd/deadcode@v0.32.0 # renovate: datasource=go
GOMOCK_PACKAGE ?= go.uber.org/mock/mockgen@v0.4.0 # renovate: datasource=go GOMOCK_PACKAGE ?= go.uber.org/mock/mockgen@v0.5.1 # renovate: datasource=go
GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.18.1 # renovate: datasource=go GOPLS_PACKAGE ?= golang.org/x/tools/gopls@v0.18.1 # renovate: datasource=go
RENOVATE_NPM_PACKAGE ?= renovate@39.212.0 # renovate: datasource=docker packageName=data.forgejo.org/renovate/renovate RENOVATE_NPM_PACKAGE ?= renovate@39.252.0 # renovate: datasource=docker packageName=data.forgejo.org/renovate/renovate
# https://github.com/disposable-email-domains/disposable-email-domains/commits/main/ # https://github.com/disposable-email-domains/disposable-email-domains/commits/main/
DISPOSABLE_EMAILS_SHA ?= 0c27e671231d27cf66370034d7f6818037416989 # renovate: ... DISPOSABLE_EMAILS_SHA ?= 0c27e671231d27cf66370034d7f6818037416989 # renovate: ...
@ -125,10 +125,10 @@ LDFLAGS := $(LDFLAGS) -X "main.ReleaseVersion=$(RELEASE_VERSION)" -X "main.MakeV
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64 LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
ifeq ($(HAS_GO), yes) ifeq ($(HAS_GO), yes)
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) $(shell $(GO) list code.gitea.io/gitea/models/forgejo_migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./...)) GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list forgejo.org/models/migrations/...) $(shell $(GO) list forgejo.org/models/forgejo_migrations/...) forgejo.org/tests/integration/migration-test forgejo.org/tests forgejo.org/tests/integration forgejo.org/tests/e2e,$(shell $(GO) list ./...))
endif endif
REMOTE_CACHER_MODULES ?= cache nosql session queue REMOTE_CACHER_MODULES ?= cache nosql session queue
GO_TEST_REMOTE_CACHER_PACKAGES ?= $(addprefix code.gitea.io/gitea/modules/,$(REMOTE_CACHER_MODULES)) GO_TEST_REMOTE_CACHER_PACKAGES ?= $(addprefix forgejo.org/modules/,$(REMOTE_CACHER_MODULES))
FOMANTIC_WORK_DIR := web_src/fomantic FOMANTIC_WORK_DIR := web_src/fomantic
@ -169,7 +169,7 @@ GO_SOURCES += $(GENERATED_GO_DEST)
GO_SOURCES_NO_BINDATA := $(GO_SOURCES) GO_SOURCES_NO_BINDATA := $(GO_SOURCES)
ifeq ($(HAS_GO), yes) ifeq ($(HAS_GO), yes)
MIGRATION_PACKAGES := $(shell $(GO) list code.gitea.io/gitea/models/migrations/... code.gitea.io/gitea/models/forgejo_migrations/...) MIGRATION_PACKAGES := $(shell $(GO) list forgejo.org/models/migrations/... forgejo.org/models/forgejo_migrations/...)
endif endif
ifeq ($(filter $(TAGS_SPLIT),bindata),bindata) ifeq ($(filter $(TAGS_SPLIT),bindata),bindata)
@ -462,7 +462,7 @@ lint-locale:
.PHONY: lint-locale-usage .PHONY: lint-locale-usage
lint-locale-usage: lint-locale-usage:
$(GO) run build/lint-locale-usage/lint-locale-usage.go --allow-missing-msgids $(GO) run build/lint-locale-usage/lint-locale-usage.go
.PHONY: lint-md .PHONY: lint-md
lint-md: node_modules lint-md: node_modules
@ -476,7 +476,7 @@ lint-spell: lint-codespell
lint-spell-fix: lint-codespell-fix lint-spell-fix: lint-codespell-fix
@go run $(MISSPELL_PACKAGE) -w $(SPELLCHECK_FILES) @go run $(MISSPELL_PACKAGE) -w $(SPELLCHECK_FILES)
RUN_DEADCODE = $(GO) run $(DEADCODE_PACKAGE) -generated=false -f='{{println .Path}}{{range .Funcs}}{{printf "\t%s\n" .Name}}{{end}}{{println}}' -test code.gitea.io/gitea RUN_DEADCODE = $(GO) run $(DEADCODE_PACKAGE) -generated=false -f='{{println .Path}}{{range .Funcs}}{{printf "\t%s\n" .Name}}{{end}}{{println}}' -test forgejo.org
.PHONY: lint-go .PHONY: lint-go
lint-go: lint-go:
@ -523,7 +523,7 @@ lint-yaml: .venv
.PHONY: security-check .PHONY: security-check
security-check: security-check:
go run $(GOVULNCHECK_PACKAGE) ./... go run $(GOVULNCHECK_PACKAGE) -show color ./...
### ###
# Development and testing targets # Development and testing targets
@ -610,7 +610,7 @@ tidy-check: tidy
go-licenses: $(GO_LICENSE_FILE) go-licenses: $(GO_LICENSE_FILE)
$(GO_LICENSE_FILE): go.mod go.sum $(GO_LICENSE_FILE): go.mod go.sum
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --ignore code.gitea.io/gitea --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null -$(GO) run $(GO_LICENSES_PACKAGE) save . --force --ignore forgejo.org --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE) $(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
@rm -rf $(GO_LICENSE_TMP_DIR) @rm -rf $(GO_LICENSE_TMP_DIR)
@ -740,33 +740,33 @@ integration-test-coverage-sqlite: integrations.cover.sqlite.test generate-ini-sq
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./integrations.cover.sqlite.test -test.coverprofile=integration.coverage.out
integrations.mysql.test: git-check $(GO_SOURCES) integrations.mysql.test: git-check $(GO_SOURCES)
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.mysql.test $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/integration -o integrations.mysql.test
integrations.pgsql.test: git-check $(GO_SOURCES) integrations.pgsql.test: git-check $(GO_SOURCES)
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.pgsql.test $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/integration -o integrations.pgsql.test
integrations.sqlite.test: git-check $(GO_SOURCES) integrations.sqlite.test: git-check $(GO_SOURCES)
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -o integrations.sqlite.test -tags '$(TEST_TAGS)' $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/integration -o integrations.sqlite.test -tags '$(TEST_TAGS)'
integrations.cover.test: git-check $(GO_SOURCES) integrations.cover.test: git-check $(GO_SOURCES)
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.test $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.test
integrations.cover.sqlite.test: git-check $(GO_SOURCES) integrations.cover.sqlite.test: git-check $(GO_SOURCES)
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)' $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/integration -coverpkg $(shell echo $(GO_TEST_PACKAGES) | tr ' ' ',') -o integrations.cover.sqlite.test -tags '$(TEST_TAGS)'
.PHONY: migrations.mysql.test .PHONY: migrations.mysql.test
migrations.mysql.test: $(GO_SOURCES) generate-ini-mysql migrations.mysql.test: $(GO_SOURCES) generate-ini-mysql
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.mysql.test $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/integration/migration-test -o migrations.mysql.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.mysql.test $(GOTESTCOMPILEDRUNSUFFIX) GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.mysql.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: migrations.pgsql.test .PHONY: migrations.pgsql.test
migrations.pgsql.test: $(GO_SOURCES) generate-ini-pgsql migrations.pgsql.test: $(GO_SOURCES) generate-ini-pgsql
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.pgsql.test $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/integration/migration-test -o migrations.pgsql.test
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.pgsql.test $(GOTESTCOMPILEDRUNSUFFIX) GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.pgsql.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: migrations.sqlite.test .PHONY: migrations.sqlite.test
migrations.sqlite.test: $(GO_SOURCES) generate-ini-sqlite migrations.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)' $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/integration/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)'
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.sqlite.test $(GOTESTCOMPILEDRUNSUFFIX) GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTESTCOMPILEDRUNPREFIX) ./migrations.sqlite.test $(GOTESTCOMPILEDRUNSUFFIX)
.PHONY: migrations.individual.mysql.test .PHONY: migrations.individual.mysql.test
@ -777,7 +777,7 @@ migrations.individual.mysql.test: $(GO_SOURCES)
.PHONY: migrations.individual.sqlite.test\#% .PHONY: migrations.individual.sqlite.test\#%
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$* GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' forgejo.org/models/migrations/$*
.PHONY: migrations.individual.pgsql.test .PHONY: migrations.individual.pgsql.test
migrations.individual.pgsql.test: $(GO_SOURCES) migrations.individual.pgsql.test: $(GO_SOURCES)
@ -787,7 +787,7 @@ migrations.individual.pgsql.test: $(GO_SOURCES)
.PHONY: migrations.individual.pgsql.test\#% .PHONY: migrations.individual.pgsql.test\#%
migrations.individual.pgsql.test\#%: $(GO_SOURCES) generate-ini-pgsql migrations.individual.pgsql.test\#%: $(GO_SOURCES) generate-ini-pgsql
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$* GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' forgejo.org/models/migrations/$*
.PHONY: migrations.individual.sqlite.test .PHONY: migrations.individual.sqlite.test
migrations.individual.sqlite.test: $(GO_SOURCES) generate-ini-sqlite migrations.individual.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
@ -797,16 +797,16 @@ migrations.individual.sqlite.test: $(GO_SOURCES) generate-ini-sqlite
.PHONY: migrations.individual.sqlite.test\#% .PHONY: migrations.individual.sqlite.test\#%
migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite migrations.individual.sqlite.test\#%: $(GO_SOURCES) generate-ini-sqlite
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' code.gitea.io/gitea/models/migrations/$* GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini $(GOTEST) $(GOTESTFLAGS) -tags '$(TEST_TAGS)' forgejo.org/models/migrations/$*
e2e.mysql.test: $(GO_SOURCES) e2e.mysql.test: $(GO_SOURCES)
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/e2e -o e2e.mysql.test
e2e.pgsql.test: $(GO_SOURCES) e2e.pgsql.test: $(GO_SOURCES)
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/e2e -o e2e.pgsql.test
e2e.sqlite.test: $(GO_SOURCES) e2e.sqlite.test: $(GO_SOURCES)
$(GOTEST) $(GOTESTFLAGS) -c code.gitea.io/gitea/tests/e2e -o e2e.sqlite.test -tags '$(TEST_TAGS)' $(GOTEST) $(GOTESTFLAGS) -c forgejo.org/tests/e2e -o e2e.sqlite.test -tags '$(TEST_TAGS)'
.PHONY: check .PHONY: check
check: test check: test
@ -1013,12 +1013,11 @@ generate-gitignore:
.PHONY: generate-gomock .PHONY: generate-gomock
generate-gomock: generate-gomock:
$(GO) run $(GOMOCK_PACKAGE) -package mock -destination ./modules/queue/mock/redisuniversalclient.go code.gitea.io/gitea/modules/nosql RedisClient $(GO) run $(GOMOCK_PACKAGE) -package mock -destination ./modules/queue/mock/redisuniversalclient.go forgejo.org/modules/nosql RedisClient
.PHONY: generate-images .PHONY: generate-images
generate-images: | node_modules generate-images: | node_modules
npm install --no-save fabric@6 imagemin-zopfli@7 node tools/generate-images.js
node tools/generate-images.js $(TAGS)
.PHONY: generate-manpage .PHONY: generate-manpage
generate-manpage: generate-manpage:

File diff suppressed because one or more lines are too long

View file

@ -12,8 +12,8 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
) )
func main() { func main() {

View file

@ -15,7 +15,7 @@ import (
"strconv" "strconv"
"strings" "strings"
"code.gitea.io/gitea/build/codeformat" "forgejo.org/build/codeformat"
) )
// Windows has a limitation for command line arguments, the size can not exceed 32KB. // Windows has a limitation for command line arguments, the size can not exceed 32KB.

View file

@ -13,8 +13,8 @@ import (
) )
var importPackageGroupOrders = map[string]int{ var importPackageGroupOrders = map[string]int{
"": 1, // internal "": 1, // internal
"code.gitea.io/gitea/": 2, "forgejo.org/": 2,
} }
var errInvalidCommentBetweenImports = errors.New("comments between imported packages are invalid, please move comments to the end of the package line") var errInvalidCommentBetweenImports = errors.New("comments between imported packages are invalid, please move comments to the end of the package line")

View file

@ -58,8 +58,8 @@ import (
"code.gitea.io/other/package" "code.gitea.io/other/package"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"xorm.io/the/package" "xorm.io/the/package"
@ -82,8 +82,8 @@ import (
_ "image/jpeg" // for processing jpeg images _ "image/jpeg" // for processing jpeg images
_ "image/png" // for processing png images _ "image/png" // for processing png images
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"code.gitea.io/other/package" "code.gitea.io/other/package"
"github.com/issue9/identicon" "github.com/issue9/identicon"

View file

@ -20,7 +20,7 @@ import (
"strings" "strings"
"unicode/utf8" "unicode/utf8"
"code.gitea.io/gitea/modules/json" "forgejo.org/modules/json"
) )
const ( const (

View file

@ -15,7 +15,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
) )
func main() { func main() {

View file

@ -16,7 +16,7 @@ import (
"sort" "sort"
"strings" "strings"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
) )
// regexp is based on go-license, excluding README and NOTICE // regexp is based on go-license, excluding README and NOTICE
@ -102,9 +102,9 @@ func main() {
pkgName := path.Dir(pkgPath) pkgName := path.Dir(pkgPath)
// There might be a bug somewhere in go-licenses that sometimes interprets the // There might be a bug somewhere in go-licenses that sometimes interprets the
// root package as "." and sometimes as "code.gitea.io/gitea". Workaround by // root package as "." and sometimes as "forgejo.org". Workaround by
// removing both of them for the sake of stable output. // removing both of them for the sake of stable output.
if pkgName == "." || pkgName == "code.gitea.io/gitea" { if pkgName == "." || pkgName == "forgejo.org" {
continue continue
} }

View file

@ -15,7 +15,7 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
) )
func main() { func main() {

View file

@ -17,17 +17,15 @@ import (
"text/template" "text/template"
tmplParser "text/template/parse" tmplParser "text/template/parse"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"code.gitea.io/gitea/modules/locale" fjTemplates "forgejo.org/modules/templates"
fjTemplates "code.gitea.io/gitea/modules/templates" "forgejo.org/modules/translation/localeiter"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
) )
// this works by first gathering all valid source string IDs from `en-US` reference files // this works by first gathering all valid source string IDs from `en-US` reference files
// and then checking if all used source strings are actually defined // and then checking if all used source strings are actually defined
type OnMsgidHandler func(fset *token.FileSet, pos token.Pos, msgid string)
type LocatedError struct { type LocatedError struct {
Location string Location string
Kind string Kind string
@ -49,8 +47,24 @@ func (e LocatedError) Error() string {
return sb.String() return sb.String()
} }
func isLocaleTrFunction(funcname string) bool { func InitLocaleTrFunctions() map[string][]uint {
return funcname == "Tr" || funcname == "TrN" ret := make(map[string][]uint)
f0 := []uint{0}
ret["Tr"] = f0
ret["TrString"] = f0
ret["TrHTML"] = f0
ret["TrPluralString"] = []uint{1}
ret["TrN"] = []uint{1, 2}
return ret
}
type Handler struct {
OnMsgid func(fset *token.FileSet, pos token.Pos, msgid string)
OnUnexpectedInvoke func(fset *token.FileSet, pos token.Pos, funcname string, argc int)
LocaleTrFunctions map[string][]uint
} }
// the `Handle*File` functions follow the following calling convention: // the `Handle*File` functions follow the following calling convention:
@ -58,7 +72,7 @@ func isLocaleTrFunction(funcname string) bool {
// * `src` is either `nil` (then the function invokes `ReadFile` to read the file) // * `src` is either `nil` (then the function invokes `ReadFile` to read the file)
// or the contents of the file as {`[]byte`, or a `string`} // or the contents of the file as {`[]byte`, or a `string`}
func (omh OnMsgidHandler) HandleGoFile(fname string, src any) error { func (handler Handler) HandleGoFile(fname string, src any) error {
fset := token.NewFileSet() fset := token.NewFileSet()
node, err := goParser.ParseFile(fset, fname, src, goParser.SkipObjectResolution) node, err := goParser.ParseFile(fset, fname, src, goParser.SkipObjectResolution)
if err != nil { if err != nil {
@ -70,31 +84,47 @@ func (omh OnMsgidHandler) HandleGoFile(fname string, src any) error {
} }
ast.Inspect(node, func(n ast.Node) bool { ast.Inspect(node, func(n ast.Node) bool {
// search for function calls of the form `anything.Tr(any-string-lit)` // search for function calls of the form `anything.Tr(any-string-lit, ...)`
call, ok := n.(*ast.CallExpr) call, ok := n.(*ast.CallExpr)
if !ok || len(call.Args) != 1 { if !ok || len(call.Args) < 1 {
return true return true
} }
funSel, ok := call.Fun.(*ast.SelectorExpr) funSel, ok := call.Fun.(*ast.SelectorExpr)
if (!ok) || !isLocaleTrFunction(funSel.Sel.Name) { if !ok {
return true return true
} }
argLit, ok := call.Args[0].(*ast.BasicLit) ltf, ok := handler.LocaleTrFunctions[funSel.Sel.Name]
if (!ok) || argLit.Kind != token.STRING { if !ok {
return true return true
} }
// extract string content var gotUnexpectedInvoke *int
arg, err := strconv.Unquote(argLit.Value)
if err != nil { for _, argNum := range ltf {
return true if len(call.Args) >= int(argNum+1) {
argLit, ok := call.Args[int(argNum)].(*ast.BasicLit)
if !ok || argLit.Kind != token.STRING {
continue
}
// extract string content
arg, err := strconv.Unquote(argLit.Value)
if err == nil {
// found interesting strings
handler.OnMsgid(fset, argLit.ValuePos, arg)
}
} else {
argc := len(call.Args)
gotUnexpectedInvoke = &argc
}
} }
// found interesting string if gotUnexpectedInvoke != nil {
omh(fset, argLit.ValuePos, arg) handler.OnUnexpectedInvoke(fset, funSel.Sel.NamePos, funSel.Sel.Name, *gotUnexpectedInvoke)
}
return true return true
}) })
@ -103,33 +133,33 @@ func (omh OnMsgidHandler) HandleGoFile(fname string, src any) error {
} }
// derived from source: modules/templates/scopedtmpl/scopedtmpl.go, L169-L213 // derived from source: modules/templates/scopedtmpl/scopedtmpl.go, L169-L213
func (omh OnMsgidHandler) handleTemplateNode(fset *token.FileSet, node tmplParser.Node) { func (handler Handler) handleTemplateNode(fset *token.FileSet, node tmplParser.Node) {
switch node.Type() { switch node.Type() {
case tmplParser.NodeAction: case tmplParser.NodeAction:
omh.handleTemplatePipeNode(fset, node.(*tmplParser.ActionNode).Pipe) handler.handleTemplatePipeNode(fset, node.(*tmplParser.ActionNode).Pipe)
case tmplParser.NodeList: case tmplParser.NodeList:
nodeList := node.(*tmplParser.ListNode) nodeList := node.(*tmplParser.ListNode)
omh.handleTemplateFileNodes(fset, nodeList.Nodes) handler.handleTemplateFileNodes(fset, nodeList.Nodes)
case tmplParser.NodePipe: case tmplParser.NodePipe:
omh.handleTemplatePipeNode(fset, node.(*tmplParser.PipeNode)) handler.handleTemplatePipeNode(fset, node.(*tmplParser.PipeNode))
case tmplParser.NodeTemplate: case tmplParser.NodeTemplate:
omh.handleTemplatePipeNode(fset, node.(*tmplParser.TemplateNode).Pipe) handler.handleTemplatePipeNode(fset, node.(*tmplParser.TemplateNode).Pipe)
case tmplParser.NodeIf: case tmplParser.NodeIf:
nodeIf := node.(*tmplParser.IfNode) nodeIf := node.(*tmplParser.IfNode)
omh.handleTemplateBranchNode(fset, nodeIf.BranchNode) handler.handleTemplateBranchNode(fset, nodeIf.BranchNode)
case tmplParser.NodeRange: case tmplParser.NodeRange:
nodeRange := node.(*tmplParser.RangeNode) nodeRange := node.(*tmplParser.RangeNode)
omh.handleTemplateBranchNode(fset, nodeRange.BranchNode) handler.handleTemplateBranchNode(fset, nodeRange.BranchNode)
case tmplParser.NodeWith: case tmplParser.NodeWith:
nodeWith := node.(*tmplParser.WithNode) nodeWith := node.(*tmplParser.WithNode)
omh.handleTemplateBranchNode(fset, nodeWith.BranchNode) handler.handleTemplateBranchNode(fset, nodeWith.BranchNode)
case tmplParser.NodeCommand: case tmplParser.NodeCommand:
nodeCommand := node.(*tmplParser.CommandNode) nodeCommand := node.(*tmplParser.CommandNode)
omh.handleTemplateFileNodes(fset, nodeCommand.Args) handler.handleTemplateFileNodes(fset, nodeCommand.Args)
if len(nodeCommand.Args) != 2 { if len(nodeCommand.Args) < 2 {
return return
} }
@ -138,54 +168,66 @@ func (omh OnMsgidHandler) handleTemplateNode(fset *token.FileSet, node tmplParse
return return
} }
nodeString, ok := nodeCommand.Args[1].(*tmplParser.StringNode) nodeIdent, ok := nodeChain.Node.(*tmplParser.IdentifierNode)
if !ok || nodeIdent.Ident != "ctx" || len(nodeChain.Field) != 2 || nodeChain.Field[0] != "Locale" {
return
}
ltf, ok := handler.LocaleTrFunctions[nodeChain.Field[1]]
if !ok { if !ok {
return return
} }
nodeIdent, ok := nodeChain.Node.(*tmplParser.IdentifierNode) var gotUnexpectedInvoke *int
if !ok || nodeIdent.Ident != "ctx" {
return for _, argNum := range ltf {
if len(nodeCommand.Args) >= int(argNum+2) {
nodeString, ok := nodeCommand.Args[int(argNum+1)].(*tmplParser.StringNode)
if ok {
// found interesting strings
// the column numbers are a bit "off", but much better than nothing
handler.OnMsgid(fset, token.Pos(nodeString.Pos), nodeString.Text)
}
} else {
argc := len(nodeCommand.Args) - 1
gotUnexpectedInvoke = &argc
}
} }
if len(nodeChain.Field) != 2 || nodeChain.Field[0] != "Locale" || !isLocaleTrFunction(nodeChain.Field[1]) { if gotUnexpectedInvoke != nil {
return handler.OnUnexpectedInvoke(fset, token.Pos(nodeChain.Pos), nodeChain.Field[1], *gotUnexpectedInvoke)
} }
// found interesting string
// the column numbers are a bit "off", but much better than nothing
omh(fset, token.Pos(nodeString.Pos), nodeString.Text)
default: default:
} }
} }
func (omh OnMsgidHandler) handleTemplatePipeNode(fset *token.FileSet, pipeNode *tmplParser.PipeNode) { func (handler Handler) handleTemplatePipeNode(fset *token.FileSet, pipeNode *tmplParser.PipeNode) {
if pipeNode == nil { if pipeNode == nil {
return return
} }
// NOTE: we can't pass `pipeNode.Cmds` to handleTemplateFileNodes due to incompatible argument types // NOTE: we can't pass `pipeNode.Cmds` to handleTemplateFileNodes due to incompatible argument types
for _, node := range pipeNode.Cmds { for _, node := range pipeNode.Cmds {
omh.handleTemplateNode(fset, node) handler.handleTemplateNode(fset, node)
} }
} }
func (omh OnMsgidHandler) handleTemplateBranchNode(fset *token.FileSet, branchNode tmplParser.BranchNode) { func (handler Handler) handleTemplateBranchNode(fset *token.FileSet, branchNode tmplParser.BranchNode) {
omh.handleTemplatePipeNode(fset, branchNode.Pipe) handler.handleTemplatePipeNode(fset, branchNode.Pipe)
omh.handleTemplateFileNodes(fset, branchNode.List.Nodes) handler.handleTemplateFileNodes(fset, branchNode.List.Nodes)
if branchNode.ElseList != nil { if branchNode.ElseList != nil {
omh.handleTemplateFileNodes(fset, branchNode.ElseList.Nodes) handler.handleTemplateFileNodes(fset, branchNode.ElseList.Nodes)
} }
} }
func (omh OnMsgidHandler) handleTemplateFileNodes(fset *token.FileSet, nodes []tmplParser.Node) { func (handler Handler) handleTemplateFileNodes(fset *token.FileSet, nodes []tmplParser.Node) {
for _, node := range nodes { for _, node := range nodes {
omh.handleTemplateNode(fset, node) handler.handleTemplateNode(fset, node)
} }
} }
func (omh OnMsgidHandler) HandleTemplateFile(fname string, src any) error { func (handler Handler) HandleTemplateFile(fname string, src any) error {
var tmplContent []byte var tmplContent []byte
switch src2 := src.(type) { switch src2 := src.(type) {
case nil: case nil:
@ -222,7 +264,7 @@ func (omh OnMsgidHandler) HandleTemplateFile(fname string, src any) error {
Err: err, Err: err,
} }
} }
omh.handleTemplateFileNodes(fset, tmplParsed.Tree.Root.Nodes) handler.handleTemplateFileNodes(fset, tmplParsed.Root.Nodes)
return nil return nil
} }
@ -258,10 +300,6 @@ func main() {
} }
msgids := make(container.Set[string]) msgids := make(container.Set[string])
onMsgid := func(trKey, trValue string) error {
msgids[trKey] = struct{}{}
return nil
}
localeFile := filepath.Join(filepath.Join("options", "locale"), "locale_en-US.ini") localeFile := filepath.Join(filepath.Join("options", "locale"), "locale_en-US.ini")
localeContent, err := os.ReadFile(localeFile) localeContent, err := os.ReadFile(localeFile)
@ -270,7 +308,10 @@ func main() {
os.Exit(2) os.Exit(2)
} }
if err = locale.IterateMessagesContent(localeContent, onMsgid); err != nil { if err = localeiter.IterateMessagesContent(localeContent, func(trKey, trValue string) error {
msgids[trKey] = struct{}{}
return nil
}); err != nil {
fmt.Printf("%s:\tERROR: %s\n", localeFile, err.Error()) fmt.Printf("%s:\tERROR: %s\n", localeFile, err.Error())
os.Exit(2) os.Exit(2)
} }
@ -282,19 +323,30 @@ func main() {
os.Exit(2) os.Exit(2)
} }
if err := locale.IterateMessagesNextContent(localeContent, onMsgid); err != nil { if err := localeiter.IterateMessagesNextContent(localeContent, func(trKey, pluralForm, trValue string) error {
// ignore plural form
msgids[trKey] = struct{}{}
return nil
}); err != nil {
fmt.Printf("%s:\tERROR: %s\n", localeFile, err.Error()) fmt.Printf("%s:\tERROR: %s\n", localeFile, err.Error())
os.Exit(2) os.Exit(2)
} }
gotAnyMsgidError := false gotAnyMsgidError := false
omh := OnMsgidHandler(func(fset *token.FileSet, pos token.Pos, msgid string) { handler := Handler{
if !msgids.Contains(msgid) { OnMsgid: func(fset *token.FileSet, pos token.Pos, msgid string) {
if !msgids.Contains(msgid) {
gotAnyMsgidError = true
fmt.Printf("%s:\tmissing msgid: %s\n", fset.Position(pos).String(), msgid)
}
},
OnUnexpectedInvoke: func(fset *token.FileSet, pos token.Pos, funcname string, argc int) {
gotAnyMsgidError = true gotAnyMsgidError = true
fmt.Printf("%s:\tmissing msgid: %s\n", fset.Position(pos).String(), msgid) fmt.Printf("%s:\tunexpected invocation of %s with %d arguments\n", fset.Position(pos).String(), funcname, argc)
} },
}) LocaleTrFunctions: InitLocaleTrFunctions(),
}
if err := filepath.WalkDir(".", func(fpath string, d fs.DirEntry, err error) error { if err := filepath.WalkDir(".", func(fpath string, d fs.DirEntry, err error) error {
if err != nil { if err != nil {
@ -308,15 +360,15 @@ func main() {
if name == "docker" || name == ".git" || name == "node_modules" { if name == "docker" || name == ".git" || name == "node_modules" {
return fs.SkipDir return fs.SkipDir
} }
} else if name == "bindata.go" { } else if name == "bindata.go" || fpath == "modules/translation/i18n/i18n_test.go" {
// skip false positives // skip false positives
} else if strings.HasSuffix(name, ".go") { } else if strings.HasSuffix(name, ".go") {
onError(omh.HandleGoFile(fpath, nil)) onError(handler.HandleGoFile(fpath, nil))
} else if strings.HasSuffix(name, ".tmpl") { } else if strings.HasSuffix(name, ".tmpl") {
if strings.HasPrefix(fpath, "tests") && strings.HasSuffix(name, ".ini.tmpl") { if strings.HasPrefix(fpath, "tests") && strings.HasSuffix(name, ".ini.tmpl") {
// skip false positives // skip false positives
} else { } else {
onError(omh.HandleTemplateFile(fpath, nil)) onError(handler.HandleTemplateFile(fpath, nil))
} }
} }
return nil return nil

View file

@ -11,33 +11,39 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
func buildHandler(ret *[]string) Handler {
return Handler{
OnMsgid: func(fset *token.FileSet, pos token.Pos, msgid string) {
*ret = append(*ret, msgid)
},
OnUnexpectedInvoke: func(fset *token.FileSet, pos token.Pos, funcname string, argc int) {},
LocaleTrFunctions: InitLocaleTrFunctions(),
}
}
func HandleGoFileWrapped(t *testing.T, fname, src string) []string { func HandleGoFileWrapped(t *testing.T, fname, src string) []string {
var ret []string var ret []string
omh := OnMsgidHandler(func(fset *token.FileSet, pos token.Pos, msgid string) { handler := buildHandler(&ret)
ret = append(ret, msgid) require.NoError(t, handler.HandleGoFile(fname, src))
})
require.NoError(t, omh.HandleGoFile(fname, src))
return ret return ret
} }
func HandleTemplateFileWrapped(t *testing.T, fname, src string) []string { func HandleTemplateFileWrapped(t *testing.T, fname, src string) []string {
var ret []string var ret []string
omh := OnMsgidHandler(func(fset *token.FileSet, pos token.Pos, msgid string) { handler := buildHandler(&ret)
ret = append(ret, msgid) require.NoError(t, handler.HandleTemplateFile(fname, src))
})
require.NoError(t, omh.HandleTemplateFile(fname, src))
return ret return ret
} }
func TestUsagesParser(t *testing.T) { func TestUsagesParser(t *testing.T) {
t.Run("go, simple", func(t *testing.T) { t.Run("go, simple", func(t *testing.T) {
assert.EqualValues(t, assert.Equal(t,
[]string{"what.an.example"}, []string{"what.an.example"},
HandleGoFileWrapped(t, "<g1>", "package main\nfunc Render(ctx *context.Context) string { return ctx.Tr(\"what.an.example\"); }\n")) HandleGoFileWrapped(t, "<g1>", "package main\nfunc Render(ctx *context.Context) string { return ctx.Tr(\"what.an.example\"); }\n"))
}) })
t.Run("template, simple", func(t *testing.T) { t.Run("template, simple", func(t *testing.T) {
assert.EqualValues(t, assert.Equal(t,
[]string{"what.an.example"}, []string{"what.an.example"},
HandleTemplateFileWrapped(t, "<t1>", "{{ ctx.Locale.Tr \"what.an.example\" }}\n")) HandleTemplateFileWrapped(t, "<t1>", "{{ ctx.Locale.Tr \"what.an.example\" }}\n"))
}) })

View file

@ -14,7 +14,7 @@ import (
"slices" "slices"
"strings" "strings"
"code.gitea.io/gitea/modules/locale" "forgejo.org/modules/translation/localeiter"
"github.com/microcosm-cc/bluemonday" "github.com/microcosm-cc/bluemonday"
"github.com/sergi/go-diff/diffmatchpatch" "github.com/sergi/go-diff/diffmatchpatch"
@ -100,7 +100,7 @@ func checkValue(trKey, value string) []string {
func checkLocaleContent(localeContent []byte) []string { func checkLocaleContent(localeContent []byte) []string {
errors := []string{} errors := []string{}
if err := locale.IterateMessagesContent(localeContent, func(trKey, trValue string) error { if err := localeiter.IterateMessagesContent(localeContent, func(trKey, trValue string) error {
errors = append(errors, checkValue(trKey, trValue)...) errors = append(errors, checkValue(trKey, trValue)...)
return nil return nil
}); err != nil { }); err != nil {
@ -113,8 +113,12 @@ func checkLocaleContent(localeContent []byte) []string {
func checkLocaleNextContent(localeContent []byte) []string { func checkLocaleNextContent(localeContent []byte) []string {
errors := []string{} errors := []string{}
if err := locale.IterateMessagesNextContent(localeContent, func(trKey, trValue string) error { if err := localeiter.IterateMessagesNextContent(localeContent, func(trKey, pluralForm, trValue string) error {
errors = append(errors, checkValue(trKey, trValue)...) fullKey := trKey
if pluralForm != "" {
fullKey = trKey + "." + pluralForm
}
errors = append(errors, checkValue(fullKey, trValue)...)
return nil return nil
}); err != nil { }); err != nil {
panic(err) panic(err)

View file

@ -15,9 +15,9 @@ func TestLocalizationPolicy(t *testing.T) {
t.Run("Remove tags", func(t *testing.T) { t.Run("Remove tags", func(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte(`hidden_comment_types_description = Comment types checked here will not be shown inside issue pages. Checking "Label" for example removes all "<user> added/removed <label>" comments.`))) assert.Empty(t, checkLocaleContent([]byte(`hidden_comment_types_description = Comment types checked here will not be shown inside issue pages. Checking "Label" for example removes all "<user> added/removed <label>" comments.`)))
assert.EqualValues(t, []string{"key: \x1b[31m<not-an-allowed-key>\x1b[0m REPLACED-TAG"}, checkLocaleContent([]byte(`key = "<not-an-allowed-key> <label>"`))) assert.Equal(t, []string{"key: \x1b[31m<not-an-allowed-key>\x1b[0m REPLACED-TAG"}, checkLocaleContent([]byte(`key = "<not-an-allowed-key> <label>"`)))
assert.EqualValues(t, []string{"key: \x1b[31m<user@example.com>\x1b[0m REPLACED-TAG"}, checkLocaleContent([]byte(`key = "<user@example.com> <email@example.com>"`))) assert.Equal(t, []string{"key: \x1b[31m<user@example.com>\x1b[0m REPLACED-TAG"}, checkLocaleContent([]byte(`key = "<user@example.com> <email@example.com>"`)))
assert.EqualValues(t, []string{"key: \x1b[31m<tag>\x1b[0m REPLACED-TAG \x1b[31m</tag>\x1b[0m"}, checkLocaleContent([]byte(`key = "<tag> <email@example.com> </tag>"`))) assert.Equal(t, []string{"key: \x1b[31m<tag>\x1b[0m REPLACED-TAG \x1b[31m</tag>\x1b[0m"}, checkLocaleContent([]byte(`key = "<tag> <email@example.com> </tag>"`)))
}) })
t.Run("Specific exception", func(t *testing.T) { t.Run("Specific exception", func(t *testing.T) {
@ -25,11 +25,11 @@ func TestLocalizationPolicy(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte(`pulls.title_desc_one = wants to merge %[1]d commit from <code>%[2]s</code> into <code id="%[4]s">%[3]s</code>`))) assert.Empty(t, checkLocaleContent([]byte(`pulls.title_desc_one = wants to merge %[1]d commit from <code>%[2]s</code> into <code id="%[4]s">%[3]s</code>`)))
assert.Empty(t, checkLocaleContent([]byte(`editor.commit_directly_to_this_branch = Commit directly to the <strong class="%[2]s">%[1]s</strong> branch.`))) assert.Empty(t, checkLocaleContent([]byte(`editor.commit_directly_to_this_branch = Commit directly to the <strong class="%[2]s">%[1]s</strong> branch.`)))
assert.EqualValues(t, []string{"workflow.dispatch.trigger_found: This workflow has a \x1b[31m<d>\x1b[0mworkflow_dispatch\x1b[31m</d>\x1b[0m event trigger."}, checkLocaleContent([]byte(`workflow.dispatch.trigger_found = This workflow has a <d>workflow_dispatch</d> event trigger.`))) assert.Equal(t, []string{"workflow.dispatch.trigger_found: This workflow has a \x1b[31m<d>\x1b[0mworkflow_dispatch\x1b[31m</d>\x1b[0m event trigger."}, checkLocaleContent([]byte(`workflow.dispatch.trigger_found = This workflow has a <d>workflow_dispatch</d> event trigger.`)))
assert.EqualValues(t, []string{"key: <code\x1b[31m id=\"branch_targe\"\x1b[0m>%[3]s</code>"}, checkLocaleContent([]byte(`key = <code id="branch_targe">%[3]s</code>`))) assert.Equal(t, []string{"key: <code\x1b[31m id=\"branch_targe\"\x1b[0m>%[3]s</code>"}, checkLocaleContent([]byte(`key = <code id="branch_targe">%[3]s</code>`)))
assert.EqualValues(t, []string{"key: <a\x1b[31m class=\"ui sh\"\x1b[0m href=\"https://TO-BE-REPLACED.COM\">"}, checkLocaleContent([]byte(`key = <a class="ui sh" href="%[3]s">`))) assert.Equal(t, []string{"key: <a\x1b[31m class=\"ui sh\"\x1b[0m href=\"https://TO-BE-REPLACED.COM\">"}, checkLocaleContent([]byte(`key = <a class="ui sh" href="%[3]s">`)))
assert.EqualValues(t, []string{"key: <a\x1b[31m class=\"js-click-me\"\x1b[0m href=\"https://TO-BE-REPLACED.COM\">"}, checkLocaleContent([]byte(`key = <a class="js-click-me" href="%[3]s">`))) assert.Equal(t, []string{"key: <a\x1b[31m class=\"js-click-me\"\x1b[0m href=\"https://TO-BE-REPLACED.COM\">"}, checkLocaleContent([]byte(`key = <a class="js-click-me" href="%[3]s">`)))
assert.EqualValues(t, []string{"key: <strong\x1b[31m class=\"branch-target\"\x1b[0m>%[1]s</strong>"}, checkLocaleContent([]byte(`key = <strong class="branch-target">%[1]s</strong>`))) assert.Equal(t, []string{"key: <strong\x1b[31m class=\"branch-target\"\x1b[0m>%[1]s</strong>"}, checkLocaleContent([]byte(`key = <strong class="branch-target">%[1]s</strong>`)))
}) })
t.Run("General safe tags", func(t *testing.T) { t.Run("General safe tags", func(t *testing.T) {
@ -38,7 +38,7 @@ func TestLocalizationPolicy(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte("sqlite_helper = File path for the SQLite3 database.<br>Enter an absolute path if you run Forgejo as a service."))) assert.Empty(t, checkLocaleContent([]byte("sqlite_helper = File path for the SQLite3 database.<br>Enter an absolute path if you run Forgejo as a service.")))
assert.Empty(t, checkLocaleContent([]byte("hi_user_x = Hi <b>%s</b>,"))) assert.Empty(t, checkLocaleContent([]byte("hi_user_x = Hi <b>%s</b>,")))
assert.EqualValues(t, []string{"error404: The page you are trying to reach either <strong\x1b[31m title='aaa'\x1b[0m>does not exist</strong> or <strong>you are not authorized</strong> to view it."}, checkLocaleContent([]byte("error404 = The page you are trying to reach either <strong title='aaa'>does not exist</strong> or <strong>you are not authorized</strong> to view it."))) assert.Equal(t, []string{"error404: The page you are trying to reach either <strong\x1b[31m title='aaa'\x1b[0m>does not exist</strong> or <strong>you are not authorized</strong> to view it."}, checkLocaleContent([]byte("error404 = The page you are trying to reach either <strong title='aaa'>does not exist</strong> or <strong>you are not authorized</strong> to view it.")))
}) })
t.Run("<a>", func(t *testing.T) { t.Run("<a>", func(t *testing.T) {
@ -47,20 +47,20 @@ func TestLocalizationPolicy(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte(`webauthn_desc = Security keys are hardware devices containing cryptographic keys. They can be used for two-factor authentication. Security keys must support the <a rel="noreferrer" target="_blank" href="%s">WebAuthn Authenticator</a> standard.`))) assert.Empty(t, checkLocaleContent([]byte(`webauthn_desc = Security keys are hardware devices containing cryptographic keys. They can be used for two-factor authentication. Security keys must support the <a rel="noreferrer" target="_blank" href="%s">WebAuthn Authenticator</a> standard.`)))
assert.Empty(t, checkLocaleContent([]byte("issues.closed_at = `closed this issue <a id=\"%[1]s\" href=\"#%[1]s\">%[2]s</a>`"))) assert.Empty(t, checkLocaleContent([]byte("issues.closed_at = `closed this issue <a id=\"%[1]s\" href=\"#%[1]s\">%[2]s</a>`")))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"https://example.com\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com">`))) assert.Equal(t, []string{"key: \x1b[31m<a href=\"https://example.com\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"javascript:alert('1')\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="javascript:alert('1')">`))) assert.Equal(t, []string{"key: \x1b[31m<a href=\"javascript:alert('1')\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="javascript:alert('1')">`)))
assert.EqualValues(t, []string{"key: <a href=\"https://TO-BE-REPLACED.COM\"\x1b[31m download\x1b[0m>"}, checkLocaleContent([]byte(`key = <a href="%s" download>`))) assert.Equal(t, []string{"key: <a href=\"https://TO-BE-REPLACED.COM\"\x1b[31m download\x1b[0m>"}, checkLocaleContent([]byte(`key = <a href="%s" download>`)))
assert.EqualValues(t, []string{"key: <a href=\"https://TO-BE-REPLACED.COM\"\x1b[31m target=\"_self\"\x1b[0m>"}, checkLocaleContent([]byte(`key = <a href="%s" target="_self">`))) assert.Equal(t, []string{"key: <a href=\"https://TO-BE-REPLACED.COM\"\x1b[31m target=\"_self\"\x1b[0m>"}, checkLocaleContent([]byte(`key = <a href="%s" target="_self">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"https://example.com/%s\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com/%s">`))) assert.Equal(t, []string{"key: \x1b[31m<a href=\"https://example.com/%s\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com/%s">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"https://example.com/?q=%s\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com/?q=%s">`))) assert.Equal(t, []string{"key: \x1b[31m<a href=\"https://example.com/?q=%s\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="https://example.com/?q=%s">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"%s/open-redirect\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="%s/open-redirect">`))) assert.Equal(t, []string{"key: \x1b[31m<a href=\"%s/open-redirect\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="%s/open-redirect">`)))
assert.EqualValues(t, []string{"key: \x1b[31m<a href=\"%s?q=open-redirect\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="%s?q=open-redirect">`))) assert.Equal(t, []string{"key: \x1b[31m<a href=\"%s?q=open-redirect\">\x1b[0m"}, checkLocaleContent([]byte(`key = <a href="%s?q=open-redirect">`)))
}) })
t.Run("Escaped HTML characters", func(t *testing.T) { t.Run("Escaped HTML characters", func(t *testing.T) {
assert.Empty(t, checkLocaleContent([]byte("activity.git_stats_push_to_branch = `إلى %s و\"`"))) assert.Empty(t, checkLocaleContent([]byte("activity.git_stats_push_to_branch = `إلى %s و\"`")))
assert.EqualValues(t, []string{"key: و\x1b[31m&nbsp\x1b[0m\x1b[32m\u00a0\x1b[0m"}, checkLocaleContent([]byte(`key = و&nbsp;`))) assert.Equal(t, []string{"key: و\x1b[31m&nbsp;\x1b[0m\x1b[32m\u00a0\x1b[0m"}, checkLocaleContent([]byte(`key = و&nbsp;`)))
}) })
} }
@ -75,7 +75,7 @@ func TestNextLocalizationPolicy(t *testing.T) {
} }
}`))) }`)))
assert.EqualValues(t, []string{"settings.hidden_comment_types_description: \"\x1b[31m<not-an-allowed-key>\x1b[0m REPLACED-TAG\""}, checkLocaleNextContent([]byte(`{ assert.Equal(t, []string{"settings.hidden_comment_types_description: \"\x1b[31m<not-an-allowed-key>\x1b[0m REPLACED-TAG\""}, checkLocaleNextContent([]byte(`{
"settings": { "settings": {
"hidden_comment_types_description": "\"<not-an-allowed-key> <label>\"" "hidden_comment_types_description": "\"<not-an-allowed-key> <label>\""
} }
@ -87,8 +87,20 @@ func TestNextLocalizationPolicy(t *testing.T) {
"settings.hidden_comment_types_description": "Comment types checked here will not be shown inside issue pages. Checking \"Label\" for example removes all \"<user> added/removed <label>\" comments." "settings.hidden_comment_types_description": "Comment types checked here will not be shown inside issue pages. Checking \"Label\" for example removes all \"<user> added/removed <label>\" comments."
}`))) }`)))
assert.EqualValues(t, []string{"settings.hidden_comment_types_description: \"\x1b[31m<not-an-allowed-key>\x1b[0m REPLACED-TAG\""}, checkLocaleNextContent([]byte(`{ assert.Equal(t, []string{"settings.hidden_comment_types_description: \"\x1b[31m<not-an-allowed-key>\x1b[0m REPLACED-TAG\""}, checkLocaleNextContent([]byte(`{
"settings.hidden_comment_types_description": "\"<not-an-allowed-key> <label>\"" "settings.hidden_comment_types_description": "\"<not-an-allowed-key> <label>\""
}`))) }`)))
}) })
t.Run("Plural form", func(t *testing.T) {
assert.Equal(t, []string{"repo.pulls.title_desc: key = \x1b[31m<a href=\"https://example.com\">\x1b[0m"}, checkLocaleNextContent([]byte(`{"repo.pulls.title_desc": {
"few": "key = <a href=\"%s\">",
"other": "key = <a href=\"https://example.com\">"
}}`)))
assert.Equal(t, []string{"repo.pulls.title_desc.few: key = \x1b[31m<a href=\"https://example.com\">\x1b[0m"}, checkLocaleNextContent([]byte(`{"repo.pulls.title_desc": {
"few": "key = <a href=\"https://example.com\">",
"other": "key = <a href=\"%s\">"
}}`)))
})
} }

View file

@ -6,8 +6,8 @@ package cmd
import ( import (
"fmt" "fmt"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -8,12 +8,12 @@ import (
"context" "context"
"fmt" "fmt"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
"code.gitea.io/gitea/modules/git" "forgejo.org/modules/git"
"code.gitea.io/gitea/modules/gitrepo" "forgejo.org/modules/gitrepo"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
repo_module "code.gitea.io/gitea/modules/repository" repo_module "forgejo.org/modules/repository"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -9,9 +9,9 @@ import (
"os" "os"
"text/tabwriter" "text/tabwriter"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
auth_service "code.gitea.io/gitea/services/auth" auth_service "forgejo.org/services/auth"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -8,8 +8,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"code.gitea.io/gitea/models/auth" "forgejo.org/models/auth"
"code.gitea.io/gitea/services/auth/source/ldap" "forgejo.org/services/auth/source/ldap"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -7,8 +7,8 @@ import (
"context" "context"
"testing" "testing"
"code.gitea.io/gitea/models/auth" "forgejo.org/models/auth"
"code.gitea.io/gitea/services/auth/source/ldap" "forgejo.org/services/auth/source/ldap"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@ -216,11 +216,11 @@ func TestAddLdapBindDn(t *testing.T) {
return nil return nil
}, },
updateAuthSource: func(ctx context.Context, authSource *auth.Source) error { updateAuthSource: func(ctx context.Context, authSource *auth.Source) error {
assert.FailNow(t, "case %d: should not call updateAuthSource", n) assert.FailNow(t, "should not call updateAuthSource", "case: %d", n)
return nil return nil
}, },
getAuthSourceByID: func(ctx context.Context, id int64) (*auth.Source, error) { getAuthSourceByID: func(ctx context.Context, id int64) (*auth.Source, error) {
assert.FailNow(t, "case %d: should not call getAuthSourceByID", n) assert.FailNow(t, "should not call getAuthSourceByID", "case: %d", n)
return nil, nil return nil, nil
}, },
} }
@ -447,11 +447,11 @@ func TestAddLdapSimpleAuth(t *testing.T) {
return nil return nil
}, },
updateAuthSource: func(ctx context.Context, authSource *auth.Source) error { updateAuthSource: func(ctx context.Context, authSource *auth.Source) error {
assert.FailNow(t, "case %d: should not call updateAuthSource", n) assert.FailNow(t, "should not call updateAuthSource", "case: %d", n)
return nil return nil
}, },
getAuthSourceByID: func(ctx context.Context, id int64) (*auth.Source, error) { getAuthSourceByID: func(ctx context.Context, id int64) (*auth.Source, error) {
assert.FailNow(t, "case %d: should not call getAuthSourceByID", n) assert.FailNow(t, "should not call getAuthSourceByID", "case: %d", n)
return nil, nil return nil, nil
}, },
} }
@ -898,7 +898,7 @@ func TestUpdateLdapBindDn(t *testing.T) {
return nil return nil
}, },
createAuthSource: func(ctx context.Context, authSource *auth.Source) error { createAuthSource: func(ctx context.Context, authSource *auth.Source) error {
assert.FailNow(t, "case %d: should not call createAuthSource", n) assert.FailNow(t, "should not call createAuthSource", "case: %d", n)
return nil return nil
}, },
updateAuthSource: func(ctx context.Context, authSource *auth.Source) error { updateAuthSource: func(ctx context.Context, authSource *auth.Source) error {
@ -1288,7 +1288,7 @@ func TestUpdateLdapSimpleAuth(t *testing.T) {
return nil return nil
}, },
createAuthSource: func(ctx context.Context, authSource *auth.Source) error { createAuthSource: func(ctx context.Context, authSource *auth.Source) error {
assert.FailNow(t, "case %d: should not call createAuthSource", n) assert.FailNow(t, "should not call createAuthSource", "case: %d", n)
return nil return nil
}, },
updateAuthSource: func(ctx context.Context, authSource *auth.Source) error { updateAuthSource: func(ctx context.Context, authSource *auth.Source) error {

View file

@ -8,8 +8,8 @@ import (
"fmt" "fmt"
"net/url" "net/url"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/services/auth/source/oauth2" "forgejo.org/services/auth/source/oauth2"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -7,9 +7,9 @@ import (
"errors" "errors"
"strings" "strings"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"code.gitea.io/gitea/services/auth/source/smtp" "forgejo.org/services/auth/source/smtp"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -4,9 +4,9 @@
package cmd package cmd
import ( import (
asymkey_model "code.gitea.io/gitea/models/asymkey" asymkey_model "forgejo.org/models/asymkey"
"code.gitea.io/gitea/modules/graceful" "forgejo.org/modules/graceful"
repo_service "code.gitea.io/gitea/services/repository" repo_service "forgejo.org/services/repository"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -7,11 +7,11 @@ import (
"errors" "errors"
"fmt" "fmt"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/auth/password" "forgejo.org/modules/auth/password"
"code.gitea.io/gitea/modules/optional" "forgejo.org/modules/optional"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
user_service "code.gitea.io/gitea/services/user" user_service "forgejo.org/services/user"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -6,13 +6,14 @@ package cmd
import ( import (
"errors" "errors"
"fmt" "fmt"
"strings"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
pwd "code.gitea.io/gitea/modules/auth/password" pwd "forgejo.org/modules/auth/password"
"code.gitea.io/gitea/modules/optional" "forgejo.org/modules/optional"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
@ -61,6 +62,16 @@ var microcmdUserCreate = &cli.Command{
Name: "access-token", Name: "access-token",
Usage: "Generate access token for the user", Usage: "Generate access token for the user",
}, },
&cli.StringFlag{
Name: "access-token-name",
Usage: `Name of the generated access token`,
Value: "gitea-admin",
},
&cli.StringFlag{
Name: "access-token-scopes",
Usage: `Scopes of the generated access token, comma separated. Examples: "all", "public-only,read:issue", "write:repository,write:user"`,
Value: "all",
},
&cli.BoolFlag{ &cli.BoolFlag{
Name: "restricted", Name: "restricted",
Usage: "Make a restricted user account", Usage: "Make a restricted user account",
@ -157,23 +168,40 @@ func runCreateUser(c *cli.Context) error {
IsRestricted: restricted, IsRestricted: restricted,
} }
var accessTokenName string
var accessTokenScope auth_model.AccessTokenScope
if c.IsSet("access-token") {
accessTokenName = strings.TrimSpace(c.String("access-token-name"))
if accessTokenName == "" {
return errors.New("access-token-name cannot be empty")
}
var err error
accessTokenScope, err = auth_model.AccessTokenScope(c.String("access-token-scopes")).Normalize()
if err != nil {
return fmt.Errorf("invalid access token scope provided: %w", err)
}
if !accessTokenScope.HasPermissionScope() {
return errors.New("access token does not have any permission")
}
} else if c.IsSet("access-token-name") || c.IsSet("access-token-scopes") {
return errors.New("access-token-name and access-token-scopes flags are only valid when access-token flag is set")
}
// arguments should be prepared before creating the user & access token, in case there is anything wrong
// create the user
if err := user_model.CreateUser(ctx, u, overwriteDefault); err != nil { if err := user_model.CreateUser(ctx, u, overwriteDefault); err != nil {
return fmt.Errorf("CreateUser: %w", err) return fmt.Errorf("CreateUser: %w", err)
} }
fmt.Printf("New user '%s' has been successfully created!\n", username)
if c.Bool("access-token") { // create the access token
t := &auth_model.AccessToken{ if accessTokenScope != "" {
Name: "gitea-admin", t := &auth_model.AccessToken{Name: accessTokenName, UID: u.ID, Scope: accessTokenScope}
UID: u.ID,
}
if err := auth_model.NewAccessToken(ctx, t); err != nil { if err := auth_model.NewAccessToken(ctx, t); err != nil {
return err return err
} }
fmt.Printf("Access token was successfully created... %s\n", t.Token) fmt.Printf("Access token was successfully created... %s\n", t.Token)
} }
fmt.Printf("New user '%s' has been successfully created!\n", username)
return nil return nil
} }

View file

@ -8,9 +8,9 @@ import (
"fmt" "fmt"
"strings" "strings"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/storage" "forgejo.org/modules/storage"
user_service "code.gitea.io/gitea/services/user" user_service "forgejo.org/services/user"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -7,8 +7,8 @@ import (
"errors" "errors"
"fmt" "fmt"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
@ -34,8 +34,8 @@ var microcmdUserGenerateAccessToken = &cli.Command{
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "scopes", Name: "scopes",
Value: "", Value: "all",
Usage: "Comma separated list of scopes to apply to access token", Usage: `Comma separated list of scopes to apply to access token, examples: "all", "public-only,read:issue", "write:repository,write:user"`,
}, },
}, },
Action: runGenerateAccessToken, Action: runGenerateAccessToken,
@ -43,7 +43,7 @@ var microcmdUserGenerateAccessToken = &cli.Command{
func runGenerateAccessToken(c *cli.Context) error { func runGenerateAccessToken(c *cli.Context) error {
if !c.IsSet("username") { if !c.IsSet("username") {
return errors.New("You must provide a username to generate a token for") return errors.New("you must provide a username to generate a token for")
} }
ctx, cancel := installSignals() ctx, cancel := installSignals()
@ -77,6 +77,9 @@ func runGenerateAccessToken(c *cli.Context) error {
if err != nil { if err != nil {
return fmt.Errorf("invalid access token scope provided: %w", err) return fmt.Errorf("invalid access token scope provided: %w", err)
} }
if !accessTokenScope.HasPermissionScope() {
return errors.New("access token does not have any permission")
}
t.Scope = accessTokenScope t.Scope = accessTokenScope
// create the token // create the token

View file

@ -8,7 +8,7 @@ import (
"os" "os"
"text/tabwriter" "text/tabwriter"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -7,7 +7,7 @@ import (
"errors" "errors"
"fmt" "fmt"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -15,10 +15,10 @@ import (
"strings" "strings"
"syscall" "syscall"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -11,16 +11,15 @@ import (
"strings" "strings"
"text/tabwriter" "text/tabwriter"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/models/migrations" "forgejo.org/models/migrations"
migrate_base "code.gitea.io/gitea/models/migrations/base" migrate_base "forgejo.org/models/migrations/base"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/services/doctor" "forgejo.org/services/doctor"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"xorm.io/xorm"
) )
// CmdDoctor represents the available doctor sub-command. // CmdDoctor represents the available doctor sub-command.
@ -120,7 +119,7 @@ func runRecreateTable(ctx *cli.Context) error {
args := ctx.Args() args := ctx.Args()
names := make([]string, 0, ctx.NArg()) names := make([]string, 0, ctx.NArg())
for i := 0; i < ctx.NArg(); i++ { for i := range ctx.NArg() {
names = append(names, args.Get(i)) names = append(names, args.Get(i))
} }
@ -130,11 +129,17 @@ func runRecreateTable(ctx *cli.Context) error {
} }
recreateTables := migrate_base.RecreateTables(beans...) recreateTables := migrate_base.RecreateTables(beans...)
return db.InitEngineWithMigration(stdCtx, func(x *xorm.Engine) error { return db.InitEngineWithMigration(stdCtx, func(x db.Engine) error {
if err := migrations.EnsureUpToDate(x); err != nil { engine, err := db.GetMasterEngine(x)
if err != nil {
return err return err
} }
return recreateTables(x)
if err := migrations.EnsureUpToDate(engine); err != nil {
return err
}
return recreateTables(engine)
}) })
} }
@ -143,11 +148,12 @@ func setupDoctorDefaultLogger(ctx *cli.Context, colorize bool) {
setupConsoleLogger(log.FATAL, log.CanColorStderr, os.Stderr) setupConsoleLogger(log.FATAL, log.CanColorStderr, os.Stderr)
logFile := ctx.String("log-file") logFile := ctx.String("log-file")
if logFile == "" { switch logFile {
case "":
return // if no doctor log-file is set, do not show any log from default logger return // if no doctor log-file is set, do not show any log from default logger
} else if logFile == "-" { case "-":
setupConsoleLogger(log.TRACE, colorize, os.Stdout) setupConsoleLogger(log.TRACE, colorize, os.Stdout)
} else { default:
logFile, _ = filepath.Abs(logFile) logFile, _ = filepath.Abs(logFile)
writeMode := log.WriterMode{Level: log.TRACE, WriterOption: log.WriterFileOption{FileName: logFile}} writeMode := log.WriterMode{Level: log.TRACE, WriterOption: log.WriterFileOption{FileName: logFile}}
writer, err := log.NewEventWriter("console-to-file", "file", writeMode) writer, err := log.NewEventWriter("console-to-file", "file", writeMode)

View file

@ -6,9 +6,9 @@ package cmd
import ( import (
"fmt" "fmt"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -7,8 +7,8 @@ import (
"context" "context"
"testing" "testing"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/services/doctor" "forgejo.org/services/doctor"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"

View file

@ -13,12 +13,12 @@ import (
"strings" "strings"
"time" "time"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/json" "forgejo.org/modules/json"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/storage" "forgejo.org/modules/storage"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"code.forgejo.org/go-chi/session" "code.forgejo.org/go-chi/session"
"github.com/mholt/archiver/v3" "github.com/mholt/archiver/v3"
@ -122,7 +122,6 @@ It can be used for backup and capture Forgejo server image to send to maintainer
&cli.StringFlag{ &cli.StringFlag{
Name: "tempdir", Name: "tempdir",
Aliases: []string{"t"}, Aliases: []string{"t"},
Value: os.TempDir(),
Usage: "Temporary dir path", Usage: "Temporary dir path",
}, },
&cli.StringFlag{ &cli.StringFlag{
@ -288,18 +287,31 @@ func runDump(ctx *cli.Context) error {
} }
tmpDir := ctx.String("tempdir") tmpDir := ctx.String("tempdir")
if tmpDir == "" {
tmpDir, err = os.MkdirTemp("", "forgejo-dump-*")
if err != nil {
fatal("Failed to create temporary directory: %v", err)
}
defer func() {
if err := util.Remove(tmpDir); err != nil {
log.Warn("Failed to remove temporary directory: %s: Error: %v", tmpDir, err)
}
}()
}
if _, err := os.Stat(tmpDir); os.IsNotExist(err) { if _, err := os.Stat(tmpDir); os.IsNotExist(err) {
fatal("Path does not exist: %s", tmpDir) fatal("Path does not exist: %s", tmpDir)
} }
dbDump, err := os.CreateTemp(tmpDir, "forgejo-db.sql") dbDump, err := os.CreateTemp(tmpDir, "forgejo-db.sql")
if err != nil { if err != nil {
fatal("Failed to create tmp file: %v", err) fatal("Failed to create temporary file: %v", err)
} }
defer func() { defer func() {
_ = dbDump.Close() _ = dbDump.Close()
if err := util.Remove(dbDump.Name()); err != nil { if err := util.Remove(dbDump.Name()); err != nil {
log.Warn("Failed to remove temporary file: %s: Error: %v", dbDump.Name(), err) log.Warn("Failed to remove temporary database file: %s: Error: %v", dbDump.Name(), err)
} }
}() }()

View file

@ -10,14 +10,14 @@ import (
"os" "os"
"strings" "strings"
"code.gitea.io/gitea/modules/git" "forgejo.org/modules/git"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
base "code.gitea.io/gitea/modules/migration" base "forgejo.org/modules/migration"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/structs" "forgejo.org/modules/structs"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"code.gitea.io/gitea/services/convert" "forgejo.org/services/convert"
"code.gitea.io/gitea/services/migrations" "forgejo.org/services/migrations"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -10,13 +10,13 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"code.gitea.io/gitea/modules/assetfs" "forgejo.org/modules/assetfs"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/options" "forgejo.org/modules/options"
"code.gitea.io/gitea/modules/public" "forgejo.org/modules/public"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/templates" "forgejo.org/modules/templates"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"github.com/gobwas/glob" "github.com/gobwas/glob"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"

View file

@ -11,10 +11,10 @@ import (
"os" "os"
"strings" "strings"
actions_model "code.gitea.io/gitea/models/actions" actions_model "forgejo.org/models/actions"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
private_routers "code.gitea.io/gitea/routers/private" private_routers "forgejo.org/routers/private"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"testing" "testing"
"code.gitea.io/gitea/services/context" "forgejo.org/services/context"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"

View file

@ -8,14 +8,14 @@ import (
"context" "context"
"errors" "errors"
"code.gitea.io/gitea/models" "forgejo.org/models"
"code.gitea.io/gitea/modules/git" "forgejo.org/modules/git"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/storage" "forgejo.org/modules/storage"
"code.gitea.io/gitea/services/f3/util" "forgejo.org/services/f3/util"
_ "code.gitea.io/gitea/services/f3/driver" // register the driver _ "forgejo.org/services/f3/driver" // register the driver
f3_cmd "code.forgejo.org/f3/gof3/v3/cmd" f3_cmd "code.forgejo.org/f3/gof3/v3/cmd"
f3_logger "code.forgejo.org/f3/gof3/v3/logger" f3_logger "code.forgejo.org/f3/gof3/v3/logger"

View file

@ -11,10 +11,10 @@ import (
"os/signal" "os/signal"
"syscall" "syscall"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -8,7 +8,7 @@ import (
"fmt" "fmt"
"os" "os"
"code.gitea.io/gitea/modules/generate" "forgejo.org/modules/generate"
"github.com/mattn/go-isatty" "github.com/mattn/go-isatty"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
@ -70,10 +70,7 @@ func runGenerateInternalToken(c *cli.Context) error {
} }
func runGenerateLfsJwtSecret(c *cli.Context) error { func runGenerateLfsJwtSecret(c *cli.Context) error {
_, jwtSecretBase64, err := generate.NewJwtSecret() _, jwtSecretBase64 := generate.NewJwtSecret()
if err != nil {
return err
}
fmt.Printf("%s", jwtSecretBase64) fmt.Printf("%s", jwtSecretBase64)

View file

@ -14,12 +14,12 @@ import (
"strings" "strings"
"time" "time"
"code.gitea.io/gitea/modules/git" "forgejo.org/modules/git"
"code.gitea.io/gitea/modules/git/pushoptions" "forgejo.org/modules/git/pushoptions"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
repo_module "code.gitea.io/gitea/modules/repository" repo_module "forgejo.org/modules/repository"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
@ -168,7 +168,7 @@ func runHookPreReceive(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), true)
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 { if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
if setting.OnlyAllowPushIfGiteaEnvironmentSet { if setting.OnlyAllowPushIfGiteaEnvironmentSet {
@ -220,10 +220,7 @@ Forgejo or set your environment appropriately.`, "")
} }
} }
supportProcReceive := false supportProcReceive := git.CheckGitVersionAtLeast("2.29") == nil
if git.CheckGitVersionAtLeast("2.29") == nil {
supportProcReceive = true
}
for scanner.Scan() { for scanner.Scan() {
// TODO: support news feeds for wiki // TODO: support news feeds for wiki
@ -330,7 +327,7 @@ func runHookPostReceive(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), true)
// First of all run update-server-info no matter what // First of all run update-server-info no matter what
if _, _, err := git.NewCommand(ctx, "update-server-info").RunStdString(nil); err != nil { if _, _, err := git.NewCommand(ctx, "update-server-info").RunStdString(nil); err != nil {
@ -494,7 +491,7 @@ func runHookProcReceive(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), true)
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 { if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
if setting.OnlyAllowPushIfGiteaEnvironmentSet { if setting.OnlyAllowPushIfGiteaEnvironmentSet {

View file

@ -14,8 +14,8 @@ import (
"testing" "testing"
"time" "time"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/test" "forgejo.org/modules/test"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"

View file

@ -8,8 +8,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
@ -71,7 +71,7 @@ func runKeys(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), true)
authorizedString, extra := private.AuthorizedPublicKeyByContent(ctx, content) authorizedString, extra := private.AuthorizedPublicKeyByContent(ctx, content)
// do not use handleCliResponseExtra or cli.NewExitError, if it exists immediately, it breaks some tests like Test_CmdKeys // do not use handleCliResponseExtra or cli.NewExitError, if it exists immediately, it breaks some tests like Test_CmdKeys

View file

@ -6,8 +6,8 @@ package cmd
import ( import (
"fmt" "fmt"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -10,9 +10,9 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"code.gitea.io/gitea/cmd/forgejo" "forgejo.org/cmd/forgejo"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
@ -122,9 +122,9 @@ func NewMainApp(version, versionExtra string) *cli.App {
} }
executable := filepath.Base(path) executable := filepath.Base(path)
var subCmdsStandalone []*cli.Command = make([]*cli.Command, 0, 10) subCmdsStandalone := make([]*cli.Command, 0, 10)
var subCmdWithConfig []*cli.Command = make([]*cli.Command, 0, 10) subCmdWithConfig := make([]*cli.Command, 0, 10)
var globalFlags []cli.Flag = make([]cli.Flag, 0, 10) globalFlags := make([]cli.Flag, 0, 10)
// //
// If the executable is forgejo-cli, provide a Forgejo specific CLI // If the executable is forgejo-cli, provide a Forgejo specific CLI

View file

@ -10,9 +10,9 @@ import (
"strings" "strings"
"testing" "testing"
"code.gitea.io/gitea/models/unittest" "forgejo.org/models/unittest"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/test" "forgejo.org/modules/test"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@ -132,14 +132,14 @@ func TestCliCmdError(t *testing.T) {
r, err := runTestApp(app, "./gitea", "test-cmd") r, err := runTestApp(app, "./gitea", "test-cmd")
require.Error(t, err) require.Error(t, err)
assert.Equal(t, 1, r.ExitCode) assert.Equal(t, 1, r.ExitCode)
assert.Equal(t, "", r.Stdout) assert.Empty(t, r.Stdout)
assert.Equal(t, "Command error: normal error\n", r.Stderr) assert.Equal(t, "Command error: normal error\n", r.Stderr)
app = newTestApp(func(ctx *cli.Context) error { return cli.Exit("exit error", 2) }) app = newTestApp(func(ctx *cli.Context) error { return cli.Exit("exit error", 2) })
r, err = runTestApp(app, "./gitea", "test-cmd") r, err = runTestApp(app, "./gitea", "test-cmd")
require.Error(t, err) require.Error(t, err)
assert.Equal(t, 2, r.ExitCode) assert.Equal(t, 2, r.ExitCode)
assert.Equal(t, "", r.Stdout) assert.Empty(t, r.Stdout)
assert.Equal(t, "exit error\n", r.Stderr) assert.Equal(t, "exit error\n", r.Stderr)
app = newTestApp(func(ctx *cli.Context) error { return nil }) app = newTestApp(func(ctx *cli.Context) error { return nil })
@ -147,12 +147,12 @@ func TestCliCmdError(t *testing.T) {
require.Error(t, err) require.Error(t, err)
assert.Equal(t, 1, r.ExitCode) assert.Equal(t, 1, r.ExitCode)
assert.Equal(t, "Incorrect Usage: flag provided but not defined: -no-such\n\n", r.Stdout) assert.Equal(t, "Incorrect Usage: flag provided but not defined: -no-such\n\n", r.Stdout)
assert.Equal(t, "", r.Stderr) // the cli package's strange behavior, the error message is not in stderr .... assert.Empty(t, r.Stderr) // the cli package's strange behavior, the error message is not in stderr ....
app = newTestApp(func(ctx *cli.Context) error { return nil }) app = newTestApp(func(ctx *cli.Context) error { return nil })
r, err = runTestApp(app, "./gitea", "test-cmd") r, err = runTestApp(app, "./gitea", "test-cmd")
require.NoError(t, err) require.NoError(t, err)
assert.Equal(t, -1, r.ExitCode) // the cli.OsExiter is not called assert.Equal(t, -1, r.ExitCode) // the cli.OsExiter is not called
assert.Equal(t, "", r.Stdout) assert.Empty(t, r.Stdout)
assert.Equal(t, "", r.Stderr) assert.Empty(t, r.Stderr)
} }

View file

@ -7,7 +7,7 @@ import (
"os" "os"
"time" "time"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
@ -112,7 +112,7 @@ func runShutdown(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
extra := private.Shutdown(ctx) extra := private.Shutdown(ctx)
return handleCliResponseExtra(extra) return handleCliResponseExtra(extra)
} }
@ -121,7 +121,7 @@ func runRestart(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
extra := private.Restart(ctx) extra := private.Restart(ctx)
return handleCliResponseExtra(extra) return handleCliResponseExtra(extra)
} }
@ -130,7 +130,7 @@ func runReloadTemplates(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
extra := private.ReloadTemplates(ctx) extra := private.ReloadTemplates(ctx)
return handleCliResponseExtra(extra) return handleCliResponseExtra(extra)
} }
@ -139,7 +139,7 @@ func runFlushQueues(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
extra := private.FlushQueues(ctx, c.Duration("timeout"), c.Bool("non-blocking")) extra := private.FlushQueues(ctx, c.Duration("timeout"), c.Bool("non-blocking"))
return handleCliResponseExtra(extra) return handleCliResponseExtra(extra)
} }
@ -148,7 +148,7 @@ func runProcesses(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
extra := private.Processes(ctx, os.Stdout, c.Bool("flat"), c.Bool("no-system"), c.Bool("stacktraces"), c.Bool("json"), c.String("cancel")) extra := private.Processes(ctx, os.Stdout, c.Bool("flat"), c.Bool("no-system"), c.Bool("stacktraces"), c.Bool("json"), c.String("cancel"))
return handleCliResponseExtra(extra) return handleCliResponseExtra(extra)
} }

View file

@ -8,8 +8,8 @@ import (
"fmt" "fmt"
"os" "os"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
@ -199,7 +199,7 @@ func runRemoveLogger(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
logger := c.String("logger") logger := c.String("logger")
if len(logger) == 0 { if len(logger) == 0 {
logger = log.DEFAULT logger = log.DEFAULT
@ -214,7 +214,7 @@ func runAddConnLogger(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
vals := map[string]any{} vals := map[string]any{}
mode := "conn" mode := "conn"
vals["net"] = "tcp" vals["net"] = "tcp"
@ -244,7 +244,7 @@ func runAddFileLogger(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
vals := map[string]any{} vals := map[string]any{}
mode := "file" mode := "file"
if c.IsSet("filename") { if c.IsSet("filename") {
@ -311,7 +311,7 @@ func runPauseLogging(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
userMsg := private.PauseLogging(ctx) userMsg := private.PauseLogging(ctx)
_, _ = fmt.Fprintln(os.Stdout, userMsg) _, _ = fmt.Fprintln(os.Stdout, userMsg)
return nil return nil
@ -321,7 +321,7 @@ func runResumeLogging(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
userMsg := private.ResumeLogging(ctx) userMsg := private.ResumeLogging(ctx)
_, _ = fmt.Fprintln(os.Stdout, userMsg) _, _ = fmt.Fprintln(os.Stdout, userMsg)
return nil return nil
@ -331,7 +331,7 @@ func runReleaseReopenLogging(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
userMsg := private.ReleaseReopenLogging(ctx) userMsg := private.ReleaseReopenLogging(ctx)
_, _ = fmt.Fprintln(os.Stdout, userMsg) _, _ = fmt.Fprintln(os.Stdout, userMsg)
return nil return nil
@ -340,7 +340,7 @@ func runReleaseReopenLogging(c *cli.Context) error {
func runSetLogSQL(c *cli.Context) error { func runSetLogSQL(c *cli.Context) error {
ctx, cancel := installSignals() ctx, cancel := installSignals()
defer cancel() defer cancel()
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), false)
extra := private.SetLogSQL(ctx, !c.Bool("off")) extra := private.SetLogSQL(ctx, !c.Bool("off"))
return handleCliResponseExtra(extra) return handleCliResponseExtra(extra)

View file

@ -6,10 +6,10 @@ package cmd
import ( import (
"context" "context"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/models/migrations" "forgejo.org/models/migrations"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )
@ -36,7 +36,13 @@ func runMigrate(ctx *cli.Context) error {
log.Info("Log path: %s", setting.Log.RootPath) log.Info("Log path: %s", setting.Log.RootPath)
log.Info("Configuration file: %s", setting.CustomConf) log.Info("Configuration file: %s", setting.CustomConf)
if err := db.InitEngineWithMigration(context.Background(), migrations.Migrate); err != nil { if err := db.InitEngineWithMigration(context.Background(), func(dbEngine db.Engine) error {
masterEngine, err := db.GetMasterEngine(dbEngine)
if err != nil {
return err
}
return migrations.Migrate(masterEngine)
}); err != nil {
log.Fatal("Failed to initialize ORM engine: %v", err) log.Fatal("Failed to initialize ORM engine: %v", err)
return err return err
} }

View file

@ -10,19 +10,20 @@ import (
"io/fs" "io/fs"
"strings" "strings"
actions_model "code.gitea.io/gitea/models/actions" actions_model "forgejo.org/models/actions"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
git_model "code.gitea.io/gitea/models/git" git_model "forgejo.org/models/git"
"code.gitea.io/gitea/models/migrations" "forgejo.org/models/migrations"
packages_model "code.gitea.io/gitea/models/packages" packages_model "forgejo.org/models/packages"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
packages_module "code.gitea.io/gitea/modules/packages" packages_module "forgejo.org/modules/packages"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/storage" "forgejo.org/modules/storage"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"xorm.io/xorm"
) )
// CmdMigrateStorage represents the available migrate storage sub-command. // CmdMigrateStorage represents the available migrate storage sub-command.
@ -195,7 +196,9 @@ func runMigrateStorage(ctx *cli.Context) error {
log.Info("Log path: %s", setting.Log.RootPath) log.Info("Log path: %s", setting.Log.RootPath)
log.Info("Configuration file: %s", setting.CustomConf) log.Info("Configuration file: %s", setting.CustomConf)
if err := db.InitEngineWithMigration(context.Background(), migrations.Migrate); err != nil { if err := db.InitEngineWithMigration(context.Background(), func(e db.Engine) error {
return migrations.Migrate(e.(*xorm.Engine))
}); err != nil {
log.Fatal("Failed to initialize ORM engine: %v", err) log.Fatal("Failed to initialize ORM engine: %v", err)
return err return err
} }

View file

@ -9,16 +9,16 @@ import (
"strings" "strings"
"testing" "testing"
"code.gitea.io/gitea/models/actions" "forgejo.org/models/actions"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/models/packages" "forgejo.org/models/packages"
"code.gitea.io/gitea/models/unittest" "forgejo.org/models/unittest"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
packages_module "code.gitea.io/gitea/modules/packages" packages_module "forgejo.org/modules/packages"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/storage" "forgejo.org/modules/storage"
"code.gitea.io/gitea/modules/test" "forgejo.org/modules/test"
packages_service "code.gitea.io/gitea/services/packages" packages_service "forgejo.org/services/packages"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@ -81,8 +81,8 @@ func TestMigratePackages(t *testing.T) {
entries, err := os.ReadDir(p) entries, err := os.ReadDir(p)
require.NoError(t, err) require.NoError(t, err)
assert.Len(t, entries, 2) assert.Len(t, entries, 2)
assert.EqualValues(t, "01", entries[0].Name()) assert.Equal(t, "01", entries[0].Name())
assert.EqualValues(t, "tmp", entries[1].Name()) assert.Equal(t, "tmp", entries[1].Name())
} }
func TestMigrateActionsArtifacts(t *testing.T) { func TestMigrateActionsArtifacts(t *testing.T) {

View file

@ -6,8 +6,8 @@ package cmd
import ( import (
"strings" "strings"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -18,18 +18,18 @@ import (
"time" "time"
"unicode" "unicode"
asymkey_model "code.gitea.io/gitea/models/asymkey" asymkey_model "forgejo.org/models/asymkey"
git_model "code.gitea.io/gitea/models/git" git_model "forgejo.org/models/git"
"code.gitea.io/gitea/models/perm" "forgejo.org/models/perm"
"code.gitea.io/gitea/modules/git" "forgejo.org/modules/git"
"code.gitea.io/gitea/modules/json" "forgejo.org/modules/json"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/pprof" "forgejo.org/modules/pprof"
"code.gitea.io/gitea/modules/private" "forgejo.org/modules/private"
"code.gitea.io/gitea/modules/process" "forgejo.org/modules/process"
repo_module "code.gitea.io/gitea/modules/repository" repo_module "forgejo.org/modules/repository"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/services/lfs" "forgejo.org/services/lfs"
"github.com/golang-jwt/jwt/v5" "github.com/golang-jwt/jwt/v5"
"github.com/kballard/go-shellquote" "github.com/kballard/go-shellquote"
@ -57,19 +57,22 @@ var CmdServ = &cli.Command{
}, },
} }
func setup(ctx context.Context, debug bool) { func setup(ctx context.Context, debug, gitNeeded bool) {
if debug { if debug {
setupConsoleLogger(log.TRACE, false, os.Stderr) setupConsoleLogger(log.TRACE, false, os.Stderr)
} else { } else {
setupConsoleLogger(log.FATAL, false, os.Stderr) setupConsoleLogger(log.FATAL, false, os.Stderr)
} }
setting.MustInstalled() setting.MustInstalled()
// Sanity check to ensure path is not relative, see: https://github.com/go-gitea/gitea/pull/19317
if _, err := os.Stat(setting.RepoRootPath); err != nil { if _, err := os.Stat(setting.RepoRootPath); err != nil {
_ = fail(ctx, "Unable to access repository path", "Unable to access repository path %q, err: %v", setting.RepoRootPath, err) _ = fail(ctx, "Unable to access repository path", "Unable to access repository path %q, err: %v", setting.RepoRootPath, err)
return return
} }
if err := git.InitSimple(context.Background()); err != nil { if gitNeeded {
_ = fail(ctx, "Failed to init git", "Failed to init git, err: %v", err) if err := git.InitSimple(context.Background()); err != nil {
_ = fail(ctx, "Failed to init git", "Failed to init git, err: %v", err)
}
} }
} }
@ -133,7 +136,7 @@ func runServ(c *cli.Context) error {
defer cancel() defer cancel()
// FIXME: This needs to internationalised // FIXME: This needs to internationalised
setup(ctx, c.Bool("debug")) setup(ctx, c.Bool("debug"), true)
if setting.SSH.Disabled { if setting.SSH.Disabled {
fmt.Println("Forgejo: SSH has been disabled") fmt.Println("Forgejo: SSH has been disabled")
@ -253,11 +256,12 @@ func runServ(c *cli.Context) error {
} }
if verb == lfsAuthenticateVerb { if verb == lfsAuthenticateVerb {
if lfsVerb == "upload" { switch lfsVerb {
case "upload":
requestedMode = perm.AccessModeWrite requestedMode = perm.AccessModeWrite
} else if lfsVerb == "download" { case "download":
requestedMode = perm.AccessModeRead requestedMode = perm.AccessModeRead
} else { default:
return fail(ctx, "Unknown LFS verb", "Unknown lfs verb %s", lfsVerb) return fail(ctx, "Unknown LFS verb", "Unknown lfs verb %s", lfsVerb)
} }
} }

View file

@ -16,14 +16,14 @@ import (
_ "net/http/pprof" // Used for debugging if enabled and a web server is running _ "net/http/pprof" // Used for debugging if enabled and a web server is running
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"code.gitea.io/gitea/modules/graceful" "forgejo.org/modules/graceful"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/process" "forgejo.org/modules/process"
"code.gitea.io/gitea/modules/public" "forgejo.org/modules/public"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/routers" "forgejo.org/routers"
"code.gitea.io/gitea/routers/install" "forgejo.org/routers/install"
"github.com/felixge/fgprof" "github.com/felixge/fgprof"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
@ -198,9 +198,6 @@ func serveInstalled(ctx *cli.Context) error {
for fn := range publicFilesSet.Seq() { for fn := range publicFilesSet.Seq() {
log.Error("Found legacy public asset %q in CustomPath. Please move it to %s/public/assets/%s", fn, setting.CustomPath, fn) log.Error("Found legacy public asset %q in CustomPath. Please move it to %s/public/assets/%s", fn, setting.CustomPath, fn)
} }
if _, err := os.Stat(filepath.Join(setting.CustomPath, "robots.txt")); err == nil {
log.Error(`Found legacy public asset "robots.txt" in CustomPath. Please move it to %s/public/robots.txt`, setting.CustomPath)
}
routers.InitWebInstalled(graceful.GetManager().HammerContext()) routers.InitWebInstalled(graceful.GetManager().HammerContext())

View file

@ -12,10 +12,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"code.gitea.io/gitea/modules/graceful" "forgejo.org/modules/graceful"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/process" "forgejo.org/modules/process"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/caddyserver/certmagic" "github.com/caddyserver/certmagic"
) )
@ -54,8 +54,8 @@ func runACME(listenAddr string, m http.Handler) error {
altTLSALPNPort = p altTLSALPNPort = p
} }
magic := certmagic.NewDefault() certmagic.Default.Storage = &certmagic.FileStorage{Path: setting.AcmeLiveDirectory}
magic.Storage = &certmagic.FileStorage{Path: setting.AcmeLiveDirectory}
// Try to use private CA root if provided, otherwise defaults to system's trust // Try to use private CA root if provided, otherwise defaults to system's trust
var certPool *x509.CertPool var certPool *x509.CertPool
if setting.AcmeCARoot != "" { if setting.AcmeCARoot != "" {
@ -65,7 +65,8 @@ func runACME(listenAddr string, m http.Handler) error {
log.Warn("Failed to parse CA Root certificate, using default CA trust: %v", err) log.Warn("Failed to parse CA Root certificate, using default CA trust: %v", err)
} }
} }
myACME := certmagic.NewACMEIssuer(magic, certmagic.ACMEIssuer{
certmagic.DefaultACME = certmagic.ACMEIssuer{
CA: setting.AcmeURL, CA: setting.AcmeURL,
TrustedRoots: certPool, TrustedRoots: certPool,
Email: setting.AcmeEmail, Email: setting.AcmeEmail,
@ -75,7 +76,11 @@ func runACME(listenAddr string, m http.Handler) error {
ListenHost: setting.HTTPAddr, ListenHost: setting.HTTPAddr,
AltTLSALPNPort: altTLSALPNPort, AltTLSALPNPort: altTLSALPNPort,
AltHTTPPort: altHTTPPort, AltHTTPPort: altHTTPPort,
}) }
magic := certmagic.NewDefault()
myACME := certmagic.NewACMEIssuer(magic, certmagic.DefaultACME)
magic.Issuers = []certmagic.Issuer{myACME} magic.Issuers = []certmagic.Issuer{myACME}

View file

@ -9,9 +9,9 @@ import (
"net/http/fcgi" "net/http/fcgi"
"strings" "strings"
"code.gitea.io/gitea/modules/graceful" "forgejo.org/modules/graceful"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
) )
func runHTTP(network, listenAddr, name string, m http.Handler, useProxyProtocol bool) error { func runHTTP(network, listenAddr, name string, m http.Handler, useProxyProtocol bool) error {

View file

@ -9,9 +9,9 @@ import (
"os" "os"
"strings" "strings"
"code.gitea.io/gitea/modules/graceful" "forgejo.org/modules/graceful"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/klauspost/cpuid/v2" "github.com/klauspost/cpuid/v2"
) )

View file

@ -6,8 +6,8 @@ package main
import ( import (
"os" "os"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -1163,9 +1163,13 @@ LEVEL = Info
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Signing format that Forgejo should use, openpgp uses GPG and ssh uses OpenSSH.
;FORMAT = openpgp
;;
;; GPG key to use to sign commits, Defaults to the default - that is the value of git config --get user.signingkey ;; GPG key to use to sign commits, Defaults to the default - that is the value of git config --get user.signingkey
;; run in the context of the RUN_USER ;; run in the context of the RUN_USER
;; Switch to none to stop signing completely ;; Switch to none to stop signing completely.
;; If `FORMAT` is set to **ssh** this should be set to an absolute path to an public OpenSSH key.
;SIGNING_KEY = default ;SIGNING_KEY = default
;; ;;
;; If a SIGNING_KEY ID is provided and is not set to default, use the provided Name and Email address as the signer. ;; If a SIGNING_KEY ID is provided and is not set to default, use the provided Name and Email address as the signer.
@ -2408,7 +2412,7 @@ LEVEL = Info
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The first locale will be used as the default if user browser's language doesn't match any locale in the list. ;; The first locale will be used as the default if user browser's language doesn't match any locale in the list.
;LANGS = en-US,zh-CN,zh-HK,zh-TW,da,de-DE,nds,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg,it-IT,fi-FI,fil,eo,tr-TR,cs-CZ,sl,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID ;LANGS = en-US,zh-CN,zh-HK,zh-TW,da,de-DE,nds,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg,it-IT,fi-FI,fil,eo,tr-TR,cs-CZ,sl,sv-SE,ko-KR,el-GR,fa-IR,hu-HU,id-ID
;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Danish,Deutsch,Plattdüütsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Filipino,Esperanto,Türkçe,Čeština,Slovenščina,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia ;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Dansk,Deutsch,Plattdüütsch,Français,Nederlands,Latviešu,Русский,Українська,日本語,Español,Português do Brasil,Português de Portugal,Polski,Български,Italiano,Suomi,Filipino,Esperanto,Türkçe,Čeština,Slovenščina,Svenska,한국어,Ελληνικά,فارسی,Magyar nyelv,Bahasa Indonesia
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -2440,7 +2444,7 @@ LEVEL = Info
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Set the maximum number of characters in a mermaid source. (Set to -1 to disable limits) ;; Set the maximum number of characters in a mermaid source. (Set to -1 to disable limits)
;MERMAID_MAX_SOURCE_CHARACTERS = 5000 ;MERMAID_MAX_SOURCE_CHARACTERS = 50000
;; Set the maximum number of lines allowed for a filepreview. (Set to -1 to disable limits; set to 0 to disable the feature) ;; Set the maximum number of lines allowed for a filepreview. (Set to -1 to disable limits; set to 0 to disable the feature)
;FILEPREVIEW_MAX_LINES = 50 ;FILEPREVIEW_MAX_LINES = 50

View file

@ -31,6 +31,21 @@ if [ -e /data/ssh/ssh_host_ecdsa_cert ]; then
SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa_cert"} SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa_cert"}
fi fi
# In case someone wants to sign the `{keyname}.pub` key by `ssh-keygen -s ca -I identity ...` to
# make use of the ssh-key certificate authority feature (see ssh-keygen CERTIFICATES section),
# the generated key file name is `{keyname}-cert.pub`
if [ -e /data/ssh/ssh_host_ed25519_key-cert.pub ]; then
SSH_ED25519_CERT=${SSH_ED25519_CERT:-"/data/ssh/ssh_host_ed25519_key-cert.pub"}
fi
if [ -e /data/ssh/ssh_host_rsa_key-cert.pub ]; then
SSH_RSA_CERT=${SSH_RSA_CERT:-"/data/ssh/ssh_host_rsa_key-cert.pub"}
fi
if [ -e /data/ssh/ssh_host_ecdsa_key-cert.pub ]; then
SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa_key-cert.pub"}
fi
if [ -d /etc/ssh ]; then if [ -d /etc/ssh ]; then
SSH_PORT=${SSH_PORT:-"22"} \ SSH_PORT=${SSH_PORT:-"22"} \
SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \ SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \

View file

@ -318,8 +318,9 @@ export default tseslint.config(
'no-jquery/no-data': [0], 'no-jquery/no-data': [0],
'no-jquery/no-deferred': [2], 'no-jquery/no-deferred': [2],
'no-jquery/no-delegate': [2], 'no-jquery/no-delegate': [2],
'no-jquery/no-done-fail': [2],
'no-jquery/no-each-collection': [0], 'no-jquery/no-each-collection': [0],
'no-jquery/no-each-util': [0], 'no-jquery/no-each-util': [2],
'no-jquery/no-each': [0], 'no-jquery/no-each': [0],
'no-jquery/no-error-shorthand': [2], 'no-jquery/no-error-shorthand': [2],
'no-jquery/no-error': [2], 'no-jquery/no-error': [2],
@ -331,6 +332,7 @@ export default tseslint.config(
'no-jquery/no-find-collection': [0], 'no-jquery/no-find-collection': [0],
'no-jquery/no-find-util': [2], 'no-jquery/no-find-util': [2],
'no-jquery/no-find': [0], 'no-jquery/no-find': [0],
'no-jquery/no-fx': [2],
'no-jquery/no-fx-interval': [2], 'no-jquery/no-fx-interval': [2],
'no-jquery/no-global-eval': [2], 'no-jquery/no-global-eval': [2],
'no-jquery/no-global-selector': [0], 'no-jquery/no-global-selector': [0],
@ -350,7 +352,7 @@ export default tseslint.config(
'no-jquery/no-live': [2], 'no-jquery/no-live': [2],
'no-jquery/no-load-shorthand': [2], 'no-jquery/no-load-shorthand': [2],
'no-jquery/no-load': [2], 'no-jquery/no-load': [2],
'no-jquery/no-map-collection': [0], 'no-jquery/no-map-collection': [2],
'no-jquery/no-map-util': [2], 'no-jquery/no-map-util': [2],
'no-jquery/no-map': [2], 'no-jquery/no-map': [2],
'no-jquery/no-merge': [2], 'no-jquery/no-merge': [2],
@ -374,12 +376,12 @@ export default tseslint.config(
'no-jquery/no-selector-prop': [2], 'no-jquery/no-selector-prop': [2],
'no-jquery/no-serialize': [2], 'no-jquery/no-serialize': [2],
'no-jquery/no-size': [2], 'no-jquery/no-size': [2],
'no-jquery/no-sizzle': [0], 'no-jquery/no-sizzle': [2],
'no-jquery/no-slide': [2], 'no-jquery/no-slide': [2],
'no-jquery/no-sub': [2], 'no-jquery/no-sub': [2],
'no-jquery/no-support': [2], 'no-jquery/no-support': [2],
'no-jquery/no-text': [0], 'no-jquery/no-text': [0],
'no-jquery/no-trigger': [0], 'no-jquery/no-trigger': [2],
'no-jquery/no-trim': [2], 'no-jquery/no-trim': [2],
'no-jquery/no-type': [2], 'no-jquery/no-type': [2],
'no-jquery/no-unique': [2], 'no-jquery/no-unique': [2],

76
go.mod
View file

@ -1,8 +1,8 @@
module code.gitea.io/gitea module forgejo.org
go 1.24 go 1.24
toolchain go1.24.1 toolchain go1.24.2
require ( require (
code.forgejo.org/f3/gof3/v3 v3.10.6 code.forgejo.org/f3/gof3/v3 v3.10.6
@ -14,7 +14,7 @@ require (
code.forgejo.org/go-chi/captcha v1.0.1 code.forgejo.org/go-chi/captcha v1.0.1
code.forgejo.org/go-chi/session v1.0.1 code.forgejo.org/go-chi/session v1.0.1
code.gitea.io/actions-proto-go v0.4.0 code.gitea.io/actions-proto-go v0.4.0
code.gitea.io/sdk/gitea v0.20.0 code.gitea.io/sdk/gitea v0.21.0
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570
connectrpc.com/connect v1.17.0 connectrpc.com/connect v1.17.0
github.com/42wim/httpsig v1.2.2 github.com/42wim/httpsig v1.2.2
@ -23,11 +23,11 @@ require (
github.com/ProtonMail/go-crypto v1.1.6 github.com/ProtonMail/go-crypto v1.1.6
github.com/PuerkitoBio/goquery v1.10.2 github.com/PuerkitoBio/goquery v1.10.2
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2 github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2
github.com/alecthomas/chroma/v2 v2.15.0 github.com/alecthomas/chroma/v2 v2.16.0
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
github.com/blevesearch/bleve/v2 v2.4.4 github.com/blevesearch/bleve/v2 v2.5.0
github.com/buildkite/terminal-to-html/v3 v3.16.8 github.com/buildkite/terminal-to-html/v3 v3.16.8
github.com/caddyserver/certmagic v0.22.2 github.com/caddyserver/certmagic v0.23.0
github.com/chi-middleware/proxy v1.1.1 github.com/chi-middleware/proxy v1.1.1
github.com/djherbis/buffer v1.2.0 github.com/djherbis/buffer v1.2.0
github.com/djherbis/nio/v3 v3.0.1 github.com/djherbis/nio/v3 v3.0.1
@ -36,7 +36,7 @@ require (
github.com/editorconfig/editorconfig-core-go/v2 v2.6.3 github.com/editorconfig/editorconfig-core-go/v2 v2.6.3
github.com/emersion/go-imap v1.2.1 github.com/emersion/go-imap v1.2.1
github.com/felixge/fgprof v0.9.5 github.com/felixge/fgprof v0.9.5
github.com/fsnotify/fsnotify v1.8.0 github.com/fsnotify/fsnotify v1.9.0
github.com/gliderlabs/ssh v0.3.8 github.com/gliderlabs/ssh v0.3.8
github.com/go-ap/activitypub v0.0.0-20231114162308-e219254dc5c9 github.com/go-ap/activitypub v0.0.0-20231114162308-e219254dc5c9
github.com/go-ap/jsonld v0.0.0-20221030091449-f2a191312c73 github.com/go-ap/jsonld v0.0.0-20221030091449-f2a191312c73
@ -49,14 +49,14 @@ require (
github.com/go-openapi/spec v0.20.14 github.com/go-openapi/spec v0.20.14
github.com/go-sql-driver/mysql v1.9.1 github.com/go-sql-driver/mysql v1.9.1
github.com/go-testfixtures/testfixtures/v3 v3.14.0 github.com/go-testfixtures/testfixtures/v3 v3.14.0
github.com/go-webauthn/webauthn v0.12.2 github.com/go-webauthn/webauthn v0.12.3
github.com/gobwas/glob v0.2.3 github.com/gobwas/glob v0.2.3
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
github.com/golang-jwt/jwt/v5 v5.2.2 github.com/golang-jwt/jwt/v5 v5.2.2
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/google/go-github/v64 v64.0.0 github.com/google/go-github/v64 v64.0.0
github.com/google/pprof v0.0.0-20241017200806-017d972448fc github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e
github.com/google/uuid v1.6.0 github.com/google/uuid v1.6.0
github.com/gorilla/feeds v1.2.0 github.com/gorilla/feeds v1.2.0
github.com/gorilla/sessions v1.4.0 github.com/gorilla/sessions v1.4.0
@ -67,16 +67,16 @@ require (
github.com/jhillyerd/enmime/v2 v2.1.0 github.com/jhillyerd/enmime/v2 v2.1.0
github.com/json-iterator/go v1.1.12 github.com/json-iterator/go v1.1.12
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/klauspost/compress v1.17.11 github.com/klauspost/compress v1.18.0
github.com/klauspost/cpuid/v2 v2.2.10 github.com/klauspost/cpuid/v2 v2.2.10
github.com/lib/pq v1.10.9 github.com/lib/pq v1.10.9
github.com/markbates/goth v1.80.0 github.com/markbates/goth v1.80.0
github.com/mattn/go-isatty v0.0.20 github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-sqlite3 v1.14.24 github.com/mattn/go-sqlite3 v1.14.28
github.com/meilisearch/meilisearch-go v0.31.0 github.com/meilisearch/meilisearch-go v0.31.0
github.com/mholt/archiver/v3 v3.5.1 github.com/mholt/archiver/v3 v3.5.1
github.com/microcosm-cc/bluemonday v1.0.27 github.com/microcosm-cc/bluemonday v1.0.27
github.com/minio/minio-go/v7 v7.0.88 github.com/minio/minio-go/v7 v7.0.90
github.com/msteinert/pam/v2 v2.0.0 github.com/msteinert/pam/v2 v2.0.0
github.com/nektos/act v0.2.52 github.com/nektos/act v0.2.52
github.com/niklasfasching/go-org v1.7.0 github.com/niklasfasching/go-org v1.7.0
@ -100,14 +100,14 @@ require (
github.com/yuin/goldmark v1.7.8 github.com/yuin/goldmark v1.7.8
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
gitlab.com/gitlab-org/api/client-go v0.126.0 gitlab.com/gitlab-org/api/client-go v0.126.0
go.uber.org/mock v0.5.0 go.uber.org/mock v0.5.1
golang.org/x/crypto v0.36.0 golang.org/x/crypto v0.37.0
golang.org/x/image v0.25.0 golang.org/x/image v0.26.0
golang.org/x/net v0.37.0 golang.org/x/net v0.39.0
golang.org/x/oauth2 v0.28.0 golang.org/x/oauth2 v0.29.0
golang.org/x/sync v0.12.0 golang.org/x/sync v0.13.0
golang.org/x/sys v0.31.0 golang.org/x/sys v0.32.0
golang.org/x/text v0.23.0 golang.org/x/text v0.24.0
google.golang.org/protobuf v1.36.4 google.golang.org/protobuf v1.36.4
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/ini.v1 v1.67.0 gopkg.in/ini.v1 v1.67.0
@ -134,30 +134,30 @@ require (
github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0 // indirect github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/RoaringBitmap/roaring v1.9.3 // indirect github.com/RoaringBitmap/roaring/v2 v2.4.5 // indirect
github.com/andybalholm/brotli v1.1.1 // indirect github.com/andybalholm/brotli v1.1.1 // indirect
github.com/andybalholm/cascadia v1.3.3 // indirect github.com/andybalholm/cascadia v1.3.3 // indirect
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
github.com/aymerick/douceur v0.2.0 // indirect github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/bits-and-blooms/bitset v1.22.0 // indirect
github.com/blevesearch/bleve_index_api v1.1.12 // indirect github.com/blevesearch/bleve_index_api v1.2.7 // indirect
github.com/blevesearch/geo v0.1.20 // indirect github.com/blevesearch/geo v0.1.20 // indirect
github.com/blevesearch/go-faiss v1.0.24 // indirect github.com/blevesearch/go-faiss v1.0.25 // indirect
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
github.com/blevesearch/gtreap v0.1.1 // indirect github.com/blevesearch/gtreap v0.1.1 // indirect
github.com/blevesearch/mmap-go v1.0.4 // indirect github.com/blevesearch/mmap-go v1.0.4 // indirect
github.com/blevesearch/scorch_segment_api/v2 v2.2.16 // indirect github.com/blevesearch/scorch_segment_api/v2 v2.3.9 // indirect
github.com/blevesearch/segment v0.9.1 // indirect github.com/blevesearch/segment v0.9.1 // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect
github.com/blevesearch/vellum v1.0.10 // indirect github.com/blevesearch/vellum v1.1.0 // indirect
github.com/blevesearch/zapx/v11 v11.3.10 // indirect github.com/blevesearch/zapx/v11 v11.4.1 // indirect
github.com/blevesearch/zapx/v12 v12.3.10 // indirect github.com/blevesearch/zapx/v12 v12.4.1 // indirect
github.com/blevesearch/zapx/v13 v13.3.10 // indirect github.com/blevesearch/zapx/v13 v13.4.1 // indirect
github.com/blevesearch/zapx/v14 v14.3.10 // indirect github.com/blevesearch/zapx/v14 v14.4.1 // indirect
github.com/blevesearch/zapx/v15 v15.3.16 // indirect github.com/blevesearch/zapx/v15 v15.4.1 // indirect
github.com/blevesearch/zapx/v16 v16.1.9-0.20241217210638-a0519e7caf3b // indirect github.com/blevesearch/zapx/v16 v16.2.2 // indirect
github.com/boombuler/barcode v1.0.1 // indirect github.com/boombuler/barcode v1.0.1 // indirect
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect
github.com/caddyserver/zerossl v0.1.3 // indirect github.com/caddyserver/zerossl v0.1.3 // indirect
@ -170,14 +170,14 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidmz/go-pageant v1.0.2 // indirect github.com/davidmz/go-pageant v1.0.2 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dlclark/regexp2 v1.11.4 // indirect github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 // indirect github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 // indirect
github.com/emirpasic/gods v1.18.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/fatih/color v1.16.0 // indirect github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/fxamacker/cbor/v2 v2.8.0 // indirect
github.com/go-ap/errors v0.0.0-20231003111023-183eef4b31b7 // indirect github.com/go-ap/errors v0.0.0-20231003111023-183eef4b31b7 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
github.com/go-enry/go-oniguruma v1.2.1 // indirect github.com/go-enry/go-oniguruma v1.2.1 // indirect
@ -190,7 +190,7 @@ require (
github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.7 // indirect github.com/go-openapi/swag v0.22.7 // indirect
github.com/go-webauthn/x v0.1.19 // indirect github.com/go-webauthn/x v0.1.20 // indirect
github.com/goccy/go-json v0.10.5 // indirect github.com/goccy/go-json v0.10.5 // indirect
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 // indirect github.com/golang/geo v0.0.0-20230421003525-6adc56603217 // indirect
@ -214,12 +214,12 @@ require (
github.com/josharian/intern v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect github.com/klauspost/pgzip v1.2.6 // indirect
github.com/libdns/libdns v0.2.3 // indirect github.com/libdns/libdns v1.0.0-beta.1 // indirect
github.com/mailru/easyjson v0.9.0 // indirect github.com/mailru/easyjson v0.9.0 // indirect
github.com/markbates/going v1.0.3 // indirect github.com/markbates/going v1.0.3 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mholt/acmez/v3 v3.1.1 // indirect github.com/mholt/acmez/v3 v3.1.2 // indirect
github.com/miekg/dns v1.1.63 // indirect github.com/miekg/dns v1.1.63 // indirect
github.com/minio/crc64nvme v1.0.1 // indirect github.com/minio/crc64nvme v1.0.1 // indirect
github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/md5-simd v1.1.2 // indirect
@ -253,7 +253,7 @@ require (
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect github.com/zeebo/blake3 v0.2.4 // indirect
go.etcd.io/bbolt v1.3.9 // indirect go.etcd.io/bbolt v1.4.0 // indirect
go.opencensus.io v0.24.0 // indirect go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect go.opentelemetry.io/contrib/detectors/gcp v1.34.0 // indirect

149
go.sum
View file

@ -636,8 +636,8 @@ code.forgejo.org/go-chi/session v1.0.1 h1:RNkcJQZJBqlvJoIFXSth87b3kMFZLDBA18Vcit
code.forgejo.org/go-chi/session v1.0.1/go.mod h1:y69sjS984wc7k4xyu77yNE5HKeSlBoQW8VSGdsK7RAs= code.forgejo.org/go-chi/session v1.0.1/go.mod h1:y69sjS984wc7k4xyu77yNE5HKeSlBoQW8VSGdsK7RAs=
code.gitea.io/actions-proto-go v0.4.0 h1:OsPBPhodXuQnsspG1sQ4eRE1PeoZyofd7+i73zCwnsU= code.gitea.io/actions-proto-go v0.4.0 h1:OsPBPhodXuQnsspG1sQ4eRE1PeoZyofd7+i73zCwnsU=
code.gitea.io/actions-proto-go v0.4.0/go.mod h1:mn7Wkqz6JbnTOHQpot3yDeHx+O5C9EGhMEE+htvHBas= code.gitea.io/actions-proto-go v0.4.0/go.mod h1:mn7Wkqz6JbnTOHQpot3yDeHx+O5C9EGhMEE+htvHBas=
code.gitea.io/sdk/gitea v0.20.0 h1:Zm/QDwwZK1awoM4AxdjeAQbxolzx2rIP8dDfmKu+KoU= code.gitea.io/sdk/gitea v0.21.0 h1:69n6oz6kEVHRo1+APQQyizkhrZrLsTLXey9142pfkD4=
code.gitea.io/sdk/gitea v0.20.0/go.mod h1:faouBHC/zyx5wLgjmRKR62ydyvMzwWf3QnU0bH7Cw6U= code.gitea.io/sdk/gitea v0.21.0/go.mod h1:tnBjVhuKJCn8ibdyyhvUyxrR1Ca2KHEoTWoukNhXQPA=
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 h1:TXbikPqa7YRtfU9vS6QJBg77pUvbEb6StRdZO8t1bEY= codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570 h1:TXbikPqa7YRtfU9vS6QJBg77pUvbEb6StRdZO8t1bEY=
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570/go.mod h1:IIAjsijsd8q1isWX8MACefDEgTQslQ4stk2AeeTt3kM= codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570/go.mod h1:IIAjsijsd8q1isWX8MACefDEgTQslQ4stk2AeeTt3kM=
connectrpc.com/connect v1.17.0 h1:W0ZqMhtVzn9Zhn2yATuUokDLO5N+gIuBWMOnsQrfmZk= connectrpc.com/connect v1.17.0 h1:W0ZqMhtVzn9Zhn2yATuUokDLO5N+gIuBWMOnsQrfmZk=
@ -680,8 +680,8 @@ github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNx
github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/PuerkitoBio/goquery v1.10.2 h1:7fh2BdHcG6VFZsK7toXBT/Bh1z5Wmy8Q9MV9HqT2AM8= github.com/PuerkitoBio/goquery v1.10.2 h1:7fh2BdHcG6VFZsK7toXBT/Bh1z5Wmy8Q9MV9HqT2AM8=
github.com/PuerkitoBio/goquery v1.10.2/go.mod h1:0guWGjcLu9AYC7C1GHnpysHy056u9aEkUHwhdnePMCU= github.com/PuerkitoBio/goquery v1.10.2/go.mod h1:0guWGjcLu9AYC7C1GHnpysHy056u9aEkUHwhdnePMCU=
github.com/RoaringBitmap/roaring v1.9.3 h1:t4EbC5qQwnisr5PrP9nt0IRhRTb9gMUgQF4t4S2OByM= github.com/RoaringBitmap/roaring/v2 v2.4.5 h1:uGrrMreGjvAtTBobc0g5IrW1D5ldxDQYe2JW2gggRdg=
github.com/RoaringBitmap/roaring v1.9.3/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= github.com/RoaringBitmap/roaring/v2 v2.4.5/go.mod h1:FiJcsfkGje/nZBZgCu0ZxCPOKD/hVXDS2dXi7/eUFE0=
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2 h1:cSXom2MoKJ9KPPw29RoZtHvUETY4F4n/kXl8m9btnQ0= github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2 h1:cSXom2MoKJ9KPPw29RoZtHvUETY4F4n/kXl8m9btnQ0=
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2/go.mod h1:JitQWJ8JuV4Y87l8VsHiiwhb3cgdyn68mX40s7NT6PA= github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2/go.mod h1:JitQWJ8JuV4Y87l8VsHiiwhb3cgdyn68mX40s7NT6PA=
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY=
@ -691,8 +691,8 @@ github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGW
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs= github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs=
github.com/alecthomas/chroma/v2 v2.15.0 h1:LxXTQHFoYrstG2nnV9y2X5O94sOBzf0CIUpSTbpxvMc= github.com/alecthomas/chroma/v2 v2.16.0 h1:QC5ZMizk67+HzxFDjQ4ASjni5kWBTGiigRG1u23IGvA=
github.com/alecthomas/chroma/v2 v2.15.0/go.mod h1:gUhVLrPDXPtp/f+L1jo9xepo9gL4eLwRuGAunSZMkio= github.com/alecthomas/chroma/v2 v2.16.0/go.mod h1:RVX6AvYm4VfYe/zsk7mjHueLDZor3aWCNE14TFlepBk=
github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
@ -717,46 +717,46 @@ github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd3
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4=
github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb h1:m935MPodAbYS46DG4pJSv7WO+VECIWUQ7OJYSoTrMh4= github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb h1:m935MPodAbYS46DG4pJSv7WO+VECIWUQ7OJYSoTrMh4=
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI=
github.com/blevesearch/bleve/v2 v2.4.4 h1:RwwLGjUm54SwyyykbrZs4vc1qjzYic4ZnAnY9TwNl60= github.com/blevesearch/bleve/v2 v2.5.0 h1:HzYqBy/5/M9Ul9ESEmXzN/3Jl7YpmWBdHM/+zzv/3k4=
github.com/blevesearch/bleve/v2 v2.4.4/go.mod h1:fa2Eo6DP7JR+dMFpQe+WiZXINKSunh7WBtlDGbolKXk= github.com/blevesearch/bleve/v2 v2.5.0/go.mod h1:PcJzTPnEynO15dCf9isxOga7YFRa/cMSsbnRwnszXUk=
github.com/blevesearch/bleve_index_api v1.1.12 h1:P4bw9/G/5rulOF7SJ9l4FsDoo7UFJ+5kexNy1RXfegY= github.com/blevesearch/bleve_index_api v1.2.7 h1:c8r9vmbaYQroAMSGag7zq5gEVPiuXrUQDqfnj7uYZSY=
github.com/blevesearch/bleve_index_api v1.1.12/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8= github.com/blevesearch/bleve_index_api v1.2.7/go.mod h1:rKQDl4u51uwafZxFrPD1R7xFOwKnzZW7s/LSeK4lgo0=
github.com/blevesearch/geo v0.1.20 h1:paaSpu2Ewh/tn5DKn/FB5SzvH0EWupxHEIwbCk/QPqM= github.com/blevesearch/geo v0.1.20 h1:paaSpu2Ewh/tn5DKn/FB5SzvH0EWupxHEIwbCk/QPqM=
github.com/blevesearch/geo v0.1.20/go.mod h1:DVG2QjwHNMFmjo+ZgzrIq2sfCh6rIHzy9d9d0B59I6w= github.com/blevesearch/geo v0.1.20/go.mod h1:DVG2QjwHNMFmjo+ZgzrIq2sfCh6rIHzy9d9d0B59I6w=
github.com/blevesearch/go-faiss v1.0.24 h1:K79IvKjoKHdi7FdiXEsAhxpMuns0x4fM0BO93bW5jLI= github.com/blevesearch/go-faiss v1.0.25 h1:lel1rkOUGbT1CJ0YgzKwC7k+XH0XVBHnCVWahdCXk4U=
github.com/blevesearch/go-faiss v1.0.24/go.mod h1:OMGQwOaRRYxrmeNdMrXJPvVx8gBnvE5RYrr0BahNnkk= github.com/blevesearch/go-faiss v1.0.25/go.mod h1:OMGQwOaRRYxrmeNdMrXJPvVx8gBnvE5RYrr0BahNnkk=
github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo=
github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M=
github.com/blevesearch/gtreap v0.1.1 h1:2JWigFrzDMR+42WGIN/V2p0cUvn4UP3C4Q5nmaZGW8Y= github.com/blevesearch/gtreap v0.1.1 h1:2JWigFrzDMR+42WGIN/V2p0cUvn4UP3C4Q5nmaZGW8Y=
github.com/blevesearch/gtreap v0.1.1/go.mod h1:QaQyDRAT51sotthUWAH4Sj08awFSSWzgYICSZ3w0tYk= github.com/blevesearch/gtreap v0.1.1/go.mod h1:QaQyDRAT51sotthUWAH4Sj08awFSSWzgYICSZ3w0tYk=
github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc= github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc=
github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs= github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs=
github.com/blevesearch/scorch_segment_api/v2 v2.2.16 h1:uGvKVvG7zvSxCwcm4/ehBa9cCEuZVE+/zvrSl57QUVY= github.com/blevesearch/scorch_segment_api/v2 v2.3.9 h1:X6nJXnNHl7nasXW+U6y2Ns2Aw8F9STszkYkyBfQ+p0o=
github.com/blevesearch/scorch_segment_api/v2 v2.2.16/go.mod h1:VF5oHVbIFTu+znY1v30GjSpT5+9YFs9dV2hjvuh34F0= github.com/blevesearch/scorch_segment_api/v2 v2.3.9/go.mod h1:IrzspZlVjhf4X29oJiEhBxEteTqOY9RlYlk1lCmYHr4=
github.com/blevesearch/segment v0.9.1 h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU= github.com/blevesearch/segment v0.9.1 h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU=
github.com/blevesearch/segment v0.9.1/go.mod h1:zN21iLm7+GnBHWTao9I+Au/7MBiL8pPFtJBJTsk6kQw= github.com/blevesearch/segment v0.9.1/go.mod h1:zN21iLm7+GnBHWTao9I+Au/7MBiL8pPFtJBJTsk6kQw=
github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s= github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s=
github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs=
github.com/blevesearch/upsidedown_store_api v1.0.2 h1:U53Q6YoWEARVLd1OYNc9kvhBMGZzVrdmaozG2MfoB+A= github.com/blevesearch/upsidedown_store_api v1.0.2 h1:U53Q6YoWEARVLd1OYNc9kvhBMGZzVrdmaozG2MfoB+A=
github.com/blevesearch/upsidedown_store_api v1.0.2/go.mod h1:M01mh3Gpfy56Ps/UXHjEO/knbqyQ1Oamg8If49gRwrQ= github.com/blevesearch/upsidedown_store_api v1.0.2/go.mod h1:M01mh3Gpfy56Ps/UXHjEO/knbqyQ1Oamg8If49gRwrQ=
github.com/blevesearch/vellum v1.0.10 h1:HGPJDT2bTva12hrHepVT3rOyIKFFF4t7Gf6yMxyMIPI= github.com/blevesearch/vellum v1.1.0 h1:CinkGyIsgVlYf8Y2LUQHvdelgXr6PYuvoDIajq6yR9w=
github.com/blevesearch/vellum v1.0.10/go.mod h1:ul1oT0FhSMDIExNjIxHqJoGpVrBpKCdgDQNxfqgJt7k= github.com/blevesearch/vellum v1.1.0/go.mod h1:QgwWryE8ThtNPxtgWJof5ndPfx0/YMBh+W2weHKPw8Y=
github.com/blevesearch/zapx/v11 v11.3.10 h1:hvjgj9tZ9DeIqBCxKhi70TtSZYMdcFn7gDb71Xo/fvk= github.com/blevesearch/zapx/v11 v11.4.1 h1:qFCPlFbsEdwbbckJkysptSQOsHn4s6ZOHL5GMAIAVHA=
github.com/blevesearch/zapx/v11 v11.3.10/go.mod h1:0+gW+FaE48fNxoVtMY5ugtNHHof/PxCqh7CnhYdnMzQ= github.com/blevesearch/zapx/v11 v11.4.1/go.mod h1:qNOGxIqdPC1MXauJCD9HBG487PxviTUUbmChFOAosGs=
github.com/blevesearch/zapx/v12 v12.3.10 h1:yHfj3vXLSYmmsBleJFROXuO08mS3L1qDCdDK81jDl8s= github.com/blevesearch/zapx/v12 v12.4.1 h1:K77bhypII60a4v8mwvav7r4IxWA8qxhNjgF9xGdb9eQ=
github.com/blevesearch/zapx/v12 v12.3.10/go.mod h1:0yeZg6JhaGxITlsS5co73aqPtM04+ycnI6D1v0mhbCs= github.com/blevesearch/zapx/v12 v12.4.1/go.mod h1:QRPrlPOzAxBNMI0MkgdD+xsTqx65zbuPr3Ko4Re49II=
github.com/blevesearch/zapx/v13 v13.3.10 h1:0KY9tuxg06rXxOZHg3DwPJBjniSlqEgVpxIqMGahDE8= github.com/blevesearch/zapx/v13 v13.4.1 h1:EnkEMZFUK0lsW/jOJJF2xOcp+W8TjEsyeN5BeAZEYYE=
github.com/blevesearch/zapx/v13 v13.3.10/go.mod h1:w2wjSDQ/WBVeEIvP0fvMJZAzDwqwIEzVPnCPrz93yAk= github.com/blevesearch/zapx/v13 v13.4.1/go.mod h1:e6duBMlCvgbH9rkzNMnUa9hRI9F7ri2BRcHfphcmGn8=
github.com/blevesearch/zapx/v14 v14.3.10 h1:SG6xlsL+W6YjhX5N3aEiL/2tcWh3DO75Bnz77pSwwKU= github.com/blevesearch/zapx/v14 v14.4.1 h1:G47kGCshknBZzZAtjcnIAMn3oNx8XBLxp8DMq18ogyE=
github.com/blevesearch/zapx/v14 v14.3.10/go.mod h1:qqyuR0u230jN1yMmE4FIAuCxmahRQEOehF78m6oTgns= github.com/blevesearch/zapx/v14 v14.4.1/go.mod h1:O7sDxiaL2r2PnCXbhh1Bvm7b4sP+jp4unE9DDPWGoms=
github.com/blevesearch/zapx/v15 v15.3.16 h1:Ct3rv7FUJPfPk99TI/OofdC+Kpb4IdyfdMH48sb+FmE= github.com/blevesearch/zapx/v15 v15.4.1 h1:B5IoTMUCEzFdc9FSQbhVOxAY+BO17c05866fNruiI7g=
github.com/blevesearch/zapx/v15 v15.3.16/go.mod h1:Turk/TNRKj9es7ZpKK95PS7f6D44Y7fAFy8F4LXQtGg= github.com/blevesearch/zapx/v15 v15.4.1/go.mod h1:b/MreHjYeQoLjyY2+UaM0hGZZUajEbE0xhnr1A2/Q6Y=
github.com/blevesearch/zapx/v16 v16.1.9-0.20241217210638-a0519e7caf3b h1:ju9Az5YgrzCeK3M1QwvZIpxYhChkXp7/L0RhDYsxXoE= github.com/blevesearch/zapx/v16 v16.2.2 h1:MifKJVRTEhMTgSlle2bDRTb39BGc9jXFRLPZc6r0Rzk=
github.com/blevesearch/zapx/v16 v16.1.9-0.20241217210638-a0519e7caf3b/go.mod h1:BlrYNpOu4BvVRslmIG+rLtKhmjIaRhIbG8sb9scGTwI= github.com/blevesearch/zapx/v16 v16.2.2/go.mod h1:B9Pk4G1CqtErgQV9DyCSA9Lb7WZe4olYfGw7fVDZ4sk=
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs= github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs=
@ -769,8 +769,8 @@ github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/buildkite/terminal-to-html/v3 v3.16.8 h1:QN/daUob6cmK8GcdKnwn9+YTlPr1vNj+oeAIiJK6fPc= github.com/buildkite/terminal-to-html/v3 v3.16.8 h1:QN/daUob6cmK8GcdKnwn9+YTlPr1vNj+oeAIiJK6fPc=
github.com/buildkite/terminal-to-html/v3 v3.16.8/go.mod h1:+k1KVKROZocrTLsEQ9PEf9A+8+X8uaVV5iO1ZIOwKYM= github.com/buildkite/terminal-to-html/v3 v3.16.8/go.mod h1:+k1KVKROZocrTLsEQ9PEf9A+8+X8uaVV5iO1ZIOwKYM=
github.com/caddyserver/certmagic v0.22.2 h1:qzZURXlrxwR5m25/jpvVeEyJHeJJMvAwe5zlMufOTQk= github.com/caddyserver/certmagic v0.23.0 h1:CfpZ/50jMfG4+1J/u2LV6piJq4HOfO6ppOnOf7DkFEU=
github.com/caddyserver/certmagic v0.22.2/go.mod h1:hbqE7BnkjhX5IJiFslPmrSeobSeZvI6ux8tyxhsd6qs= github.com/caddyserver/certmagic v0.23.0/go.mod h1:9mEZIWqqWoI+Gf+4Trh04MOVPD0tGSxtqsxg87hAIH4=
github.com/caddyserver/zerossl v0.1.3 h1:onS+pxp3M8HnHpN5MMbOMyNjmTheJyWRaZYwn+YTAyA= github.com/caddyserver/zerossl v0.1.3 h1:onS+pxp3M8HnHpN5MMbOMyNjmTheJyWRaZYwn+YTAyA=
github.com/caddyserver/zerossl v0.1.3/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4= github.com/caddyserver/zerossl v0.1.3/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@ -835,8 +835,8 @@ github.com/djherbis/nio/v3 v3.0.1/go.mod h1:Ng4h80pbZFMla1yKzm61cF0tqqilXZYrogmW
github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo= github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s=
github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4= github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 h1:2tV76y6Q9BB+NEBasnqvs7e49aEBFI8ejC89PSnWH+4=
@ -893,10 +893,10 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-ap/activitypub v0.0.0-20231114162308-e219254dc5c9 h1:j2TrkUG/NATGi/EQS+MvEoF79CxiRUmT16ErFroNcKI= github.com/go-ap/activitypub v0.0.0-20231114162308-e219254dc5c9 h1:j2TrkUG/NATGi/EQS+MvEoF79CxiRUmT16ErFroNcKI=
github.com/go-ap/activitypub v0.0.0-20231114162308-e219254dc5c9/go.mod h1:cJ9Ye0ZNSMN7RzZDBRY3E+8M3Bpf/R1JX22Ir9yX6WI= github.com/go-ap/activitypub v0.0.0-20231114162308-e219254dc5c9/go.mod h1:cJ9Ye0ZNSMN7RzZDBRY3E+8M3Bpf/R1JX22Ir9yX6WI=
@ -967,10 +967,10 @@ github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U=
github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/go-testfixtures/testfixtures/v3 v3.14.0 h1:aRt5qyH2XjzFgCC5NizNs6QrzjO7rC4pQZ1oJpPIdo8= github.com/go-testfixtures/testfixtures/v3 v3.14.0 h1:aRt5qyH2XjzFgCC5NizNs6QrzjO7rC4pQZ1oJpPIdo8=
github.com/go-testfixtures/testfixtures/v3 v3.14.0/go.mod h1:HHb6Yd8spzm6aFZU6jwBj9qFvVUNNkx5nGbjG4UHeOE= github.com/go-testfixtures/testfixtures/v3 v3.14.0/go.mod h1:HHb6Yd8spzm6aFZU6jwBj9qFvVUNNkx5nGbjG4UHeOE=
github.com/go-webauthn/webauthn v0.12.2 h1:yLaNPgBUEXDQtWnOjhsGhMMCEWbXwjg/aNkC8riJQI8= github.com/go-webauthn/webauthn v0.12.3 h1:hHQl1xkUuabUU9uS+ISNCMLs9z50p9mDUZI/FmkayNE=
github.com/go-webauthn/webauthn v0.12.2/go.mod h1:Q8SZPPj4sZ469fNTcQXxRpzJOdb30jQrn/36FX8jilA= github.com/go-webauthn/webauthn v0.12.3/go.mod h1:4JRe8Z3W7HIw8NGEWn2fnUwecoDzkkeach/NnvhkqGY=
github.com/go-webauthn/x v0.1.19 h1:IUfdHiBRoTdujpBA/14qbrMXQ3LGzYe/PRGWdZcmudg= github.com/go-webauthn/x v0.1.20 h1:brEBDqfiPtNNCdS/peu8gARtq8fIPsHz0VzpPjGvgiw=
github.com/go-webauthn/x v0.1.19/go.mod h1:C5arLuTQ3pVHKPw89v7CDGnqAZSZJj+4Jnr40dsn7tk= github.com/go-webauthn/x v0.1.20/go.mod h1:n/gAc8ssZJGATM0qThE+W+vfgXiMedsWi3wf/C4lld0=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
@ -1091,8 +1091,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
github.com/google/pprof v0.0.0-20241017200806-017d972448fc h1:NGyrhhFhwvRAZg02jnYVg3GBQy0qGBKmFQJwaPmpmxs= github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs=
github.com/google/pprof v0.0.0-20241017200806-017d972448fc/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM=
github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA=
@ -1203,8 +1203,8 @@ github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
@ -1228,8 +1228,8 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/libdns/libdns v0.2.3 h1:ba30K4ObwMGB/QTmqUxf3H4/GmUrCAIkMWejeGl12v8= github.com/libdns/libdns v1.0.0-beta.1 h1:KIf4wLfsrEpXpZ3vmc/poM8zCATXT2klbdPe6hyOBjQ=
github.com/libdns/libdns v0.2.3/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ= github.com/libdns/libdns v1.0.0-beta.1/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0 h1:F/3FfGmKdiKFa8kL3YrpZ7pe9H4l4AzA1pbaOUnRvPI= github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0 h1:F/3FfGmKdiKFa8kL3YrpZ7pe9H4l4AzA1pbaOUnRvPI=
github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0/go.mod h1:JEfTc3+2DF9Z4PXhLLvXL42zexJyh8rIq3OzUj/0rAk= github.com/lunny/vfsgen v0.0.0-20220105142115-2c99e1ffdfa0/go.mod h1:JEfTc3+2DF9Z4PXhLLvXL42zexJyh8rIq3OzUj/0rAk=
github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA=
@ -1252,12 +1252,12 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM= github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A=
github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/meilisearch/meilisearch-go v0.31.0 h1:yZRhY1qJqdH8h6GFZALGtkDLyj8f9v5aJpsNMyrUmnY= github.com/meilisearch/meilisearch-go v0.31.0 h1:yZRhY1qJqdH8h6GFZALGtkDLyj8f9v5aJpsNMyrUmnY=
github.com/meilisearch/meilisearch-go v0.31.0/go.mod h1:aNtyuwurDg/ggxQIcKqWH6G9g2ptc8GyY7PLY4zMn/g= github.com/meilisearch/meilisearch-go v0.31.0/go.mod h1:aNtyuwurDg/ggxQIcKqWH6G9g2ptc8GyY7PLY4zMn/g=
github.com/mholt/acmez/v3 v3.1.1 h1:Jh+9uKHkPxUJdxM16q5mOr+G2V0aqkuFtNA28ihCxhQ= github.com/mholt/acmez/v3 v3.1.2 h1:auob8J/0FhmdClQicvJvuDavgd5ezwLBfKuYmynhYzc=
github.com/mholt/acmez/v3 v3.1.1/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ= github.com/mholt/acmez/v3 v3.1.2/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY= github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY=
@ -1268,8 +1268,8 @@ github.com/minio/crc64nvme v1.0.1 h1:DHQPrYPdqK7jQG/Ls5CTBZWeex/2FMS3G5XGkycuFrY
github.com/minio/crc64nvme v1.0.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg= github.com/minio/crc64nvme v1.0.1/go.mod h1:eVfm2fAzLlxMdUGc0EEBGSMmPwmXD5XiNRpnu9J3bvg=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.88 h1:v8MoIJjwYxOkehp+eiLIuvXk87P2raUtoU5klrAAshs= github.com/minio/minio-go/v7 v7.0.90 h1:TmSj1083wtAD0kEYTx7a5pFsv3iRYMsOJ6A4crjA1lE=
github.com/minio/minio-go/v7 v7.0.88/go.mod h1:33+O8h0tO7pCeCWwBVa07RhVVfB/3vS4kEX7rwYKmIg= github.com/minio/minio-go/v7 v7.0.90/go.mod h1:uvMUcGrpgeSAAI6+sD3818508nUyMULw94j2Nxku/Go=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@ -1454,8 +1454,8 @@ github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
gitlab.com/gitlab-org/api/client-go v0.126.0 h1:VV5TdkF6pMbEdFGvbR2CwEgJwg6qdg1u3bj5eD2tiWk= gitlab.com/gitlab-org/api/client-go v0.126.0 h1:VV5TdkF6pMbEdFGvbR2CwEgJwg6qdg1u3bj5eD2tiWk=
gitlab.com/gitlab-org/api/client-go v0.126.0/go.mod h1:bYC6fPORKSmtuPRyD9Z2rtbAjE7UeNatu2VWHRf4/LE= gitlab.com/gitlab-org/api/client-go v0.126.0/go.mod h1:bYC6fPORKSmtuPRyD9Z2rtbAjE7UeNatu2VWHRf4/LE=
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= go.etcd.io/bbolt v1.4.0 h1:TU77id3TnN/zKr7CO/uk+fBCwF2jGcMuw2B/FMAzYIk=
go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/bbolt v1.4.0/go.mod h1:AsD+OCi/qPN1giOX1aiLAha3o1U8rAz65bvN4j0sRuk=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
@ -1491,8 +1491,8 @@ go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= go.uber.org/mock v0.5.1 h1:ASgazW/qBmR+A32MYFDB6E2POoTgOwT509VP0CT/fjs=
go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/mock v0.5.1/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
@ -1514,8 +1514,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@ -1546,8 +1546,8 @@ golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeap
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM=
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ= golang.org/x/image v0.26.0 h1:4XjIFEZWQmCZi6Wv8BoxsDhRU3RVnLX04dToTDAEPlY=
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= golang.org/x/image v0.26.0/go.mod h1:lcxbMFAovzpnJxzXS3nyL83K27tmqtKzIJpctK8YO5c=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@ -1647,8 +1647,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1678,8 +1678,8 @@ golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec
golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I=
golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw=
golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98=
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -1700,8 +1700,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -1793,8 +1793,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@ -1809,8 +1809,8 @@ golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o=
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -1831,8 +1831,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -2215,6 +2215,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

16
main.go
View file

@ -10,16 +10,16 @@ import (
"strings" "strings"
"time" "time"
"code.gitea.io/gitea/cmd" "forgejo.org/cmd"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
// register supported doc types // register supported doc types
_ "code.gitea.io/gitea/modules/markup/asciicast" _ "forgejo.org/modules/markup/asciicast"
_ "code.gitea.io/gitea/modules/markup/console" _ "forgejo.org/modules/markup/console"
_ "code.gitea.io/gitea/modules/markup/csv" _ "forgejo.org/modules/markup/csv"
_ "code.gitea.io/gitea/modules/markup/markdown" _ "forgejo.org/modules/markup/markdown"
_ "code.gitea.io/gitea/modules/markup/orgmode" _ "forgejo.org/modules/markup/orgmode"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
) )

View file

@ -11,9 +11,9 @@ import (
"errors" "errors"
"time" "time"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"xorm.io/builder" "xorm.io/builder"
) )

View file

@ -7,9 +7,9 @@ import (
"crypto/subtle" "crypto/subtle"
"fmt" "fmt"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
gouuid "github.com/google/uuid" gouuid "github.com/google/uuid"
) )

View file

@ -6,9 +6,9 @@ import (
"crypto/subtle" "crypto/subtle"
"testing" "testing"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/models/unittest" "forgejo.org/models/unittest"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@ -24,9 +24,9 @@ func TestActions_RegisterRunner_Token(t *testing.T) {
version := "v1.2.3" version := "v1.2.3"
runner, err := RegisterRunner(db.DefaultContext, ownerID, repoID, token, &labels, name, version) runner, err := RegisterRunner(db.DefaultContext, ownerID, repoID, token, &labels, name, version)
require.NoError(t, err) require.NoError(t, err)
assert.EqualValues(t, name, runner.Name) assert.Equal(t, name, runner.Name)
assert.EqualValues(t, 1, subtle.ConstantTimeCompare([]byte(runner.TokenHash), []byte(auth_model.HashToken(token, runner.TokenSalt))), "the token cannot be verified with the same method as routers/api/actions/runner/interceptor.go as of 8228751c55d6a4263f0fec2932ca16181c09c97d") assert.Equal(t, 1, subtle.ConstantTimeCompare([]byte(runner.TokenHash), []byte(auth_model.HashToken(token, runner.TokenSalt))), "the token cannot be verified with the same method as routers/api/actions/runner/interceptor.go as of 8228751c55d6a4263f0fec2932ca16181c09c97d")
} }
// TestActions_RegisterRunner_TokenUpdate tests that a token's secret is updated // TestActions_RegisterRunner_TokenUpdate tests that a token's secret is updated
@ -73,19 +73,19 @@ func TestActions_RegisterRunner_CreateWithLabels(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
// Check that the returned record has been updated, except for the labels // Check that the returned record has been updated, except for the labels
assert.EqualValues(t, ownerID, runner.OwnerID) assert.Equal(t, ownerID, runner.OwnerID)
assert.EqualValues(t, repoID, runner.RepoID) assert.Equal(t, repoID, runner.RepoID)
assert.EqualValues(t, name, runner.Name) assert.Equal(t, name, runner.Name)
assert.EqualValues(t, version, runner.Version) assert.Equal(t, version, runner.Version)
assert.EqualValues(t, labelsCopy, runner.AgentLabels) assert.Equal(t, labelsCopy, runner.AgentLabels)
// Check that whatever is in the DB has been updated, except for the labels // Check that whatever is in the DB has been updated, except for the labels
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: runner.ID}) after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: runner.ID})
assert.EqualValues(t, ownerID, after.OwnerID) assert.Equal(t, ownerID, after.OwnerID)
assert.EqualValues(t, repoID, after.RepoID) assert.Equal(t, repoID, after.RepoID)
assert.EqualValues(t, name, after.Name) assert.Equal(t, name, after.Name)
assert.EqualValues(t, version, after.Version) assert.Equal(t, version, after.Version)
assert.EqualValues(t, labelsCopy, after.AgentLabels) assert.Equal(t, labelsCopy, after.AgentLabels)
} }
func TestActions_RegisterRunner_CreateWithoutLabels(t *testing.T) { func TestActions_RegisterRunner_CreateWithoutLabels(t *testing.T) {
@ -100,19 +100,19 @@ func TestActions_RegisterRunner_CreateWithoutLabels(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
// Check that the returned record has been updated, except for the labels // Check that the returned record has been updated, except for the labels
assert.EqualValues(t, ownerID, runner.OwnerID) assert.Equal(t, ownerID, runner.OwnerID)
assert.EqualValues(t, repoID, runner.RepoID) assert.Equal(t, repoID, runner.RepoID)
assert.EqualValues(t, name, runner.Name) assert.Equal(t, name, runner.Name)
assert.EqualValues(t, version, runner.Version) assert.Equal(t, version, runner.Version)
assert.EqualValues(t, []string{}, runner.AgentLabels) assert.Equal(t, []string{}, runner.AgentLabels)
// Check that whatever is in the DB has been updated, except for the labels // Check that whatever is in the DB has been updated, except for the labels
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: runner.ID}) after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: runner.ID})
assert.EqualValues(t, ownerID, after.OwnerID) assert.Equal(t, ownerID, after.OwnerID)
assert.EqualValues(t, repoID, after.RepoID) assert.Equal(t, repoID, after.RepoID)
assert.EqualValues(t, name, after.Name) assert.Equal(t, name, after.Name)
assert.EqualValues(t, version, after.Version) assert.Equal(t, version, after.Version)
assert.EqualValues(t, []string{}, after.AgentLabels) assert.Equal(t, []string{}, after.AgentLabels)
} }
func TestActions_RegisterRunner_UpdateWithLabels(t *testing.T) { func TestActions_RegisterRunner_UpdateWithLabels(t *testing.T) {
@ -132,19 +132,19 @@ func TestActions_RegisterRunner_UpdateWithLabels(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
// Check that the returned record has been updated // Check that the returned record has been updated
assert.EqualValues(t, newOwnerID, runner.OwnerID) assert.Equal(t, newOwnerID, runner.OwnerID)
assert.EqualValues(t, newRepoID, runner.RepoID) assert.Equal(t, newRepoID, runner.RepoID)
assert.EqualValues(t, newName, runner.Name) assert.Equal(t, newName, runner.Name)
assert.EqualValues(t, newVersion, runner.Version) assert.Equal(t, newVersion, runner.Version)
assert.EqualValues(t, labelsCopy, runner.AgentLabels) assert.Equal(t, labelsCopy, runner.AgentLabels)
// Check that whatever is in the DB has been updated // Check that whatever is in the DB has been updated
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID}) after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
assert.EqualValues(t, newOwnerID, after.OwnerID) assert.Equal(t, newOwnerID, after.OwnerID)
assert.EqualValues(t, newRepoID, after.RepoID) assert.Equal(t, newRepoID, after.RepoID)
assert.EqualValues(t, newName, after.Name) assert.Equal(t, newName, after.Name)
assert.EqualValues(t, newVersion, after.Version) assert.Equal(t, newVersion, after.Version)
assert.EqualValues(t, labelsCopy, after.AgentLabels) assert.Equal(t, labelsCopy, after.AgentLabels)
} }
func TestActions_RegisterRunner_UpdateWithoutLabels(t *testing.T) { func TestActions_RegisterRunner_UpdateWithoutLabels(t *testing.T) {
@ -162,17 +162,17 @@ func TestActions_RegisterRunner_UpdateWithoutLabels(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
// Check that the returned record has been updated, except for the labels // Check that the returned record has been updated, except for the labels
assert.EqualValues(t, newOwnerID, runner.OwnerID) assert.Equal(t, newOwnerID, runner.OwnerID)
assert.EqualValues(t, newRepoID, runner.RepoID) assert.Equal(t, newRepoID, runner.RepoID)
assert.EqualValues(t, newName, runner.Name) assert.Equal(t, newName, runner.Name)
assert.EqualValues(t, newVersion, runner.Version) assert.Equal(t, newVersion, runner.Version)
assert.EqualValues(t, before.AgentLabels, runner.AgentLabels) assert.Equal(t, before.AgentLabels, runner.AgentLabels)
// Check that whatever is in the DB has been updated, except for the labels // Check that whatever is in the DB has been updated, except for the labels
after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID}) after := unittest.AssertExistsAndLoadBean(t, &ActionRunner{ID: recordID})
assert.EqualValues(t, newOwnerID, after.OwnerID) assert.Equal(t, newOwnerID, after.OwnerID)
assert.EqualValues(t, newRepoID, after.RepoID) assert.Equal(t, newRepoID, after.RepoID)
assert.EqualValues(t, newName, after.Name) assert.Equal(t, newName, after.Name)
assert.EqualValues(t, newVersion, after.Version) assert.Equal(t, newVersion, after.Version)
assert.EqualValues(t, before.AgentLabels, after.AgentLabels) assert.Equal(t, before.AgentLabels, after.AgentLabels)
} }

View file

@ -6,7 +6,7 @@ package actions
import ( import (
"testing" "testing"
"code.gitea.io/gitea/models/unittest" "forgejo.org/models/unittest"
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {

View file

@ -10,15 +10,15 @@ import (
"strings" "strings"
"time" "time"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/git" "forgejo.org/modules/git"
"code.gitea.io/gitea/modules/json" "forgejo.org/modules/json"
api "code.gitea.io/gitea/modules/structs" api "forgejo.org/modules/structs"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
webhook_module "code.gitea.io/gitea/modules/webhook" webhook_module "forgejo.org/modules/webhook"
"github.com/nektos/act/pkg/jobparser" "github.com/nektos/act/pkg/jobparser"
"xorm.io/builder" "xorm.io/builder"
@ -185,75 +185,6 @@ func updateRepoRunsNumbers(ctx context.Context, repo *repo_model.Repository) err
return err return err
} }
// CancelPreviousJobs cancels all previous jobs of the same repository, reference, workflow, and event.
// It's useful when a new run is triggered, and all previous runs needn't be continued anymore.
func CancelPreviousJobs(ctx context.Context, repoID int64, ref, workflowID string, event webhook_module.HookEventType) error {
// Find all runs in the specified repository, reference, and workflow with non-final status
runs, total, err := db.FindAndCount[ActionRun](ctx, FindRunOptions{
RepoID: repoID,
Ref: ref,
WorkflowID: workflowID,
TriggerEvent: event,
Status: []Status{StatusRunning, StatusWaiting, StatusBlocked},
})
if err != nil {
return err
}
// If there are no runs found, there's no need to proceed with cancellation, so return nil.
if total == 0 {
return nil
}
// Iterate over each found run and cancel its associated jobs.
for _, run := range runs {
// Find all jobs associated with the current run.
jobs, err := db.Find[ActionRunJob](ctx, FindRunJobOptions{
RunID: run.ID,
})
if err != nil {
return err
}
// Iterate over each job and attempt to cancel it.
for _, job := range jobs {
// Skip jobs that are already in a terminal state (completed, cancelled, etc.).
status := job.Status
if status.IsDone() {
continue
}
// If the job has no associated task (probably an error), set its status to 'Cancelled' and stop it.
if job.TaskID == 0 {
job.Status = StatusCancelled
job.Stopped = timeutil.TimeStampNow()
// Update the job's status and stopped time in the database.
n, err := UpdateRunJob(ctx, job, builder.Eq{"task_id": 0}, "status", "stopped")
if err != nil {
return err
}
// If the update affected 0 rows, it means the job has changed in the meantime, so we need to try again.
if n == 0 {
return fmt.Errorf("job has changed, try again")
}
// Continue with the next job.
continue
}
// If the job has an associated task, try to stop the task, effectively cancelling the job.
if err := StopTask(ctx, job.TaskID, StatusCancelled); err != nil {
return err
}
}
}
// Return nil to indicate successful cancellation of all running and waiting jobs.
return nil
}
// InsertRun inserts a run // InsertRun inserts a run
// The title will be cut off at 255 characters if it's longer than 255 characters. // The title will be cut off at 255 characters if it's longer than 255 characters.
func InsertRun(ctx context.Context, run *ActionRun, jobs []*jobparser.SingleWorkflow) error { func InsertRun(ctx context.Context, run *ActionRun, jobs []*jobparser.SingleWorkflow) error {

View file

@ -9,10 +9,10 @@ import (
"slices" "slices"
"time" "time"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
"xorm.io/builder" "xorm.io/builder"
) )

View file

@ -6,9 +6,9 @@ package actions
import ( import (
"context" "context"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"xorm.io/builder" "xorm.io/builder"
) )

View file

@ -6,12 +6,12 @@ package actions
import ( import (
"context" "context"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"code.gitea.io/gitea/modules/translation" "forgejo.org/modules/translation"
webhook_module "code.gitea.io/gitea/modules/webhook" webhook_module "forgejo.org/modules/webhook"
"xorm.io/builder" "xorm.io/builder"
) )

View file

@ -11,15 +11,15 @@ import (
"strings" "strings"
"time" "time"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
"code.gitea.io/gitea/models/shared/types" "forgejo.org/models/shared/types"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/optional" "forgejo.org/modules/optional"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"code.gitea.io/gitea/modules/translation" "forgejo.org/modules/translation"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
runnerv1 "code.gitea.io/actions-proto-go/runner/v1" runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
"xorm.io/builder" "xorm.io/builder"
@ -87,9 +87,10 @@ func (r *ActionRunner) BelongsToOwnerType() types.OwnerType {
return types.OwnerTypeRepository return types.OwnerTypeRepository
} }
if r.OwnerID != 0 { if r.OwnerID != 0 {
if r.Owner.Type == user_model.UserTypeOrganization { switch r.Owner.Type {
case user_model.UserTypeOrganization:
return types.OwnerTypeOrganization return types.OwnerTypeOrganization
} else if r.Owner.Type == user_model.UserTypeIndividual { case user_model.UserTypeIndividual:
return types.OwnerTypeIndividual return types.OwnerTypeIndividual
} }
} }
@ -167,12 +168,7 @@ func (r *ActionRunner) GenerateToken() (err error) {
// UpdateSecret updates the hash based on the specified token. It does not // UpdateSecret updates the hash based on the specified token. It does not
// ensure that the runner's UUID matches the first 16 bytes of the token. // ensure that the runner's UUID matches the first 16 bytes of the token.
func (r *ActionRunner) UpdateSecret(token string) error { func (r *ActionRunner) UpdateSecret(token string) error {
saltBytes, err := util.CryptoRandomBytes(16) salt := hex.EncodeToString(util.CryptoRandomBytes(16))
if err != nil {
return fmt.Errorf("CryptoRandomBytes %v", err)
}
salt := hex.EncodeToString(saltBytes)
r.Token = token r.Token = token
r.TokenSalt = salt r.TokenSalt = salt

View file

@ -6,10 +6,10 @@ package actions
import ( import (
"context" "context"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
) )
type RunnerList []*ActionRunner type RunnerList []*ActionRunner

View file

@ -7,9 +7,9 @@ import (
"fmt" "fmt"
"testing" "testing"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/models/unittest" "forgejo.org/models/unittest"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"

View file

@ -7,11 +7,11 @@ import (
"context" "context"
"fmt" "fmt"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
) )
// ActionRunnerToken represents runner tokens // ActionRunnerToken represents runner tokens

View file

@ -6,8 +6,8 @@ package actions
import ( import (
"testing" "testing"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/models/unittest" "forgejo.org/models/unittest"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@ -18,7 +18,7 @@ func TestGetLatestRunnerToken(t *testing.T) {
token := unittest.AssertExistsAndLoadBean(t, &ActionRunnerToken{ID: 3}) token := unittest.AssertExistsAndLoadBean(t, &ActionRunnerToken{ID: 3})
expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0) expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0)
require.NoError(t, err) require.NoError(t, err)
assert.EqualValues(t, expectedToken, token) assert.Equal(t, expectedToken, token)
} }
func TestNewRunnerToken(t *testing.T) { func TestNewRunnerToken(t *testing.T) {
@ -27,7 +27,7 @@ func TestNewRunnerToken(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0) expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0)
require.NoError(t, err) require.NoError(t, err)
assert.EqualValues(t, expectedToken, token) assert.Equal(t, expectedToken, token)
} }
func TestUpdateRunnerToken(t *testing.T) { func TestUpdateRunnerToken(t *testing.T) {
@ -37,5 +37,5 @@ func TestUpdateRunnerToken(t *testing.T) {
require.NoError(t, UpdateRunnerToken(db.DefaultContext, token)) require.NoError(t, UpdateRunnerToken(db.DefaultContext, token))
expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0) expectedToken, err := GetLatestRunnerToken(db.DefaultContext, 1, 0)
require.NoError(t, err) require.NoError(t, err)
assert.EqualValues(t, expectedToken, token) assert.Equal(t, expectedToken, token)
} }

View file

@ -5,15 +5,14 @@ package actions
import ( import (
"context" "context"
"fmt"
"time" "time"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
user_model "code.gitea.io/gitea/models/user" user_model "forgejo.org/models/user"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
webhook_module "code.gitea.io/gitea/modules/webhook" webhook_module "forgejo.org/modules/webhook"
"xorm.io/builder" "xorm.io/builder"
) )
@ -119,27 +118,6 @@ func DeleteScheduleTaskByRepo(ctx context.Context, id int64) error {
return committer.Commit() return committer.Commit()
} }
func CleanRepoScheduleTasks(ctx context.Context, repo *repo_model.Repository, cancelPreviousJobs bool) error {
// If actions disabled when there is schedule task, this will remove the outdated schedule tasks
// There is no other place we can do this because the app.ini will be changed manually
if err := DeleteScheduleTaskByRepo(ctx, repo.ID); err != nil {
return fmt.Errorf("DeleteCronTaskByRepo: %v", err)
}
if cancelPreviousJobs {
// cancel running cron jobs of this repository and delete old schedules
if err := CancelPreviousJobs(
ctx,
repo.ID,
repo.DefaultBranch,
"",
webhook_module.HookEventSchedule,
); err != nil {
return fmt.Errorf("CancelPreviousJobs: %v", err)
}
}
return nil
}
type FindScheduleOptions struct { type FindScheduleOptions struct {
db.ListOptions db.ListOptions
RepoID int64 RepoID int64

View file

@ -8,9 +8,9 @@ import (
"strings" "strings"
"time" "time"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"github.com/robfig/cron/v3" "github.com/robfig/cron/v3"
) )

View file

@ -6,9 +6,9 @@ package actions
import ( import (
"context" "context"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
repo_model "code.gitea.io/gitea/models/repo" repo_model "forgejo.org/models/repo"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"xorm.io/builder" "xorm.io/builder"
) )

View file

@ -4,7 +4,7 @@
package actions package actions
import ( import (
"code.gitea.io/gitea/modules/translation" "forgejo.org/modules/translation"
runnerv1 "code.gitea.io/actions-proto-go/runner/v1" runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
) )

View file

@ -9,18 +9,16 @@ import (
"fmt" "fmt"
"time" "time"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/models/unit" "forgejo.org/models/unit"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/setting" "forgejo.org/modules/setting"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
lru "github.com/hashicorp/golang-lru/v2" lru "github.com/hashicorp/golang-lru/v2"
"github.com/nektos/act/pkg/jobparser" "github.com/nektos/act/pkg/jobparser"
"google.golang.org/protobuf/types/known/timestamppb"
"xorm.io/builder" "xorm.io/builder"
) )
@ -337,140 +335,6 @@ func UpdateTask(ctx context.Context, task *ActionTask, cols ...string) error {
return err return err
} }
// UpdateTaskByState updates the task by the state.
// It will always update the task if the state is not final, even there is no change.
// So it will update ActionTask.Updated to avoid the task being judged as a zombie task.
func UpdateTaskByState(ctx context.Context, runnerID int64, state *runnerv1.TaskState) (*ActionTask, error) {
stepStates := map[int64]*runnerv1.StepState{}
for _, v := range state.Steps {
stepStates[v.Id] = v
}
ctx, commiter, err := db.TxContext(ctx)
if err != nil {
return nil, err
}
defer commiter.Close()
e := db.GetEngine(ctx)
task := &ActionTask{}
if has, err := e.ID(state.Id).Get(task); err != nil {
return nil, err
} else if !has {
return nil, util.ErrNotExist
} else if runnerID != task.RunnerID {
return nil, fmt.Errorf("invalid runner for task")
}
if task.Status.IsDone() {
// the state is final, do nothing
return task, nil
}
// state.Result is not unspecified means the task is finished
if state.Result != runnerv1.Result_RESULT_UNSPECIFIED {
task.Status = Status(state.Result)
task.Stopped = timeutil.TimeStamp(state.StoppedAt.AsTime().Unix())
if err := UpdateTask(ctx, task, "status", "stopped"); err != nil {
return nil, err
}
if _, err := UpdateRunJob(ctx, &ActionRunJob{
ID: task.JobID,
Status: task.Status,
Stopped: task.Stopped,
}, nil); err != nil {
return nil, err
}
} else {
// Force update ActionTask.Updated to avoid the task being judged as a zombie task
task.Updated = timeutil.TimeStampNow()
if err := UpdateTask(ctx, task, "updated"); err != nil {
return nil, err
}
}
if err := task.LoadAttributes(ctx); err != nil {
return nil, err
}
for _, step := range task.Steps {
var result runnerv1.Result
if v, ok := stepStates[step.Index]; ok {
result = v.Result
step.LogIndex = v.LogIndex
step.LogLength = v.LogLength
step.Started = convertTimestamp(v.StartedAt)
step.Stopped = convertTimestamp(v.StoppedAt)
}
if result != runnerv1.Result_RESULT_UNSPECIFIED {
step.Status = Status(result)
} else if step.Started != 0 {
step.Status = StatusRunning
}
if _, err := e.ID(step.ID).Update(step); err != nil {
return nil, err
}
}
if err := commiter.Commit(); err != nil {
return nil, err
}
return task, nil
}
func StopTask(ctx context.Context, taskID int64, status Status) error {
if !status.IsDone() {
return fmt.Errorf("cannot stop task with status %v", status)
}
e := db.GetEngine(ctx)
task := &ActionTask{}
if has, err := e.ID(taskID).Get(task); err != nil {
return err
} else if !has {
return util.ErrNotExist
}
if task.Status.IsDone() {
return nil
}
now := timeutil.TimeStampNow()
task.Status = status
task.Stopped = now
if _, err := UpdateRunJob(ctx, &ActionRunJob{
ID: task.JobID,
Status: task.Status,
Stopped: task.Stopped,
}, nil); err != nil {
return err
}
if err := UpdateTask(ctx, task, "status", "stopped"); err != nil {
return err
}
if err := task.LoadAttributes(ctx); err != nil {
return err
}
for _, step := range task.Steps {
if !step.Status.IsDone() {
step.Status = status
if step.Started == 0 {
step.Started = now
}
step.Stopped = now
}
if _, err := e.ID(step.ID).Update(step); err != nil {
return err
}
}
return nil
}
func FindOldTasksToExpire(ctx context.Context, olderThan timeutil.TimeStamp, limit int) ([]*ActionTask, error) { func FindOldTasksToExpire(ctx context.Context, olderThan timeutil.TimeStamp, limit int) ([]*ActionTask, error) {
e := db.GetEngine(ctx) e := db.GetEngine(ctx)
@ -481,13 +345,6 @@ func FindOldTasksToExpire(ctx context.Context, olderThan timeutil.TimeStamp, lim
Find(&tasks) Find(&tasks)
} }
func convertTimestamp(timestamp *timestamppb.Timestamp) timeutil.TimeStamp {
if timestamp.GetSeconds() == 0 && timestamp.GetNanos() == 0 {
return timeutil.TimeStamp(0)
}
return timeutil.TimeStamp(timestamp.AsTime().Unix())
}
func logFileName(repoFullName string, taskID int64) string { func logFileName(repoFullName string, taskID int64) string {
ret := fmt.Sprintf("%s/%02x/%d.log", repoFullName, taskID%256, taskID) ret := fmt.Sprintf("%s/%02x/%d.log", repoFullName, taskID%256, taskID)

View file

@ -6,9 +6,9 @@ package actions
import ( import (
"context" "context"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/container" "forgejo.org/modules/container"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"xorm.io/builder" "xorm.io/builder"
) )

View file

@ -6,7 +6,7 @@ package actions
import ( import (
"context" "context"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
) )
// ActionTaskOutput represents an output of ActionTask. // ActionTaskOutput represents an output of ActionTask.

View file

@ -7,8 +7,8 @@ import (
"context" "context"
"time" "time"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
) )
// ActionTaskStep represents a step of ActionTask // ActionTaskStep represents a step of ActionTask

View file

@ -6,9 +6,9 @@ package actions
import ( import (
"context" "context"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
) )
// ActionTasksVersion // ActionTasksVersion

View file

@ -12,9 +12,9 @@ import (
"io" "io"
"time" "time"
auth_model "code.gitea.io/gitea/models/auth" auth_model "forgejo.org/models/auth"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"code.gitea.io/gitea/modules/util" "forgejo.org/modules/util"
) )
func generateSaltedToken() (string, string, string, string, error) { func generateSaltedToken() (string, string, string, string, error) {
@ -22,11 +22,7 @@ func generateSaltedToken() (string, string, string, string, error) {
if err != nil { if err != nil {
return "", "", "", "", err return "", "", "", "", err
} }
buf, err := util.CryptoRandomBytes(20) token := hex.EncodeToString(util.CryptoRandomBytes(20))
if err != nil {
return "", "", "", "", err
}
token := hex.EncodeToString(buf)
hash := auth_model.HashToken(token, salt) hash := auth_model.HashToken(token, salt)
return token, salt, hash, token[len(token)-8:], nil return token, salt, hash, token[len(token)-8:], nil
} }

View file

@ -8,7 +8,7 @@ import (
"testing" "testing"
"time" "time"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"

View file

@ -7,9 +7,9 @@ import (
"context" "context"
"strings" "strings"
"code.gitea.io/gitea/models/db" "forgejo.org/models/db"
"code.gitea.io/gitea/modules/log" "forgejo.org/modules/log"
"code.gitea.io/gitea/modules/timeutil" "forgejo.org/modules/timeutil"
"xorm.io/builder" "xorm.io/builder"
) )

Some files were not shown because too many files have changed in this diff Show more