fix: Add GitHub Actions-level filtering for Claude workflow triggers - #9
Merged
Conversation
Prevent wasteful job runs by filtering at the GitHub Actions level instead of relying solely on internal trigger_phrase checking. Changes: - claude.yml: Only run on issues or comments/reviews containing @claude - claude-code-review.yml: Only run on PR open or comments with /review This prevents VMs from starting and consuming runner minutes for comments that don't contain the required trigger phrases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Use the dedicated 'settings' parameter for specifying the settings file instead of passing it through claude_args. This is the recommended approach per the claude-code-action documentation. Reference: https://github.com/anthropics/claude-code-action/blob/main/docs/configuration.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
if:conditions to Claude workflows to filter at GitHub Actions levelsettings:parameter instead ofclaude_argsfor settings fileProblem
Previously, the workflows relied solely on the
trigger_phraseparameter inside theclaude-code-action, which meant:Solution
Added GitHub Actions-level
if:conditions that check trigger phrases before starting jobs:claude.yml@claudeis presentsettings:parameter for settings file (recommended approach)claude-code-review.yml/reviewis presentImpact
✅ Prevents unnecessary VM starts
✅ Reduces runner minute consumption
✅ Jobs skip entirely when trigger phrases are absent
✅ Same functionality for users (trigger phrases still work the same)
✅ Follows recommended configuration approach
Test plan
🤖 Generated with Claude Code