Files
jpexs-decompiler/.githooks/commit-msg
2026-04-06 21:06:19 +02:00

16 lines
533 B
Bash

#!/bin/sh
# Enforce conventional commits: type(scope): description
# Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
msg=$(head -1 "$1")
if ! echo "$msg" | grep -qE '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?: .+$'; then
echo "ERROR: Commit message must follow Conventional Commits format:"
echo " type(scope): description"
echo ""
echo " Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
echo ""
echo " Got: $msg"
exit 1
fi