From 6906b663418d7bb4d2362aa9af648b47b037036e Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Mon, 29 Apr 2024 21:53:57 +0000 Subject: [PATCH] docs: suggest using ./scripts/check-commit-messages.sh as commit-lint git hook --- COMMITS.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/COMMITS.md b/COMMITS.md index 4951a1b28c48..ec43c9ff8a6b 100644 --- a/COMMITS.md +++ b/COMMITS.md @@ -17,17 +17,7 @@ Use this git hook to auto-check your commit messages. Save the following snippet ```bash #!/bin/sh -commit_msg=$(cat "$1") -if echo "$commit_msg" | grep -qE "^(Revert|fixup! )"; then - # Skip validation in case of fixup and revert commits - exit 0 -fi - -if ! grep -qE "^(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert)(\([a-z, -]+\))?: " "$1" ; then - echo "Conventional Commits validation failed" - exit 1 -fi - +LINT_COMMIT_MSG="$1" ./scripts/check-commit-messages.sh ``` If you want to bypass commit-msg hook check, you may always use