You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in a checkout of https://github.com/maxandersen/quarkusio.github.io/tree/insights1
and https://github.com/quarkusio/quarkusio.github.io/pull/535 are open but gh pr view reports no open pull requests found for branch "insights1"
My best guess is that somehow it does not like the base branch is develop and not master but that is just a guess.
Steps to reproduce the behavior
see above
Expected vs actual behavior
gh pr view should show the open pull request no matter what branch it is against.
Thank you for reporting! I cannot reproduce right now because your PR got merged in the meantime and is no longer open.
Additionally, I have checked out a fork PR in a different repository that has the base branch set to develop and gh pr view worked there, so no luck reproducing either.
The next time you can reproduce with an open source repository, can you give us a heads up and also include your git remote -v configuration and more information about the current branch (git config --get-regexp branch.`git branch --show-current`.*)?
Ah, thank you for this. The missing upstream configuration for a branch reminded me that we do have an issue for this open, although around gh pr status. These commands use the same mechanism for detecting the current branch.
This is curious because if I do gh pr ready, or status on aws-observability/aws-otel-python#48 it finds the PR just fine. But if I do gh pr view it doesn't work until I do the git push -u fork fix you mention @mislav .
Would your team consider changing the gh pr view behvaior to be similar to the ready or status command when searching for the PR so that we don't need a tracking upstream for our branches? 🙂
@NathanielRN Yes, that's exactly what we're tracking in the referenced issue. The remote branch should be detected regardless of tracking information or not. Additionally, you're right that different commands have different branch detection logic. We will try to consolidate that into unified detection.
@maxandersen Sorry for the nuisance. You can try rerunning the command with GH_DEBUG=api to see underlying API requests, including which branch is gh trying to query for.
Additional, you could share with us the output of:
Activity
mislav commentedon May 8, 2020
Thank you for reporting! I cannot reproduce right now because your PR got merged in the meantime and is no longer open.
Additionally, I have checked out a fork PR in a different repository that has the base branch set to
developandgh pr viewworked there, so no luck reproducing either.The next time you can reproduce with an open source repository, can you give us a heads up and also include your
git remote -vconfiguration and more information about the current branch (git config --get-regexp branch.`git branch --show-current`.*)?maxandersen commentedon May 8, 2020
okey, here is a new PR with same issue: quarkusio/quarkusio.github.io#541
git config --get-regexp branch.`git branch --show-current`.*returns nothing.
mislav commentedon May 8, 2020
Ah, thank you for this. The missing upstream configuration for a branch reminded me that we do have an issue for this open, although around
gh pr status. These commands use the same mechanism for detecting the current branch.Duplicate of #575
In the meantime, you can work around this by always publishing your branch to your fork like this:
# note the `-u` (`--set-upstream`) flag git push -u maxandersen HEADNathanielRN commentedon Dec 17, 2021
This is curious because if I do
gh pr ready, orstatuson aws-observability/aws-otel-python#48 it finds the PR just fine. But if I dogh pr viewit doesn't work until I do thegit push -u forkfix you mention @mislav .Would your team consider changing the
gh pr viewbehvaior to be similar to thereadyorstatuscommand when searching for the PR so that we don't need a tracking upstream for our branches? 🙂mislav commentedon Dec 20, 2021
@NathanielRN Yes, that's exactly what we're tracking in the referenced issue. The remote branch should be detected regardless of tracking information or not. Additionally, you're right that different commands have different branch detection logic. We will try to consolidate that into unified detection.
maxandersen commentedon Mar 8, 2023
some years later -
gh pr viewstill fails to find pr for my branch even when using-uto mark upstream.Any way to improve/get it working?
mislav commentedon Mar 8, 2023
@maxandersen Sorry for the nuisance. You can try rerunning the command with
GH_DEBUG=apito see underlying API requests, including which branch is gh trying to query for.Additional, you could share with us the output of:
git config --get-regexp "^branch.$(git branch --show-current).(remote|merge)\$"maxandersen commentedon Mar 8, 2023
output is:
and GH_DEBUG API shows it queries maxandersen remote but my remote setup is:
and origin is where I would expect it to look for the pull-requests.
auth tests: Set upstream branch earlier
auth tests: Set upstream branch earlier
Create MAKIN-911 PROACTIVE FIRE EMERGENCY RESPONED SYSTEMS