Skip to content

Instantly share code, notes, and snippets.

@kevinquinnyo
Created May 26, 2016 21:29
Show Gist options
  • Save kevinquinnyo/476dc75973b96ae6969d14fa4ca4ca5b to your computer and use it in GitHub Desktop.
Save kevinquinnyo/476dc75973b96ae6969d14fa4ca4ca5b to your computer and use it in GitHub Desktop.
#!/bin/bash
# .git/hooks/post-commit
txtred=$(tput setaf 1)
txtreset=$(tput sgr0)
git log -1 HEAD --pretty=format:%s | egrep -o '[A-Z]{2}-[0-9]+ #time' || \
echo -ne "\n${txtred} [!] Missing JIRA smart commit.${txtreset}\n\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment