We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 570afde commit 72da9ddCopy full SHA for 72da9dd
1 file changed
scripts/git-hooks/commit-msg
@@ -0,0 +1,8 @@
1
+#!/bin/sh
2
+# Validates conventional commits format (install: git config core.hooksPath scripts/git-hooks).
3
+pattern="^(feat|fix|docs|refactor|perf|test|chore|style)(\(.+\))?: .{1,100}"
4
+if ! grep -qE "$pattern" "$1"; then
5
+ echo "ERROR: Commit message does not follow Conventional Commits format."
6
+ echo "Please see CONTRIBUTING.md for accepted formats."
7
+ exit 1
8
+fi
0 commit comments