-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc: add optional step to onboarding doc #8774
Conversation
Include information on how to force push to the contributor's own branch so that pull requests show as merged in GitHub interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Haven't tested it yet myself, but I trust this is working and hence super useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -184,6 +184,7 @@ Landing a PR | |||
* This will automatically close the PR when the commit lands in master. | |||
* `Refs: <full-url>` | |||
* Full URL of material that might provide additional useful information or context to someone trying to understand the change set or the thinking behind it. | |||
* Optional: Force push the amended commit to the branch you used to open the pull request. If your branch is called `bugfix`, then the command would be `git push --force-with-lease origin master:bugfix`. When the pull request is closed, this will cause the pull request to show the purple merged status rather than the red closed status that is usually used for pull requests that weren't merged. You will likely only do this when landing your own contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can say You should only do this …
, at least as long as there are no well-established social rules around the “Allow edits by maintainers” feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went a bit further and dropped the You should
as well: Only do this when...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the long run establishing some kind of rule for every merge would be good though, let alone for "merged PR" statistics, if don't do this already properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I take this opportunity to share my process for merging my own PRs because it's kind of the opposite of the guide 😆 :
I can do almost the same for other's work, using |
What's I do |
@targos FYI if you don't have # Set up local branch from Github PR, e.g. gfp origin 7654
gfp() { git fetch $1 pull/$2/head:pr-$2; } # $1: remote name, $2: PR number
gpp() { # Update branch created with gfp, $1: remote name
pr=`git symbolic-ref --short HEAD | cut -d "-" -f 2` # Assumes pr-7654 style branch
git pull $1 pull/$pr/head
} @Fishrock123 |
I do something similar to @targos (perhaps add some |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LGTM |
Include information on how to force push to the contributor's own branch so that pull requests show as merged in GitHub interface. PR-URL: nodejs#8774 Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Johan Bergstrom <bugs@bergstroem.nu> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 676e624 |
Include information on how to force push to the contributor's own branch so that pull requests show as merged in GitHub interface. PR-URL: #8774 Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Johan Bergstrom <bugs@bergstroem.nu> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Include information on how to force push to the contributor's own branch so that pull requests show as merged in GitHub interface. PR-URL: #8774 Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Johan Bergstrom <bugs@bergstroem.nu> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
Affected core subsystem(s)
doc
Description of change
Include information on how to force push to the contributor's own branch
so that pull requests show as merged in GitHub interface.