Skip to content
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

Respect base repository when passing URL argument to pr checkout/view #687

Merged
merged 2 commits into from
Mar 24, 2020

Conversation

mislav
Copy link
Contributor

@mislav mislav commented Mar 20, 2020

Previously, the repository owner+name component of the URL was ignored and only the pull request number was read. Now, the URL dictates which base repository will be used.

Bonus fixes:

Fixes #408

Previously, the repository owner+name component of the URL was ignored
and only the pull request number was read. Now, the URL dictates which
base repository will be used.
@mislav mislav requested a review from vilmibm March 20, 2020 17:15
Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hot damn and hell yeah

restoreCmd := utils.SetPrepareCmd(func(cmd *exec.Cmd) utils.Runnable {
switch strings.Join(cmd.Args, " ") {
case "git show-ref --verify --quiet refs/heads/feature":
return &errorStub{"exit status: 1"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reminds me i'd like to add the ability to stub errors in the CmdStubber.

@vilmibm vilmibm merged commit 537842f into master Mar 24, 2020
@mislav mislav deleted the pr-checkout-repo-override branch March 27, 2020 14:09
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.

Unsuccessful in checking out a PR in a fork
2 participants