-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Find PRs using @{push}
#9208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find PRs using @{push}
#9208
Changes from 1 commit
0179381
7fc35fd
4254818
2d1e4d6
eb16a75
8bb2879
be250b3
0006091
48e2681
0184380
4a9fd95
d289ddd
aef2642
41729b0
a72bef9
6355ed7
5a8dd35
e4d8ed0
cdead50
d684834
4382bdf
62106dc
e31bfd0
e0f624b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
When push.default is not 'upstream' / 'tracking' (or 'nothing'), we can
expect local and remote branch names to be the same and solely rely on
@{push} or RemoteURL.
This fixes the wrong error message 'no pull requests found for branch
"<target branch>"' when the local branch is not pushed in the
push.default = simple / current and upstream = <target branch> setup.- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -211,7 +211,8 @@ func prSelectorForCurrentBranch(gitClient *git.Client, baseRepo ghrepo.Interface | |
| if branchOwner != "" { | ||
| if branchConfig.Push != "" { | ||
| selector = strings.TrimPrefix(branchConfig.Push, branchConfig.RemoteName+"/") | ||
| } else if strings.HasPrefix(branchConfig.MergeRef, "refs/heads/") { | ||
| } else if pushDefault, _ := gitClient.Config(context.Background(), "push.default"); (pushDefault == "upstream" || pushDefault == "tracking") && | ||
| strings.HasPrefix(branchConfig.MergeRef, "refs/heads/") { | ||
| selector = strings.TrimPrefix(branchConfig.MergeRef, "refs/heads/") | ||
| } | ||
|
||
| // prepend `OWNER:` if this branch is pushed to a fork | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.