Skip to content

Commit 17a7a2f

Browse files
committed
fix(hooks): improve AI attribution detection in pre-push hook
1 parent 66b78eb commit 17a7a2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.git-hooks/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ while read local_ref local_sha remote_ref remote_sha; do
4444
while IFS= read -r commit_sha; do
4545
full_msg=$(git log -1 --format='%B' "$commit_sha")
4646

47-
if echo "$full_msg" | grep -qiE "(Generated with|Co-Authored-By: Claude|Co-Authored-By: AI|🤖 Generated|AI generated|Claude Code|@anthropic|Assistant:|Generated by Claude|Machine generated)"; then
47+
if echo "$full_msg" | grep -qiE "(Generated with.*(Claude|AI)|Co-Authored-By: Claude|Co-Authored-By: AI|🤖 Generated|AI generated|@anthropic\.com|Assistant:|Generated by Claude|Machine generated)"; then
4848
if [ $ERRORS -eq 0 ]; then
4949
printf "${RED}✗ BLOCKED: AI attribution found in commit messages!${NC}\n"
5050
printf "Commits with AI attribution:\n"

0 commit comments

Comments
 (0)