1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16675] Restore commit message checks

PHPBB3-16675
This commit is contained in:
rxu
2021-01-05 21:46:51 +07:00
parent 82da2e133b
commit 937305bc41
2 changed files with 16 additions and 4 deletions

View File

@@ -24,7 +24,17 @@ COMMIT_MSG_HOOK_FATAL=$(git config --bool phpbb.hooks.commit-msg.fatal 2> /dev/n
git config phpbb.hooks.commit-msg.fatal true
EXIT_STATUS=0
for COMMIT_HASH in $(git rev-list --no-merges "$COMMIT_RANGE")
COMMIT_HASHES=$(git rev-list --no-merges "$COMMIT_RANGE")
# If any message have been returned instead of commit hashes list
# send a non-zero exit status upstream.
if ! [[ "$COMMIT_HASHES" =~ ^[0-9a-f]{5,40} ]]
then
EXIT_STATUS=1
fi
for COMMIT_HASH in $COMMIT_HASHES
do
echo "Inspecting commit message of commit $COMMIT_HASH"