Created
December 22, 2017 14:42
-
-
Save wickdninja/609f102b53421a9e7c3d0a3882bf53dc to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Require Jira Ticket in commit message | |
WARNING="Jira ABP ticket reference NOT FOUND but is required!" | |
MESSAGE=$(<$1) | |
case "$MESSAGE" in | |
"ABP-"*) | |
exit 0; | |
;; | |
*"ABP-"*) | |
WARNING="Jira ABP reference MUST be the 1st token in your message!" | |
;; | |
esac | |
echo $WARNING | |
echo "Example" | |
echo "git commit -m 'ABP-1234 #resolve #time 3h 20m'" | |
exit -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment