-
Notifications
You must be signed in to change notification settings - Fork 453
fix: update Claude PR Review workflow to use correct action parameters #5473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Changed 'direct_prompt' to 'prompt' (correct parameter name) - Moved max_turns and timeout to claude_args parameter - Changed allowed_tools to additional_permissions parameter The workflow was failing silently because it was using invalid input parameters that the claude-code-action doesn't recognize. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
🎭 Playwright Test Results✅ Tests completed successfully! ⏰ Completed at: 09/10/2025, 06:16:42 AM UTC 📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Using @main tag could cause unexpected breakage when the action updates. Pinning to a specific version ensures stability.
Review: Migration to claude-code-action v1.0I've reviewed this PR against the official migration guide and found a few issues: ✅ Correctly Fixed
|
- Moved timeout-minutes to job level (not in claude_args) - Changed additional_permissions to --allowedTools in claude_args - Fixed tool specification format per migration guide These changes follow the official v0.x to v1.0 migration guide exactly.
✅ Update: All Issues FixedThe review feedback has been implemented in commit 5f6df80: Applied Fixes
Current Implementation (Correct)claude-review:
needs: wait-for-ci
if: needs.wait-for-ci.outputs.should-proceed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30 # ✅ At job level as per migration guide
steps:
# ... other steps ...
- name: Run Claude PR Review
uses: anthropics/[email protected] # ✅ Pinned version
with:
label_trigger: "claude-review"
prompt: | # ✅ Correct parameter name (was direct_prompt)
Read the file .claude/commands/comprehensive-pr-review.md and follow ALL the instructions exactly.
CRITICAL: You must post individual inline comments using the gh api commands shown in the file.
DO NOT create a summary comment.
Each issue must be posted as a separate inline comment on the specific line of code.
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
claude_args: "--max-turns 256 --allowedTools 'Bash(git:*),Bash(gh api:*),Bash(gh pr:*),Bash(gh repo:*),Bash(jq:*),Bash(echo:*),Read,Write,Edit,Glob,Grep,WebFetch'" # ✅ Correct format per migration guideThe workflow now fully complies with the v0.x to v1.0 migration guide and should work correctly when the claude-review label is applied. |
christian-byrne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TY!
#5473) * fix: update Claude PR Review workflow to use correct action parameters - Changed 'direct_prompt' to 'prompt' (correct parameter name) - Moved max_turns and timeout to claude_args parameter - Changed allowed_tools to additional_permissions parameter The workflow was failing silently because it was using invalid input parameters that the claude-code-action doesn't recognize. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * fix: pin claude-code-action to v1.0.6 to prevent future breakage Using @main tag could cause unexpected breakage when the action updates. Pinning to a specific version ensures stability. * fix: apply review feedback - correct migration to v1.0 format - Moved timeout-minutes to job level (not in claude_args) - Changed additional_permissions to --allowedTools in claude_args - Fixed tool specification format per migration guide These changes follow the official v0.x to v1.0 migration guide exactly. --------- Co-authored-by: Claude <[email protected]>
#5473) * fix: update Claude PR Review workflow to use correct action parameters - Changed 'direct_prompt' to 'prompt' (correct parameter name) - Moved max_turns and timeout to claude_args parameter - Changed allowed_tools to additional_permissions parameter The workflow was failing silently because it was using invalid input parameters that the claude-code-action doesn't recognize. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * fix: pin claude-code-action to v1.0.6 to prevent future breakage Using @main tag could cause unexpected breakage when the action updates. Pinning to a specific version ensures stability. * fix: apply review feedback - correct migration to v1.0 format - Moved timeout-minutes to job level (not in claude_args) - Changed additional_permissions to --allowedTools in claude_args - Fixed tool specification format per migration guide These changes follow the official v0.x to v1.0 migration guide exactly. --------- Co-authored-by: Claude <[email protected]>
Problem
The claude-review label workflow wasn't working in PR #5458 because the workflow file was using deprecated input parameters from v0.x of the anthropics/claude-code-action.
Root Cause
According to the migration guide, the action underwent significant changes from v0.x to v1.0. Our workflow was still using the old v0.x parameters:
direct_promptinstead ofpromptmax_turnsas a direct input instead of throughclaude_argstimeout_minutesas a direct input (should be set at job level or via claude_args)allowed_toolsinstead of usingclaude_argsoradditional_permissionsThese deprecated parameters are not recognized by v1.0+, causing the action to fail silently with a warning about unexpected inputs.
Solution
Updated parameters following the v0.x to v1.0 migration guide:
direct_prompt→promptclaude_argsparameter as--max-turns 256 --timeout 30allowed_tools→additional_permissionsPinned version to
v1.0.6instead of using@mainto prevent future breakage from unexpected updatesTesting
This should be tested by:
References
🤖 Generated with Claude Code