Skip to content

Commit

Permalink
docs: suggest using ./scripts/check-commit-messages.sh as commit-lint…
Browse files Browse the repository at this point in the history
… git hook
  • Loading branch information
legobeat committed May 2, 2024
1 parent 93f1c98 commit 6906b66
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions COMMITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6906b66

Please sign in to comment.