Situation
If linting finds a problem with a missing Signed-off-by trailer, then the logs contain the following error:
Error: not ok 6 signed-off-by: Commit must have a "Signed-off-by" trailer ()
...
...
...
# Please review the commit message guidelines:
# https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines
https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines says:
- Your commit must contain the
Signed-off-by line with your name and email
address as an acknowledgement that you agree to the Developer Certificate of Origin.
Bot generated commits are exempt from this requirement. If a commit has
multiple authors, the Signed-off-by line should be added for each author;
and at least one should match the author information in the commit metadata.
This rule does not apply to dependency updates (e.g. cherry-picks), release
commits, or backport commits.
It does not however give the details that were in issue #62577 and that said:
How?
When you create a commit, use the -s flag, e.g. git commit -s. This will automatically add the Signed-off-by trailer in your commit message using your configured named (sic) and email address.
Suggestion
Add detail to https://github.com/nodejs/node/blob/main/doc/contributing/pull-requests.md#commit-message-guidelines to instruct how to add a Signed-off-by trailer automatically to a commit.
Link to the git documentation:
https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s
with the git commit options:
-s
--signoff
Possibly mention also the "Signed-off-by" trailer option in the commit options menu in GitHub Desktop, added to 3.5.7, Mar 31, 2026, through desktop/desktop#21741 (Thanks to @JakobJingleheimer for spotting this function, which only seems to be documented in the GitHub Desktop release notes!)
Situation
If linting finds a problem with a missing
Signed-off-bytrailer, then the logs contain the following error:https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines says:
Signed-off-byline with your name and emailaddress as an acknowledgement that you agree to the Developer Certificate of Origin.
Bot generated commits are exempt from this requirement. If a commit has
multiple authors, the
Signed-off-byline should be added for each author;and at least one should match the author information in the commit metadata.
This rule does not apply to dependency updates (e.g. cherry-picks), release
commits, or backport commits.
It does not however give the details that were in issue #62577 and that said:
How?
When you create a commit, use the
-sflag, e.g.git commit -s. This will automatically add theSigned-off-bytrailer in your commit message using your configured named (sic) and email address.Suggestion
Add detail to https://github.com/nodejs/node/blob/main/doc/contributing/pull-requests.md#commit-message-guidelines to instruct how to add a
Signed-off-bytrailer automatically to a commit.Link to the
gitdocumentation:https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s
with the
git commitoptions:-s
--signoff
Possibly mention also the "Signed-off-by" trailer option in the commit options menu in GitHub Desktop, added to 3.5.7, Mar 31, 2026, through desktop/desktop#21741 (Thanks to @JakobJingleheimer for spotting this function, which only seems to be documented in the GitHub Desktop release notes!)