diff --git a/scripts/git-pre-receive-hook.sh b/scripts/git-pre-receive-hook.sh index 2857d5e0..b9a7d398 100644 --- a/scripts/git-pre-receive-hook.sh +++ b/scripts/git-pre-receive-hook.sh @@ -8,7 +8,7 @@ set -e zero_commit='0000000000000000000000000000000000000000' -msg_regex='^((fixup! |squash! )?(\w+)(?:\(([^\)\s]+)\))?: (.+))(?:\n|$){0,2}?((?:^.+(\n|$))+(?:\n|$){0,2}?)*((?:^.+(\n|$))+)*' +msg_regex='^((fixup! |squash! )?(fix|feat|build|chore|ci|docs|style|refactor|perf|test)(?:\(([^\)\s]+)\))?: (.+))(?:\n|$){0,2}?((?:^.+(\n|$))+(?:\n|$){0,2}?)*((?:^.+(\n|$))+)*' while read -r oldrev newrev refname; do # Branch or tag got deleted, ignore the push