onboarding.md
This document is an outline of the things we tell new collaborators at their onboarding session.
@node-core/utils and
set up the credentials for it.git:
git config --global --add apply.whitespace fixnodejs/node repository are only for release linesupstream remote:
git remote add upstream [email protected]:nodejs/node.gitupstream:
git checkout maingit fetch upstream HEADgit reset --hard FETCH_HEADNotifications:
The project has a venue for real-time discussion:
Collaborators are the collective owners of the project
There are some higher-level goals and values
You are expected to follow and hold others accountable to the Code of Conduct.
You have (mostly) free rein; don't hesitate to close an issue if you are confident that it should be closed.
See Labels.
doc, test, assert, or buffer)
so that we know what parts of the code base the pull request modifies. It is
not perfect, of course. Feel free to apply relevant labels and remove
irrelevant labels from pull requests and issues.semver-{minor,major}:
semver-major labelsemver-* label, add a comment explaining why you're adding
it. Do it right away so you don't forget!author-ready label for pull requests, if applicable.See Who to CC in the issue tracker.
When a discussion gets heated, you can request that other collaborators keep an eye on it by opening an issue at the private nodejs/moderation repository. Note that while that repository is not public, it can be accessed by anyone in the nodejs org, so refrain from using it to report individuals (reporting spam/bots there is fine of course).
nodejs GitHub
organization (not just collaborators on Node.js core) have access. Its
contents should not be shared externally.The primary goal is for the codebase to improve.
Secondary (but not far off) is for the person submitting code to succeed. A pull request from a new contributor is an opportunity to grow the community.
Review a bit at a time. Do not overwhelm new contributors.
Be aware: Your opinion carries a lot of weight!
Nits (requests for small changes that are not essential) are fine, but try to avoid stalling the pull request.
Nit: change foo() to bar().Insofar as possible, issues should be identified by tools rather than human reviewers. If you are leaving comments about issues that could be identified by tools but are not, consider implementing the necessary tooling.
Minimum wait for comments time
Approving a change
LGTM (“Looks Good To Me”)Changes requested, show empathy – comments will
usually be addressed even if you don't use it.
Changes requested review.Changes requested to indicate that you are considering some of your
comments to block the pull request from landing.What belongs in Node.js:
url is there because of http, freelist is there
because of http, etc.async_hooks.Continuous Integration (CI) Testing:
node-test-pull-request most of the time. Go there now!
Build with Parameters. (If you
don't see it, that probably means you are not logged in!) Click it now!CERTIFY_SAFE box should be checked. By checking it, you are
indicating that you have reviewed the code you are about to test and you
are confident that it does not contain any malicious code. (We don't want
people hijacking our CI hosts to attack other hosts on the internet, for
example!)PR_ID box should be filled in with the number identifying the pull
request containing the code you wish to test. For example, if the URL for
the pull request is https://github.com/nodejs/node/issues/7006, then put
7006 in the PR_ID.See the Collaborator Guide: Landing pull requests.
Commits in one pull request that belong to one logical change should be squashed. It is rarely the case in onboarding exercises, so this needs to be pointed out separately during the onboarding.
<!-- TODO(joyeechueng): provide examples about "one logical change" -->Example: https://github.com/nodejs/node/commit/6669b3857f0f43ee0296eb7ac45086cd907b9e94
git show --format=%B 6669b3857f0f43ee0296eb7ac45086cd907b9e94Collaborators are in alphabetical order by GitHub username.
Optionally, include your personal pronouns.
Commit, including a Fixes: <collaborator-nomination-issue-url> trailer
so that when the commit lands, the nomination issue url will be
automatically closed.
Run tools/find-inactive-collaborators.mjs. If that command outputs your name,
amend the commit to include an addition to the mailmap file. See
gitmailmap for information on the
format of the mailmap file.
Push the commit to your own fork.
Label your pull request with the doc, notable-change, and fast-track
labels. The fast-track label should cause the Node.js GitHub bot to post a
comment in the pull request asking collaborators to approve the pull request
by leaving a 👍 reaction on the comment.
Optional: Run Jenkins CI on the pull request. Use the node-test-pull-request
task. As a convenience, you may apply the request-ci label to the pull
request to have a GitHub Actions workflow start the Jenkins CI task for you.
After two Collaborator approvals for the change and two Collaborator approvals for fast-tracking, land the PR. If you have started a full Jenkins CI, cancel it from the Jenkins UI since the PR is a doc-only change and does not need a full CI run, it is just run as an exercise.
If there are not enough approvals within a reasonable time, consider the single approval of the onboarding TSC member sufficient, and land the pull request.
PR-URL: <full-pr-url> and appropriate Reviewed-By:
metadata.@node-core/utils automates the generation of metadata and the landing
process. See the documentation of git-node.core-validate-commit automates the validation of commit messages.
This will be run during git node land --final of the git-node
command.commit-queue label to have the
commit queued for landing by the Node.js GitHub bot. But as exercise it is
also useful to learn how to land commits manually in case the bot or the CI
is broken.If you are landing the commit manually, to make it appear as "Merged" on GitHub,
after you prepare the landed commit on the local main branch, run this:
git push --force-with-lease your-fork-remote HEAD:your-pr-branch # Update the PR branch in your fork.
git push upstream main # Push the landed commit to the upstream main branch.
GitHub will automatically detect that the PR branch is now identical to the
main branch and will mark the PR as "Merged".