PR merge improvements: auto-merge, edit commit body#2980
Merged
Conversation
For single-commit PRs, the commit subject will be the subject of the head commit and the PR number. For multi-commit PRs, the commit subject will be the PR title and PR number. Instead of trying to replicate this logic client-side, omit the `commitHeadline` param and let the server apply defaults appropriately. Reverts #1627
ampinsk
reviewed
Feb 16, 2021
ampinsk
left a comment
There was a problem hiding this comment.
Overall looks good to me!
The confirmation checkmark for merge --auto is green. Should it be purple?
The confirmation checkmark for merge --disable-auto is green. Should it be red?
I actually think it makes sense for these to be green, since neither of these result in something merging or closing right then and there. 👍
samcoe
reviewed
Feb 17, 2021
| @@ -0,0 +1,100 @@ | |||
| package merge | |||
Contributor
There was a problem hiding this comment.
I like the extraction of the API code into this new file.
samcoe
reviewed
Feb 17, 2021
Co-authored-by: Amanda Pinsker <ampinsk@github.com>
GHE versions 2.22 and older will not have this GraphQL field. Avoid the resulting error and have the command proceeed with empty text as the default.
samcoe
approved these changes
Feb 17, 2021
Contributor
samcoe
left a comment
There was a problem hiding this comment.
This looks great, nice work!
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.
pr merge --auto,pr merge --disable-automodesQuestions:
merge --autois green. Should it be purple?merge --disable-autois green. Should it be red?Fixes #2619
Fixes #1023
Reverts #1627, reasoning #2954 (comment), ref. #1621
TODO:
--auto--disable-autoviewerMergeBodyTextGraphQL field