Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented Aug 27, 2020

If the --repo flag is specified, then the user intends to select a repository other than the current one. In that case, it doesn't make sense to fall back to detecting the PR belonging to the current branch, so throw a descriptive error instead.

# BEFORE
$ gh pr review -R mislav/playground
no open pull requests found for branch "cli:pr-commands-repo-override-arg"

# AFTER
$ gh pr review -R mislav/playground
argument required when using the --repo flag

Usage:  gh pr review [<number> | <url> | <branch>] [flags]

As a bonus in this PR, I've added unit tests for just the flag-processing logic in isolation.

If the `--repo` flag is specified, then the user intends to select a
repository other than the current one. In that case, it doesn't make
sense to fall back to detecting the PR belonging to the current branch,
so throw a descriptive error instead.
@mislav mislav requested a review from vilmibm August 27, 2020 15:02
@vilmibm vilmibm merged commit 74524fc into trunk Aug 27, 2020
@mislav mislav deleted the pr-commands-repo-override-arg branch August 27, 2020 19:09
@mislav mislav mentioned this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants