Skip to content

Instantly share code, notes, and snippets.

@sajnikanth
Created February 22, 2014 01:40
Show Gist options
  • Save sajnikanth/9147365 to your computer and use it in GitHub Desktop.
Save sajnikanth/9147365 to your computer and use it in GitHub Desktop.
Pre-commit hook for JIRA
#!/bin/sh
project_key="DESK-"
test "" != "$(grep $project_key "$1")" || {
echo >&2 "ERROR: Commit message is missing JIRA ticket number"
exit 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment