mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-28 19:01:34 +00:00
Pushing the hook through the GitHub contents API dropped its mode to 100644. assertHookMode caught it on the next commit, which is the gate working as intended — a non-executable commit-msg would simply never run. Also brings dev in line with the turn-limit fix already on main. Issue: #116 User-Visible: no
15 lines
390 B
Bash
Executable File
15 lines
390 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
message_file=$1
|
|
|
|
# Git-generated merge commits do not represent an independently authored
|
|
# product change and inherit provenance from their parents.
|
|
case "${message_file##*/}" in
|
|
MERGE_MSG) exit 0 ;;
|
|
esac
|
|
|
|
repo_root=$(git rev-parse --show-toplevel)
|
|
node "$repo_root/scripts/validate-commit-provenance.mjs" \
|
|
--message-file "$message_file" --staged --check-hook-mode
|