From bc6d5c45a8b387a66c01f9579790ef489aba1fa9 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Fri, 26 Mar 2021 13:27:20 +0100 Subject: [PATCH] chore: further tighten git pre-receive hook --- scripts/git-pre-receive-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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