Repository navigation
flow next: find a PR pushed under a different public branch name - #15
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What breaks
In stealth mode
/flow:nextships withgit push -u <remote> HEAD:<plain-name>andgh pr create --head <owner>:<plain-name>, often from a fork. The router'sprNumberonly runsgh pr view <local-branch>, so a PR opened from localflow/office-previewsunder the public headTomasPalsson:feat/storage-backed-office-previewsis never found, andflow nextstays inshippable("no PR … opening it") after the PR exists.After this change
prNumberstill triesgh pr view <local-branch>first. When that finds nothing, it reads the branch's upstream (branch.<b>.merge,branch.<b>.remote), takes the owner from that remote's URL (git@host:Owner/Repo,https://host/Owner/Repo,ssh://git@host/Owner/Repo), and runsgh pr list --head <upstream-name> --state all, keeping only a PR whose head repository belongs to that owner. No upstream, no parseable owner, or any gh failure → no PR, as before.--author @mewas deliberately not used: in a transferred repository (LibreChat-AI/LibreChat) it returned no PRs at all, including the user's own.Tests
TEST_ONLY=test_next.sh bash plugins/flow/scripts/tests/run.sh→ 182 passed, 0 failed (178 before; new test failed first).shippable; upstream with an unparseable remote URL →shippable; upstream ongit@github.com:someone/repo.gitwith a stubbedgh→shipped,PR #77.flow nextnow reportsshippedwith the opened PR's number. Thehttps://andssh://URL forms are covered by reading the regex only.