Support issue/PR URLs & PR branch names passed as arguments#129
Merged
Support issue/PR URLs & PR branch names passed as arguments#129
Conversation
Also validates that the issue passed either by number or by URL exists.
probablycorey
approved these changes
Dec 4, 2019
Contributor
probablycorey
left a comment
There was a problem hiding this comment.
This is a nice additional functionality with good tests! 🥇
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.
Now equivalent:
issue view:
gh issue view 123gh issue view https://github.com/OWNER/REPO/issues/123pr view:
gh pr view 123gh pr view https://github.com/OWNER/REPO/pull/123gh pr view BRANCH(for same-repo PRs)gh pr view OWNER:BRANCH(for cross-repo PRs)pr checkout:
gh pr checkout 123gh pr checkout https://github.com/OWNER/REPO/pull/123gh pr checkout BRANCH(for same-repo PRs)gh pr checkout OWNER:BRANCH(for cross-repo PRs)Furthermore, the validity of the argument is always checked before opening the URL. This incurs a small API fetch overhead before the URL is passed to the browser, but this allows us to abort with a helpful message in case of non-existent issues/PR rather than opening a 404 web page:
Fixes #71, fixes #88