mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
13 lines
338 B
Bash
Executable File
13 lines
338 B
Bash
Executable File
#!/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
|