diff --git a/.hooks/commit-msg b/.hooks/commit-msg index 81ec68e..284ee8d 100755 --- a/.hooks/commit-msg +++ b/.hooks/commit-msg @@ -4,6 +4,10 @@ # tries to derive that number from the branch name branch=`git rev-parse --abbrev-ref HEAD` + +# This check doesn't need to run when commiting to develop/master +[[ "$branch" =~ ^master|develop$ ]] && exit 0 + issue_num=`echo "$branch" | grep -Po '^[0-9]+(?=-)'` # Check if issue number is already present