-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: onboarding.md landing prs multiple commits #9635
Conversation
cc/ @sam-github |
@@ -203,7 +203,7 @@ Landing a PR | |||
* 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. Only do this when landing your own contributions. | |||
* `git push upstream master` | |||
* Close the pull request with a "Landed in `<commit hash>`" comment. | |||
* Close the pull request with a "Landed in `<commit hash>`" comment. If Github automatically merged your pull request then you should still add the "Landed in <commit hash>..<commit hash>" comment if you added multiple commits. |
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.
Landed in
is not required according to https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md#landing-pull-requests.
These two documents should agree. Either by making them say the same thing, or by making onboarding be a reference to the collaborator guide.
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.
Its not clear what "automatically merged" means. github never automatically merges anything, unless you mean when the green button is pressed by a human. I think you mean "when github detects the branch was merged"? In which case, you probably have to discuss the subtleties of how it does that. And maybe mention that a Landed in
is never the wrong thing?
cc: @Fishrock123
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.
@sam-github As in: if you push a commit to master that has the same hash as the HEAD of a PR branch, then Github will automatically mark the PR as merged. I guess the wording should be more exact.
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.
ok, so subtle is in the eye of the beholder when it comes to git :-), but I don't think "github automatically merged your commit" is the same as "the branches commits were fast-forwarded onto master so the master contains the exact SHA commit IDs as the PR branch did". Anyhow, point is, if there is a documented exception, the docs should go a bit more into it, perhaps recommending force pushing your own branches since you can, but pointing out that's not usually possible with branches you don't own.
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'll look at rewriting this to make it clearer, perhaps to make more of a distinction between COLLABORATOR_GUIDE and onboarding.md (#9555 (comment)).
eee8811
to
346f675
Compare
|
||
* Easiest to use `git log`, then do a search. | ||
* In vim: `/Name` + `enter` (+ `n` as much as you need to) | ||
* Only include collaborators who have commented `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.
... " or approved the request using the github review mechanism."
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 guess de facto it's allowed, but I'm not sure discussion on using it ever reached any kind of consensus (ref: #8554).
@@ -230,6 +247,11 @@ Time to push it: | |||
```text | |||
$ git push origin master | |||
``` | |||
* 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. 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.
"When the pull request is closed" ---> "When the amended commit is fast-forward merged onto master, github will automatically close the PR, and mark it with the purple merge status"....
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.
You text made it sound like if you close a PR using the "close pull request" button that it would show as merged, but you mean "closing a PR in the way node does it"
Always modify the original commit message to include additional meta | ||
information regarding the change process: | ||
|
||
- A `Reviewed-By: Name <email>` line for yourself and any | ||
other Collaborators who have reviewed the change. | ||
- Useful for @mentions / contact list if something goes wrong in the PR. | ||
- Protects against the assumption that GitHub will be around forever. | ||
|
||
* Easiest to use `git log`, then do a search. | ||
* In vim: `/Name` + `enter` (+ `n` as much as you need to) |
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 you mean the "default git pager, less
" here, not vim
? Usually git log
, when output is longer than the terminal uses the git pager, which defaults to less
, and less
(as well as the old pager, more
, vim
, and lots of tools) uses /
for searching.
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.
This was copied from https://github.com/nodejs/node/blob/master/doc/onboarding.md#landing-prs-details.
I agree it should be less
.
Always modify the original commit message to include additional meta | ||
information regarding the change process: | ||
|
||
- A `Reviewed-By: Name <email>` line for yourself and any | ||
other Collaborators who have reviewed the change. | ||
- Useful for @mentions / contact list if something goes wrong in the PR. | ||
- Protects against the assumption that GitHub will be around forever. | ||
|
||
* Easiest to use `git log`, then do a search. |
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.
https://github.com/evanlucas/node-review can help a lot to do this list
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 that we should officially document this
@@ -230,6 +247,11 @@ Time to push it: | |||
```text | |||
$ git push origin master | |||
``` | |||
* 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. Only do this when landing your own contributions. | |||
|
|||
* Close the pull request with a "Landed in `<commit hash>`" comment. If Github automatically merged your pull request then you should still add the "Landed in <commit hash>..<commit hash>" comment if you added multiple commits. |
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.
Nit: Github -> GitHub
e701f36
to
c1cbe63
Compare
* For raw commit message: `git log 7b09aade8468e1c930f36b9c81e6ac2ed5bc8732 -1` | ||
* Collaborators are in alphabetical order by GitHub username. | ||
* Label your pull request with the `doc` subsystem label. | ||
* Run CI on your PR. | ||
* After a `LGTM` or two, land the PR. | ||
* Be sure to add the `PR-URL: <full-pr-url>` and appropriate `Reviewed-By:` metadata! | ||
|
||
|
||
## final notes | ||
## Final notes | ||
|
||
* don't worry about making mistakes: everybody makes them, there's a lot to internalize and that takes time (and we recognize that!) | ||
* very few (no?) mistakes are unrecoverable | ||
* the existing node committers trust you and are grateful for your help! |
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.
s/committers/Collaborators
- A `Reviewed-By: Name <email>` line for yourself and any | ||
other Collaborators who have reviewed the change. | ||
- Useful for @mentions / contact list if something goes wrong in the PR. | ||
- Protects against the assumption that GitHub will be around forever. | ||
|
||
Review the commit message to ensure that it adheres to the guidelines | ||
outlined in the [contributing](https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#step-3-commit) guide. |
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.
Probably worth mentioning https://github.com/evanlucas/core-validate-commit and https://github.com/evanlucas/node-review here.
|
||
* `./configure && make -j8 test` (`-j8` builds node in parallel with 8 | ||
threads. Adjust to the number of cores (or processor-level threads) | ||
your processor has (or slightly more) for best results.) |
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 this is an excessive number of brackets.
(-j8
builds node in parallel with 8 threads. Adjust to the number of processor cores/threads your machine has for best results.)
COLLABORATOR_GUIDE.md and onboarding.md cover some of the same information. The aim of this commit is to remove duplicated information.
c1cbe63
to
1845c1d
Compare
Updated, PTAL. I have not included the changes to document evanlucas/node-review as I feel this should be part of a separate PR. |
Landed in 8951d3e |
COLLABORATOR_GUIDE.md and onboarding.md cover some of the same information. The aim of this commit is to remove duplicated information. PR-URL: #9635 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
COLLABORATOR_GUIDE.md and onboarding.md cover some of the same information. The aim of this commit is to remove duplicated information. PR-URL: #9635 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
COLLABORATOR_GUIDE.md and onboarding.md cover some of the same information. The aim of this commit is to remove duplicated information. PR-URL: nodejs#9635 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
COLLABORATOR_GUIDE.md and onboarding.md cover some of the same information. The aim of this commit is to remove duplicated information. PR-URL: #9635 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
COLLABORATOR_GUIDE.md and onboarding.md cover some of the same information. The aim of this commit is to remove duplicated information. PR-URL: #9635 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Checklist
Affected core subsystem(s)
doc
Description of change
onboarding.md and COLLABORATOR_GUIDE.md cover much of the same ground, this PR aims to remove some of the duplicated content to avoid ambiguity.