diff --git a/.husky/commit-msg b/.husky/commit-msg index c08309a..bb8852e 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1,6 @@ +if ! git interpret-trailers --parse "$1" | grep -Eq '^Signed-off-by: .+ <[^<>[:space:]]+>$'; then + echo "Commit rejected: add a Signed-off-by trailer with 'git commit -s'." >&2 + exit 1 +fi + bunx --no -- commitlint --edit "$1"