Add commit-msg hook and update docs (#16)

This commit is contained in:
Leendert de Borst
2024-06-17 11:09:23 +02:00
committed by Leendert de Borst
parent 655978d3a1
commit a4e60073f0
2 changed files with 36 additions and 6 deletions

10
.github/hooks/commit-msg vendored Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
# Commit-msg hook to check commit messages for issue number in format "(#123)"
commit_message=$(cat "$1")
if ! grep -q "(\#[0-9]\+)" <<< "$commit_message"; then
echo "Error: Commit message must contain an issue number in the format \"(#123)\""
exit 1
fi