mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 20:12:08 +01:00
- Fix markdown list spacing (MD030) in performance, audit logs, and CSP docs - Remove ineffective while loop in commit-msg hook that caused subshell issues - Improve fetchWithRetry function with proper retry limits and exponential backoff - Update CSP metrics retention documentation for consistency
27 lines
986 B
Bash
Executable File
27 lines
986 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check for Claude Code attribution in commit messages
|
|
# This hook prevents commits that contain self-promotional attribution
|
|
|
|
commit_msg_file="$1"
|
|
commit_msg=$(cat "$commit_msg_file")
|
|
|
|
# Check for Claude Code attribution patterns
|
|
if echo "$commit_msg" | grep -E -q "(🤖.*Generated.*Claude|Claude Code|claude\.ai/code|Co-Authored-By:.*Claude|noreply@anthropic\.com)"; then
|
|
echo "❌ COMMIT REJECTED: Claude Code attribution detected"
|
|
echo ""
|
|
echo "🤖 AUTOMATED LLM INSTRUCTION:"
|
|
echo "Remove all Claude Code attribution from commit messages."
|
|
echo "Patterns to avoid:"
|
|
echo " - 🤖 Generated with [Claude Code]"
|
|
echo " - Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
echo " - References to claude.ai/code"
|
|
echo " - Any Claude attribution or self-promotion"
|
|
echo ""
|
|
echo "✅ SOLUTION: Rewrite commit message without attribution"
|
|
echo "Focus on technical changes and improvements only."
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Commit message approved"
|
|
exit 0 |