From 71021e60cf18763e6dd7cb93b4a845c9809e4765 Mon Sep 17 00:00:00 2001 From: Marcos Paulo Date: Sat, 5 Sep 2026 03:41:28 +0000 Subject: [PATCH] fix: allow revert: in the commit-msg type list Standard conventional type, missing from the regex. Co-Authored-By: Claude Opus 5 --- .husky/commit-msg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index d19d816..960d544 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -13,9 +13,9 @@ case "$first_line" in "Merge "*|"Revert "*) exit 0 ;; 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 ': ' (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 exit 1 fi