Skip to content

respect -B when checking for existing pull requests#694

Merged
vilmibm merged 1 commit intomasterfrom
respect-b
Mar 24, 2020
Merged

respect -B when checking for existing pull requests#694
vilmibm merged 1 commit intomasterfrom
respect-b

Conversation

@vilmibm
Copy link
Copy Markdown
Contributor

@vilmibm vilmibm commented Mar 23, 2020

closes #686

when checking for existing pull requests for a given branch we weren't taking the base branch into
account, thus preventing -B from being useful once a pull request existed for a given branch.

@vilmibm vilmibm requested a review from mislav March 23, 2020 19:28
Copy link
Copy Markdown
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Nice and elegant. Thank you!

Comment on lines +397 to +399
if pr.HeadLabel() == headBranch {
if baseBranch != "" {
if pr.BaseRefName != baseBranch {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: couldn't have all this be collapsed into a single conditional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

they could; i often over-nest because i find it easier to read and reason about

@vilmibm vilmibm merged commit f2e5269 into master Mar 24, 2020
@mislav mislav deleted the respect-b branch June 25, 2020 14:36
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.

Create multiple PRs to different base branch

2 participants