Last active
June 20, 2016 12:47
-
-
Save jabranr/c355742fafc862cdd56f0919aea93849 to your computer and use it in GitHub Desktop.
PUT a JIRA ticket numebr into 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
# Save in .git/hooks/prepare-commit-msg | |
# | |
# This means that current branch was branched | |
# out from JIRA/Bitbucket and has a JIRA | |
# ticket number in its name. | |
JIRA=$(cat .git/HEAD | grep -Eo "[A-Z]+-[0-9]+") | |
echo "$JIRA" >> "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment