2
0
forked from Wavyzz/dolibarr

Try git commit

This commit is contained in:
ldestailleur
2025-09-16 11:42:39 +02:00
parent 29ccbb43d5
commit d121d7e173

12
dev/setup/git/hooks/msg-commit Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
# Hook to force a prefix on commits
commit_msg_file=$1
first_line=$(head -n1 "$commit_msg_file")
if echo "$first_line" | grep -Eq '^(QUAL|SEC|PERF|FIX|CLOSE|NEW|Clean code|Debug v)'; then
exit 0
else
echo "Le message de commit doit commencer par QUAL, SEC, PERF, FIX, CLOSE, NEW, Clean code, Debug v..."
exit 1
fi