From d121d7e1735a7d52bd6cd6c3239e22a04f778673 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 16 Sep 2025 11:42:39 +0200 Subject: [PATCH] Try git commit --- dev/setup/git/hooks/msg-commit | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 dev/setup/git/hooks/msg-commit diff --git a/dev/setup/git/hooks/msg-commit b/dev/setup/git/hooks/msg-commit new file mode 100755 index 00000000000..eb987f03cc7 --- /dev/null +++ b/dev/setup/git/hooks/msg-commit @@ -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