Skip to content

Instantly share code, notes, and snippets.

@wickdninja
Created December 22, 2017 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wickdninja/609f102b53421a9e7c3d0a3882bf53dc to your computer and use it in GitHub Desktop.
Save wickdninja/609f102b53421a9e7c3d0a3882bf53dc to your computer and use it in GitHub Desktop.
#!/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