chore(ci): auto-append Signed-off-by via husky prepare-commit-msg#1742
chore(ci): auto-append Signed-off-by via husky prepare-commit-msg#1742edda wants to merge 1 commit into
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR adds a Husky prepare-commit-msg hook to automatically append a Signed-off-by: trailer based on the developer’s local git identity, aiming to make DCO compliance automatic and consistent across commits.
Changes:
- Introduces
.husky/prepare-commit-msgto append aSigned-off-by:trailer viagit interpret-trailers. - Skips certain commit message sources (currently merge/squash) and no-ops when
user.name/user.emailare not configured. - Avoids re-adding the exact same trailer if already present.
Adds a husky prepare-commit-msg hook that appends a Signed-off-by trailer using the committer's git identity. DCO checks now pass without contributors having to remember -s on every commit. The hook is idempotent (skips if trailer already present) and skips merge/squash/commit sources where git generates the message itself or reuses an existing one (e.g. amend, rebase pickup). Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
10c5046 to
d758655
Compare
Summary
Adds a
prepare-commit-msghusky hook that auto-appends aSigned-off-by:trailer using the committer's git identity. DCO checks pass without contributors having to remember-son every commit.-swas used or on rebase --signoff)user.name/user.emailaren't configured (lets git's own error surface normally)Test plan
-sand verified the trailer was appended automatically (see commit message)-s, confirm trailer is added