This file contains hidden or 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/bash | |
# This hook checks if git commit message (first line) contains Jira | |
# ticket (for example TEST-123) and if not prepends it to commit message | |
# based on current branch name (for example from bugfix/TEST-123-quickfix | |
# branch name we'll prepend "TEST-123:" to git commit message) | |
# This script is called by "git commit" with one argument, the name of | |
# the file that has the commit message. The hook should exit with non-zero | |
# status after issuing an appropriate message if it wants to stop the |