chore(build): commit-msg 拦截 AI 署名

This commit is contained in:
Zhou Weidong authored and trae-solo-agent committed 2026-10-21 22:10:35 +08:00
1 parent 4841b0bc24
commit 836600b811
1 file changed
+5
+5
View File
@@ -1,4 +1,9 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
if grep -qiE "(co-authored-by|generated with|assisted by).*(cursor|claude|codex|gpt|copilot|ai)" "$1"; then
echo "commit message contains AI attribution, remove it before committing" >&2
exit 1
fi
pnpm commitlint --edit "$1" pnpm commitlint --edit "$1"