- 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
5 lines
230 B
Bash
Executable File
5 lines
230 B
Bash
Executable File
#!/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"
|