Created
September 17, 2015 11:08
-
-
Save tekkies/3d9fb04b6e4b43618caf to your computer and use it in GitHub Desktop.
Git commit-msg hook to enforce usage of #risk and #story (e.g. #risk3, #story1234)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Save this file as .git/hooks/commit-msg | |
test "" != "$(grep '\#risk' "$1")" || { | |
echo >&2 \#risk is required in the commit message | |
exit 1 | |
} | |
test "" != "$(grep '\#story' "$1")" || { | |
echo >&2 \#story is required in the commit message | |
exit 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment