mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-24 11:02:42 +00:00
urfave/cli v2 will eventually become unmaintained, switch over to v3 which is the latest supported version. Note: the `docs` command would be a lot of work to restore with v3 ([the package is still in alpha](https://github.com/urfave/cli-docs)) An alternative to avoid a breaking change would be to not upgrade from v2 to v3 for that reason alone. Note: these commits were cherry-picked from https://code.forgejo.org/forgefriends/forgefriends Note: it is best reviewed side by side with no display of whitespace changes (there are a lot of those when converting vars to func). - a few functional changes were necessary and are noted in context in the file changes tab - https://cli.urfave.org/migrate-v2-to-v3/ upgrade instructions were followed in the most minimal way possible - upgrade gof3 to v3.10.8 which includes and upgrade from urfave/cli v2 to urfave/cli v3 - upgrade gitlab.com/gitlab-org/api/client-go v0.129.0 because it is an indirect dependency of gof3 and requires a change because of a deprecated field that otherwise triggers a lint error but nothing else otherwise - verified that the [script](https://codeberg.org/forgejo/docs/src/branch/next/scripts/cli-docs.sh) that generates the [CLI documentation](https://codeberg.org/forgejo/docs/src/branch/next/scripts/cli-docs.sh) still works. There are cosmetic differences and the **help** subcommand is no longer advertised (although it is still supported) but the `--help` option is advertised as expected so it is fine. - end-to-end tests [passed](https://code.forgejo.org/forgejo/end-to-end/pulls/667) (they use the Forgejo CLI to some extent) ## 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. - [ ] I want the title to show in the release notes with a link to this pull request. - [x] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - Breaking features - [PR](https://codeberg.org/forgejo/forgejo/pulls/8035): <!--number 8035 --><!--line 0 --><!--description VGhlIGBmb3JnZWpvIGRvY3NgIGNvbW1hbmQgaXMgZGVwcmVjYXRlZCBhbmQgQ0xJIGVycm9ycyBhcmUgbm93IGRpc3BsYXllZCBvbiBzdGRlcnIgaW5zdGVhZCBvZiBzdGRvdXQuIFRoZXNlIGJyZWFraW5nIGNoYW5nZXMgaGFwcGVuZWQgYmVjYXVzZSB0aGUgcGFja2FnZSB1c2VkIHRvIHBhcnNlIHRoZSBjb21tYW5kIGxpbmUgYXJndW1lbnRzIHdhcyBbdXBncmFkZWQgZnJvbSB2MiB0byB2M10oaHR0cHM6Ly9jbGkudXJmYXZlLm9yZy9taWdyYXRlLXYyLXRvLXYzLykuIEEgW3NlcGFyYXRlIHByb2plY3Qgd2FzIGluaXRpYXRlZF0oaHR0cHM6Ly9naXRodWIuY29tL3VyZmF2ZS9jbGktZG9jcykgdG8gcmUtaW1wbGVtZW50IHRoZSBgZG9jc2AgY29tbWFuZCwgYnV0IGl0IGlzIG5vdCB5ZXQgcHJvZHVjdGlvbiByZWFkeS4=-->The `forgejo docs` command is deprecated and CLI errors are now displayed on stderr instead of stdout. These breaking changes happened because the package used to parse the command line arguments was [upgraded from v2 to v3](https://cli.urfave.org/migrate-v2-to-v3/). A [separate project was initiated](https://github.com/urfave/cli-docs) to re-implement the `docs` command, but it is not yet production ready.<!--description--> <!--end release-notes-assistant--> Co-authored-by: limiting-factor <limiting-factor@posteo.com> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8035 Reviewed-by: Gusted <gusted@noreply.codeberg.org> |
||
|---|---|---|
| .. | ||
| 3139.md | ||
| 3285.md | ||
| 3307.md | ||
| 3334.md | ||
| 3337.md | ||
| 3363.md | ||
| 3383.md | ||
| 3414.md | ||
| 3430.md | ||
| 3434.md | ||
| 3442.md | ||
| 3642.md | ||
| 3654.md | ||
| 3723.md | ||
| 3724.md | ||
| 3729.md | ||
| 3752.md | ||
| 3791.md | ||
| 3808.md | ||
| 3811.md | ||
| 3830.md | ||
| 3836.md | ||
| 3838.md | ||
| 3847.md | ||
| 3870.md | ||
| 3886.md | ||
| 3917.md | ||
| 3922.md | ||
| 3934.md | ||
| 3985.md | ||
| 3989.md | ||
| 4026.md | ||
| 4027.md | ||
| 4072.md | ||
| 4083.md | ||
| 4095.md | ||
| 4125.md | ||
| 4134.md | ||
| 4136.md | ||
| 4139.md | ||
| 4143.md | ||
| 4145.md | ||
| 4160.md | ||
| 4189.md | ||
| 4201.md | ||
| 4212.md | ||
| 4218.md | ||
| 4222.md | ||
| 4240.md | ||
| 4253.md | ||
| 4262.md | ||
| 4266.md | ||
| 4291.md | ||
| 4367.md | ||
| 4375.md | ||
| 4400.md | ||
| 4427.md | ||
| 4429.md | ||
| 4439.md | ||
| 4487.md | ||
| 4506.md | ||
| 4547.md | ||
| 4595.md | ||
| 4605.md | ||
| 4607.md | ||
| 4635.md | ||
| 4684.md | ||
| 4716.md | ||
| 4724.md | ||
| 4801.md | ||
| 4819.md | ||
| 4907.md | ||
| 4924.md | ||
| 4941.md | ||
| 4998.md | ||
| 5065.md | ||
| 5090.md | ||
| 5109.md | ||
| 5120.md | ||
| 5149.md | ||
| 5195.md | ||
| 5205.md | ||
| 5325.md | ||
| 5372.md | ||
| 5416.md | ||
| 5459.md | ||
| 5477.md | ||
| 5515.md | ||
| 5543.md | ||
| 5601.md | ||
| 5621.md | ||
| 5677.md | ||
| 5714.md | ||
| 5718.md | ||
| 5719.md | ||
| 5751.md | ||
| 5778.md | ||
| 5789.md | ||
| 5974.md | ||
| 5988.md | ||
| 5997.md | ||
| 6062.md | ||
| 6110.md | ||
| 6200.md | ||
| 6271.md | ||
| 6351.md | ||
| 6445.md | ||
| 6471.md | ||
| 6523.md | ||
| 6639.md | ||
| 6763.md | ||
| 6813.md | ||
| 6933.md | ||
| 7251.md | ||
| 8035.md | ||