fix: allow revert: in the commit-msg type list
Standard conventional type, missing from the regex. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -13,9 +13,9 @@ case "$first_line" in
|
|||||||
"Merge "*|"Revert "*) exit 0 ;;
|
"Merge "*|"Revert "*) exit 0 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if ! printf '%s' "$first_line" | grep -qE '^(feat|fix|docs|refactor|chore|test|style|ci|perf|build)(\([a-z0-9 -]+\))?: .{1,}$'; then
|
if ! printf '%s' "$first_line" | grep -qE '^(feat|fix|docs|refactor|chore|test|style|ci|perf|build|revert)(\([a-z0-9 -]+\))?: .{1,}$'; then
|
||||||
echo "commit-msg: subject must be '<type>: <subject>' (lowercase type)." >&2
|
echo "commit-msg: subject must be '<type>: <subject>' (lowercase type)." >&2
|
||||||
echo " types: feat fix docs refactor chore test style ci perf build" >&2
|
echo " types: feat fix docs refactor chore test style ci perf build revert" >&2
|
||||||
echo " got: $first_line" >&2
|
echo " got: $first_line" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user