Alert unpushed commits when merging a pull request#2255
Merged
Conversation
DONALDSULLENDER
approved these changes
Nov 3, 2020
DONALDSULLENDER
approved these changes
Nov 3, 2020
Contributor
|
giving this to @samcoe to:
|
8010279 to
80b579d
Compare
80b579d to
3f172ad
Compare
samcoe
reviewed
Jan 25, 2021
| return err | ||
| } | ||
|
|
||
| if opts.SelectorArg == "" { |
Contributor
There was a problem hiding this comment.
When selectorArg is empty we use the current local git branch to retrieve the PR so there is no need to recheck if the PR branch name matches the local git branch name.
samcoe
approved these changes
Jan 25, 2021
Contributor
samcoe
left a comment
There was a problem hiding this comment.
@quiye Thanks for the contribution.
I rebased against trunk, added a conditional so that we only check if there are diverging branches when no PR selector argument is provided, and wrote a test for this specific use case. I think it ready to 🚢
Contributor
Author
|
@samcoe Thanks for reviewing and fixing ! |
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.
Fixes #969
I added comparing the last local commit with the pull request's last commit to see if the unpushed commit is on the local branch.
may have).cs.Stub("")to tests. It looks like verbose code, but I can't simplify these ...