You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This also updates some parts of the onboarding. It is mainly about
how to handle pull requests, how and when to start a CI, when to add
the `ready` label and some other minor changes.
PR-URL: #19116
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Chen Gang <gangc.cxy@foxmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Glen Keane <glenkeane.94@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
-[Code Reviews and Consensus Seeking](#code-reviews-and-consensus-seeking)
12
+
-[Code Reviews](#code-reviews)
13
+
-[Consensus Seeking](#consensus-seeking)
11
14
-[Waiting for Approvals](#waiting-for-approvals)
12
15
-[Testing and CI](#testing-and-ci)
13
16
-[Useful CI Jobs](#useful-ci-jobs)
@@ -45,19 +48,19 @@ understand the project governance model as outlined in
45
48
46
49
### Managing Issues and Pull Requests
47
50
48
-
Collaborators should feel free to take full responsibility for
49
-
managing issues and pull requests they feel qualified to handle, as
50
-
long as this is done while being mindful of these guidelines, the
51
-
opinions of other Collaborators and guidance of the [TSC][]. They
52
-
may also notify other qualified parties for more input on an issue
53
-
or a pull request.
51
+
Collaborators should take full responsibility for managing issues and pull
52
+
requests they feel qualified to handle. Make sure this is done while being
53
+
mindful of these guidelines, the opinions of other Collaborators, and guidance
54
+
of the [TSC][]. They may also notify other qualified parties for more input on
55
+
an issue or a pull request.
54
56
[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues)
55
57
56
58
### Welcoming First-Time Contributors
57
59
58
60
Courtesy should always be shown to individuals submitting issues and pull
59
61
requests to the Node.js project. Be welcoming to first-time contributors,
60
-
identified by the GitHub  badge.
62
+
identified by the GitHub 
63
+
badge.
61
64
62
65
For first-time contributors, check if the commit author is the same as the
63
66
pull request author, and ask if they have configured their git
@@ -75,47 +78,88 @@ Collaborators or additional evidence that the issue has relevance, the
75
78
issue may be closed. Remember that issues can always be re-opened if
76
79
necessary.
77
80
81
+
### Author ready pull requests
82
+
83
+
A pull request that is still awaiting the minimum review time is considered
84
+
`author-ready` as soon as the CI has been started, it has at least one approval,
85
+
and it has no outstanding review comments. Please always make sure to add the
86
+
appropriate `author-ready` label to the PR in that case and remove it again as
87
+
soon as that condition is not met anymore.
88
+
89
+
### Handling own pull requests
90
+
91
+
If you as a Collaborator open a pull request, it is recommended to start a CI
92
+
right after (see [testing and CI](#testing-and-ci) for further information on
93
+
how to do that) and to post the link to it as well. Starting a new CI after each
94
+
update is also recommended (due to e.g., a change request in a review or due to
95
+
rebasing).
96
+
97
+
As soon as the PR is ready to land, please go ahead and do so on your own.
98
+
Landing your own pull requests distributes the work load for each Collaborator
99
+
equally. If it is still awaiting the
100
+
[minimum time to land](#waiting-for-approvals), please add the `author-ready`
101
+
label to it so it is obvious that the PR can land as soon as the time ends.
102
+
78
103
## Accepting Modifications
79
104
80
-
All modifications to the Node.js code and documentation should be
81
-
performed via GitHub pull requests, including modifications by
82
-
Collaborators and TSC members. A pull request must be reviewed, and usually
83
-
must also be tested with CI, before being landed into the codebase.
105
+
All modifications to the Node.js code and documentation should be performed via
106
+
GitHub pull requests, including modifications by Collaborators and TSC members.
107
+
A pull request must be reviewed, and must also be tested with CI, before being
108
+
landed into the codebase. There may be exception to the latter (the changed code
109
+
can not be tested with a CI or similar). If that is the case, please leave a
110
+
comment that explains why the PR does not require a CI run.
84
111
85
-
### Code Reviews and Consensus Seeking
112
+
### Code Reviews
86
113
87
114
All pull requests must be reviewed and accepted by a Collaborator with
88
115
sufficient expertise who is able to take full responsibility for the
89
116
change. In the case of pull requests proposed by an existing
90
117
Collaborator, an additional Collaborator is required for sign-off.
91
118
92
-
In some cases, it may be necessary to summon a qualified Collaborator
93
-
or a GitHub team to a pull request for review by @-mention.
94
-
[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues)
119
+
In some cases, it may be necessary to summon a GitHub team to a pull request for
120
+
review by @-mention.
121
+
[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues).
95
122
96
123
If you are unsure about the modification and are not prepared to take
97
124
full responsibility for the change, defer to another Collaborator.
98
125
126
+
If you are the first Collaborator to approve a pull request that has no CI yet,
127
+
please start one (see [testing and CI](#testing-and-ci) for further information
128
+
on how to do that) and post the link to the CI in the PR. Please also start a
129
+
new CI in case the PR creator pushed new code since the last CI run (due to
130
+
e.g., an addressed review comment or a rebase).
131
+
132
+
In case there are already enough approvals (`LGTM`), a CI run, and the PR is
133
+
open longer than the minimum waiting time without any open comments, please do
134
+
not (only) add another approval. Instead go ahead and land the PR after checking
135
+
the CI outcome.
136
+
137
+
### Consensus Seeking
138
+
139
+
If there is no disagreement amongst Collaborators, a pull request should be
140
+
landed given appropriate review, a green CI, and the minimum
141
+
[waiting time](#waiting-for-approvals) for a PR. If it is still awaiting the
142
+
[minimum time to land](#waiting-for-approvals), please add the `author-ready`
143
+
label to it so it is obvious that the PR can land as soon as the time ends.
144
+
145
+
Where there is discussion amongst Collaborators, consensus should be sought if
146
+
possible. The lack of consensus may indicate the need to elevate discussion to
147
+
the TSC for resolution.
148
+
99
149
If any Collaborator objects to a change *without giving any additional
100
150
explanation or context*, and the objecting Collaborator fails to respond to
101
151
explicit requests for explanation or context within a reasonable period of
102
152
time, the objection may be dismissed. Note that this does not apply to
103
153
objections that are explained.
104
154
105
-
For non-breaking changes, if there is no disagreement amongst
106
-
Collaborators, a pull request may be landed given appropriate review.
107
-
Where there is discussion amongst Collaborators, consensus should be
108
-
sought if possible. The lack of consensus may indicate the need to
109
-
elevate discussion to the TSC for resolution (see below).
110
-
111
-
Breaking changes (that is, pull requests that require an increase in
112
-
the major version number, known as `semver-major` changes) must be
113
-
[elevated for review by the TSC](#involving-the-tsc).
114
-
This does not necessarily mean that the PR must be put onto the TSC meeting
115
-
agenda. If multiple TSC members approve (`LGTM`) the PR and no Collaborators
116
-
oppose the PR, it can be landed. Where there is disagreement among TSC members
117
-
or objections from one or more Collaborators, `semver-major` pull requests
118
-
should be put on the TSC meeting agenda.
155
+
Note that breaking changes (that is, pull requests that require an increase in
156
+
the major version number, known as `semver-major` changes) must be [elevated for
157
+
review by the TSC](#involving-the-tsc). This does not necessarily mean that the
158
+
PR must be put onto the TSC meeting agenda. If multiple TSC members approve
159
+
(`LGTM`) the PR and no Collaborators oppose the PR, it should be landed. Where
160
+
there is disagreement among TSC members or objections from one or more
161
+
Collaborators, `semver-major` pull requests may be put on the TSC meeting
162
+
agenda.
119
163
120
164
#### Helpful resources
121
165
@@ -147,10 +191,10 @@ CI testing is done.
147
191
All bugfixes require a test case which demonstrates the defect. The
148
192
test should *fail* before the change, and *pass* after the change.
149
193
150
-
All pull requests that modify executable code should be subjected to
151
-
continuous integration tests on the
152
-
[project CI server](https://ci.nodejs.org/).
153
-
The pull request should have a CI status indicator if possible.
194
+
All pull requests that modify executable code should also include a test case
195
+
and be subjected to continuous integration tests on the
196
+
[project CI server](https://ci.nodejs.org/). The pull request should have a CI
197
+
status indicator if possible.
154
198
155
199
#### Useful CI Jobs
156
200
@@ -261,7 +305,7 @@ backward-incompatible way) without a deprecation.
261
305
Exceptions to this rule may be made in the following cases:
262
306
263
307
* Adding or removing errors thrown or reported by a Public API;
264
-
* Changing error messages;
308
+
* Changing error messages for errors without error code;
265
309
* Altering the timing and non-internal side effects of the Public API.
266
310
267
311
Such changes *must* be handled as semver-major changes but MAY be landed
@@ -431,28 +475,33 @@ The TSC should serve as the final arbiter where required.
431
475
432
476
## Landing Pull Requests
433
477
434
-
* Please never use GitHub's green ["Merge Pull Request"](https://help.github.com/articles/merging-a-pull-request/#merging-a-pull-request-on-github) button.
435
-
* If you do, please force-push removing the merge.
436
-
* Reasons for not using the web interface button:
437
-
* The merge method will add an unnecessary merge commit.
438
-
* The squash & merge method has been known to add metadata to the
439
-
commit title (the PR #).
440
-
* If more than one author has contributed to the PR, keep the most recent
441
-
author when squashing.
442
-
443
-
Review the commit message to ensure that it adheres to the guidelines outlined
444
-
in the [contributing](./doc/guides/contributing/pull-requests.md#commit-message-guidelines) guide.
445
-
446
-
Add all necessary [metadata](#metadata) to commit messages before landing.
447
-
448
-
See the commit log for examples such as
449
-
[this one](https://github.com/nodejs/node/commit/b636ba8186) if unsure
450
-
exactly how to format your commit messages.
478
+
1. Never use GitHub's green ["Merge Pull Request"][] button. Reasons for not
479
+
using the web interface button:
480
+
* The merge method will add an unnecessary merge commit.
481
+
* The squash & merge method has been known to add metadata to the commit
482
+
title (the PR #).
483
+
* If more than one author has contributed to the PR, keep the most recent
484
+
author when squashing.
485
+
1. Make sure the CI is done and the result is green. If the CI is not green,
486
+
check for flaky tests and infrastructure failures. Please check if those were
487
+
already reported in the appropriate repository ([node][flaky tests] and
488
+
[build](https://github.com/nodejs/build/issues)) or not and open new issues
489
+
in case they are not. If no CI was run or the run is outdated because code
490
+
was pushed after the last run, please first start a new CI and wait for the
491
+
result. If no CI is required, please leave a comment in case none is already
492
+
present.
493
+
1. Review the commit message to ensure that it adheres to the guidelines
494
+
outlined in the [contributing][] guide.
495
+
1. Add all necessary [metadata](#metadata) to commit messages before landing.
496
+
See the commit log for examples such as [this
497
+
one](https://github.com/nodejs/node/commit/b636ba8186) if unsure exactly how
498
+
to format your commit messages.
451
499
452
500
Additionally:
453
-
- Double check PRs to make sure the person's _full name_ and email
501
+
502
+
* Double check PRs to make sure the person's _full name_ and email
454
503
address are correct before merging.
455
-
- All commits should be self-contained (meaning every commit should pass all
504
+
* All commits should be self-contained (meaning every commit should pass all
456
505
tests). This makes it much easier when bisecting to find a breaking change.
457
506
458
507
### Using `git-node`
@@ -540,7 +589,7 @@ This will open a screen like this (in the default shell editor):
540
589
```text
541
590
pick 6928fc1 crypto: add feature A
542
591
pick 8120c4c add test for feature A
543
-
pick 51759dc feature B
592
+
pick 51759dc crypto: feature B
544
593
pick 7d6f433 test for feature B
545
594
546
595
# Rebase f9456a2..7d6f433 onto f9456a2
@@ -568,7 +617,7 @@ previous commit:
568
617
```text
569
618
pick 6928fc1 crypto: add feature A
570
619
fixup 8120c4c add test for feature A
571
-
pick 51759dc feature B
620
+
pick 51759dc crypto: feature B
572
621
fixup 7d6f433 test for feature B
573
622
```
574
623
@@ -577,7 +626,7 @@ Replace `pick` with `reword` to change the commit message:
577
626
```text
578
627
reword 6928fc1 crypto: add feature A
579
628
fixup 8120c4c add test for feature A
580
-
reword 51759dc feature B
629
+
reword 51759dc crypto: feature B
581
630
fixup 7d6f433 test for feature B
582
631
```
583
632
@@ -654,12 +703,12 @@ hint: See the 'Note about fast-forwards' in 'git push --help' for details.
654
703
```
655
704
656
705
That means a commit has landed since your last rebase against `upstream/master`.
657
-
To fix this, fetch, rebase, run the tests again (to make sure no interactions
658
-
between your changes and the new changes cause any problems), and push again:
706
+
To fix this, pull with rebase from upstream and run the tests again (to make
707
+
sure no interactions between your changes and the new changes cause any
708
+
problems), and push again:
659
709
660
710
```sh
661
-
git fetch upstream
662
-
git rebase upstream/master
711
+
git pull upstream master --rebase
663
712
make -j4 test
664
713
git push upstream master
665
714
```
@@ -713,15 +762,15 @@ and impact of the changes on the code, the risk to ecosystem stability
713
762
incurred by accepting the change, and the expected benefit that landing the
714
763
commit will have for the ecosystem.
715
764
716
-
Any collaborator who feels a semver-minor commit should be landed in an LTS
765
+
Any Collaborator who feels a semver-minor commit should be landed in an LTS
717
766
branch should attach the `lts-agenda` label to the pull request. The LTS WG
718
767
will discuss the issue and, if necessary, will escalate the issue up to the
719
768
TSC for further discussion.
720
769
721
770
#### How are LTS Branches Managed?
722
771
723
-
There are currently two LTS branches: `v6.x` and `v4.x`. Each of these is paired
724
-
with a staging branch: `v6.x-staging` and `v4.x-staging`.
772
+
There are multiple LTS branches, e.g. `v8.x` and `v6.x`. Each of these is paired
773
+
with a staging branch: `v8.x-staging` and `v6.x-staging`.
725
774
726
775
As commits land on the master branch, they are cherry-picked back to each
727
776
staging branch as appropriate. If the commit applies only to the LTS branch, the
@@ -730,16 +779,16 @@ pulled from the staging branch into the LTS branch only when a release is
730
779
being prepared and may be pulled into the LTS branch in a different order
731
780
than they were landed in staging.
732
781
733
-
Any collaborator may land commits into a staging branch, but only the release
782
+
Any Collaborator may land commits into a staging branch, but only the release
734
783
team should land commits into the LTS branch while preparing a new
735
784
LTS release.
736
785
737
786
#### How can I help?
738
787
739
-
When you send your pull request, consider including information about
740
-
whether your change is breaking. If you think your patch can be backported,
741
-
please feel free to include that information in the PR thread. For more
742
-
information on backporting, please see the [backporting guide][].
788
+
When you send your pull request, please include information about whether your
789
+
change is breaking. If you think your patch can be backported, please include
790
+
that information in the PR thread or your PR description. For more information
791
+
on backporting, please see the [backporting guide][].
743
792
744
793
Several LTS related issue and PR labels have been provided:
745
794
@@ -752,7 +801,7 @@ Several LTS related issue and PR labels have been provided:
752
801
*`land-on-v4.x` - tells the release team that the commit should be landed
753
802
in a future v4.x release
754
803
755
-
Any collaborator can attach these labels to any PR/issue. As commits are
804
+
Any Collaborator can attach these labels to any PR/issue. As commits are
756
805
landed into the staging branches, the `lts-watch-` label will be removed.
757
806
Likewise, as commits are landed in a LTS release, the `land-on-` label will
758
807
be removed.
@@ -768,6 +817,7 @@ release. This process of making a release will be a collaboration between the
0 commit comments