forgejo/cmd
Calixte Pernot 4d0c7db6cd feat: show link to pull requests targeting a non-default branch when pushing (#10079)
This resolves #10057 by showing a list of links to pull requests with the head branch being the one just pushed.

Since there may be multiple pull requests with different base branches, we find all of them and print them.

Here is a comparison table for pushing to the `feature` branch when having 2 pull requests: `feature -> dev`, and `feature -> prod`. `main` being the default branch.

## Before

remote:
remote: Create a new pull request for 'feature':
remote:   http://localhost:3000/user1/repo1/compare/main...feature
remote:

## After

remote:
remote: Create a new pull request for 'feature':
remote:   http://localhost:3000/user1/repo1/compare/main...feature
remote: Visit the existing pull requests:
remote:   http://localhost:3000/user1/repo1/pulls/1 merges into dev
remote:   http://localhost:3000/user1/repo1/pulls/3 merges into prod
remote:

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10079
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Calixte Pernot <cpernot@praksys.net>
Co-committed-by: Calixte Pernot <cpernot@praksys.net>
2025-11-19 14:59:13 +01:00
..
forgejo chore: unify the usage of CryptoRandomString (#10110) 2025-11-15 13:24:53 +01:00
actions.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_auth.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_auth_ldap.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_auth_ldap_test.go chore(upgrade): urfave/cli from v2 to v3 (#8035) 2025-06-01 22:16:37 +02:00
admin_auth_oauth.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_auth_oauth_test.go feat: add option to allow non-local users to change usernames (#8714) 2025-08-06 20:25:13 +02:00
admin_auth_stmp.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_regenerate.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_user.go feat: add admin user reset-mfa CLI command (#8047) 2025-06-05 10:40:21 +02:00
admin_user_change_password.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_user_create.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_user_delete.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_user_generate_access_token.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_user_list.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
admin_user_must_change_password.go chore(upgrade): urfave/cli from v2 to v3 (#8035) 2025-06-01 22:16:37 +02:00
admin_user_reset_mfa.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
cert.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
cmd.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
doctor.go chore: rename 'migrations' to 'gitea_migrations' 2025-10-14 14:40:49 -06:00
doctor_convert.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
doctor_test.go chore(upgrade): urfave/cli from v2 to v3 (#8035) 2025-06-01 22:16:37 +02:00
dump.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
dump_repo.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
dump_test.go feat: Replace mholt/archiver/v3 with mholt/archives (#7025) 2025-08-08 06:53:20 +02:00
embedded.go chore(upgrade): urfave/cli from v2 to v3 (#8035) 2025-06-01 22:16:37 +02:00
generate.go chore: unify the usage of CryptoRandomString (#10110) 2025-11-15 13:24:53 +01:00
hook.go feat: show link to pull requests targeting a non-default branch when pushing (#10079) 2025-11-19 14:59:13 +01:00
hook_test.go feat: Use receive.hideRefs (#10015) 2025-11-10 14:36:15 +01:00
keys.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
mailer.go chore(upgrade): urfave/cli from v2 to v3 (#8035) 2025-06-01 22:16:37 +02:00
main.go fix: CLI is forgejo not Forgejo (#8049) 2025-06-03 09:25:58 +02:00
main_test.go chore(upgrade): urfave/cli from v2 to v3 (#8035) 2025-06-01 22:16:37 +02:00
manager.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
manager_logging.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
migrate.go chore: rename 'migrations' to 'gitea_migrations' 2025-10-14 14:40:49 -06:00
migrate_storage.go chore: rename 'migrations' to 'gitea_migrations' 2025-10-14 14:40:49 -06:00
migrate_storage_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
restore_repo.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
serv.go feat(log): better parseable and configurable ssh-logs (#9056) 2025-09-11 18:59:24 +02:00
web.go fix!: detect extra cmdline args and emit errors (#9458) 2025-10-08 18:20:28 +02:00
web_acme.go fix: use correct ACME default (#8550) 2025-07-17 20:40:09 +02:00
web_graceful.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
web_https.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00