forgejo/modules/private
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
..
actions.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00: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
internal.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
key.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
mail.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
manager.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
request.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
restore_repo.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
serv.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00