@@ -371,60 +371,45 @@ The TSC should serve as the final arbiter where required.
371
371
* If more than one author has contributed to the PR, keep the most recent
372
372
author when squashing.
373
373
374
- Always modify the original commit message to include additional meta
375
- information regarding the change process:
376
-
377
- - A ` PR-URL: ` line that references the * full* GitHub URL of the original
378
- pull request being merged so it's easy to trace a commit back to the
379
- conversation that led up to that change.
380
- - A ` Fixes: X ` line, where _ X_ either includes the * full* GitHub URL
381
- for an issue, and/or the hash and commit message if the commit fixes
382
- a bug in a previous commit. Multiple ` Fixes: ` lines may be added if
383
- appropriate.
384
- - A ` Refs: ` line referencing a URL for any relevant background.
385
- - A ` Reviewed-By: Name <email> ` line for yourself and any
386
- other Collaborators who have reviewed the change.
387
- - Useful for @mentions / contact list if something goes wrong in the PR.
388
- - Protects against the assumption that GitHub will be around forever.
389
-
390
374
Review the commit message to ensure that it adheres to the guidelines outlined
391
375
in the [ contributing] ( ./CONTRIBUTING.md#commit-message-guidelines ) guide.
392
376
377
+ Add all necessary [ metadata] ( #metadata ) to commit messages before landing.
378
+
393
379
See the commit log for examples such as
394
380
[ this one] ( https://github.com/nodejs/node/commit/b636ba8186 ) if unsure
395
381
exactly how to format your commit messages.
396
382
397
383
Additionally:
398
384
- Double check PRs to make sure the person's _ full name_ and email
399
385
address are correct before merging.
400
- - Except when updating dependencies, all commits should be self
401
- contained (meaning every commit should pass all tests). This makes
402
- it much easier when bisecting to find a breaking change.
386
+ - All commits should be self-contained (meaning every commit should pass all
387
+ tests). This makes it much easier when bisecting to find a breaking change.
403
388
404
389
### Technical HOWTO
405
390
406
- Clear any ` am ` /` rebase ` that may already be underway.
391
+ Clear any ` am ` /` rebase ` that may already be underway:
407
392
408
393
``` text
409
394
$ git am --abort
410
395
$ git rebase --abort
411
396
```
412
397
413
- Checkout proper target branch
398
+ Checkout proper target branch:
414
399
415
400
``` text
416
401
$ git checkout master
417
402
```
418
403
419
404
Update the tree (assumes your repo is set up as detailed in
420
- [ CONTRIBUTING.md] ( CONTRIBUTING.md#step-1-fork ) )
405
+ [ CONTRIBUTING.md] ( CONTRIBUTING.md#step-1-fork ) ):
421
406
422
407
``` text
423
408
$ git fetch upstream
424
409
$ git merge --ff-only upstream/master
425
410
```
426
411
427
- Apply external patches
412
+ Apply external patches:
428
413
429
414
``` text
430
415
$ curl -L https://github.com/nodejs/node/pull/xxx.patch | git am --whitespace=fix
@@ -442,21 +427,19 @@ against the original PR carefully and build/test on at least one platform
442
427
before landing. If the 3-way merge fails, then it is most likely that a conflicting
443
428
PR has landed since the CI run and you will have to ask the author to rebase.
444
429
445
- Check and re-review the changes
430
+ Check and re-review the changes:
446
431
447
432
``` text
448
433
$ git diff upstream/master
449
434
```
450
435
451
- Check number of commits and commit messages
436
+ Check number of commits and commit messages:
452
437
453
438
``` text
454
439
$ git log upstream/master...master
455
440
```
456
441
457
- If there are multiple commits that relate to the same feature or
458
- one with a feature and separate with a test for that feature,
459
- you'll need to use ` squash ` or ` fixup ` :
442
+ Squash commits and add metadata:
460
443
461
444
``` text
462
445
$ git rebase -i upstream/master
@@ -512,9 +495,29 @@ Save the file and close the editor. You'll be asked to enter a new
512
495
commit message for that commit. This is a good moment to fix incorrect
513
496
commit logs, ensure that they are properly formatted, and add
514
497
` Reviewed-By ` lines.
498
+
515
499
* The commit message text must conform to the
516
500
[ commit message guidelines] ( ./CONTRIBUTING.md#commit-message-guidelines ) .
517
501
502
+ <a name =" metadata " ></a >
503
+ * Modify the original commit message to include additional metadata regarding
504
+ the change process. (If you use Chrome or Edge, [ ` node-review ` ] [ ] fetches
505
+ the metadata for you.)
506
+
507
+ * Required: A ` PR-URL: ` line that references the * full* GitHub URL of the
508
+ original pull request being merged so it's easy to trace a commit back to
509
+ the conversation that led up to that change.
510
+ * Optional: A ` Fixes: X ` line, where _ X_ either includes the * full* GitHub URL
511
+ for an issue, and/or the hash and commit message if the commit fixes
512
+ a bug in a previous commit. Multiple ` Fixes: ` lines may be added if
513
+ appropriate.
514
+ * Optional: One or more ` Refs: ` lines referencing a URL for any relevant
515
+ background.
516
+ * Required: A ` Reviewed-By: Name <email> ` line for yourself and any
517
+ other Collaborators who have reviewed the change.
518
+ * Useful for @mentions / contact list if something goes wrong in the PR.
519
+ * Protects against the assumption that GitHub will be around forever.
520
+
518
521
Run tests (` make -j4 test ` or ` vcbuild test ` ). Even though there was a
519
522
successful continuous integration run, other changes may have landed on master
520
523
since then, so running the tests one last time locally is a good practice.
@@ -678,3 +681,4 @@ LTS working group and the Release team.
678
681
[ Stability Index ] : doc/api/documentation.md#stability-index
679
682
[ Enhancement Proposal ] : https://github.com/nodejs/node-eps
680
683
[ git-username ] : https://help.github.com/articles/setting-your-username-in-git/
684
+ [ `node-review` ] : https://github.com/evanlucas/node-review
0 commit comments