Add commit message normalizer hook and install script
- scripts/normalize-commit-msg.js: capitalizes subject, strips trailing period, trims whitespace, warns when subject > 72 chars - scripts/commit-msg: shell wrapper symlinked into .git/hooks/commit-msg - scripts/install-hooks.sh: contributor setup script (sh scripts/install-hooks.sh) - scripts/package.json: test runner + hooks:install npm script - scripts/__tests__/normalize-commit-msg.test.js: 15 unit tests Nightshift-Task: commit-normalize Nightshift-Ref: https://github.com/marcus/nightshift
This commit is contained in:
4
scripts/commit-msg
Executable file
4
scripts/commit-msg
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
# Git commit-msg hook — delegates to normalize-commit-msg.js
|
||||
# This file is symlinked into .git/hooks/commit-msg by scripts/install-hooks.sh
|
||||
node "$(git rev-parse --show-toplevel)/scripts/normalize-commit-msg.js" "$1"
|
||||
Reference in New Issue
Block a user