[#2] Commit hook won't run on master now

master^2
Jef Roosens 2021-04-02 14:48:38 +02:00
parent 0007652e68
commit 4ec6236e26
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
1 changed files with 4 additions and 0 deletions

View File

@ -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