fix: Claude Code hooks の matcher 構文を修正 - #455
Conversation
`tool_name == 'Bash'` などの式構文はサポートされていないため、 正しいパターンマッチ構文 `Bash` に修正。 修正内容: - PreToolUse: block_git_no_verify.py, pre_git_quality_gates.py, pre_exit_plan_ai_review.py - PostToolUse: post_git_push_ci.py, post_pr_ai_review.py Closes #454 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughCorrects matcher syntax in Claude Code hooks configuration from expression format ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
コードレビュー結果✅ 総合評価: 承認(条件付き)このPRは重要なバグ修正であり、hooks が正常に動作するようにするための必須の変更です。 📋 レビュー詳細1. コード品質とベストプラクティス ⭐⭐⭐⭐⭐良い点:
変更内容: - "matcher": "tool_name == 'Bash'"
+ "matcher": "Bash"
- "matcher": "tool_name == 'ExitPlanMode'"
+ "matcher": "ExitPlanMode"2. 潜在的なバグ・問題
|
|
🎉 This PR is included in version 1.69.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
tool_name == 'Bash'→Bash(正しいパターンマッチ構文)問題
~/.claude/settings.jsonの hooks 設定で、式構文(tool_name == '...')が使用されていたため、ユーザーレベルのフックが一切実行されていなかった。
影響を受けていたフック
block_git_no_verify.py--no-verifyのブロックpre_git_quality_gates.pypre_exit_plan_ai_review.pypost_git_push_ci.pypost_pr_ai_review.py確認済み
Elu-co-jp/cyber_ace_1on1で手動修正後、正常動作を確認Closes #454
🤖 Generated with Claude Code
Summary by CodeRabbit