commit-msg 303 B

12345678
  1. npx --no-install commitlint --edit "$1"
  2. # Check if commit message contains Signed-off-by line
  3. if ! grep -q "^Signed-off-by:" "$1"; then
  4. echo "Commit message must contain a 'Signed-off-by:' line."
  5. echo "Please use 'git commit --signoff' or add a Signed-off-by line to your commit message."
  6. exit 1
  7. fi