Created
January 11, 2017 10:20
-
-
Save Martiusweb/ec3cd29d82d4b6cd2ffb8eb57f2304ec to your computer and use it in GitHub Desktop.
git hook: Grep for a JIRA ticket ID in a commit message
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 | |
gtest "" = "$(grep '[A-Z]\+-[0-9]\+' "$1")" && { | |
echo >&2 "Sorry, I can't find a JIRA ticket ID in this commit message" | |
exit 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment