From 080334754c960d7d01e9502ff6aa73f995ab1b39 Mon Sep 17 00:00:00 2001 From: snomiao Date: Wed, 10 Sep 2025 15:25:36 +0900 Subject: [PATCH] fix: update Claude PR Review workflow to use correct action parameters (#5473) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * 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 --- .github/workflows/claude-pr-review.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/claude-pr-review.yml b/.github/workflows/claude-pr-review.yml index 3ec61cb3c..d1eecafe3 100644 --- a/.github/workflows/claude-pr-review.yml +++ b/.github/workflows/claude-pr-review.yml @@ -47,6 +47,7 @@ jobs: needs: wait-for-ci if: needs.wait-for-ci.outputs.should-proceed == 'true' runs-on: ubuntu-latest + timeout-minutes: 30 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -69,19 +70,17 @@ jobs: pnpm install -g typescript @vue/compiler-sfc - name: Run Claude PR Review - uses: anthropics/claude-code-action@main + uses: anthropics/claude-code-action@v1.0.6 with: label_trigger: "claude-review" - direct_prompt: | + 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 }} - max_turns: 256 - timeout_minutes: 30 - allowed_tools: "Bash(git:*),Bash(gh api:*),Bash(gh pr:*),Bash(gh repo:*),Bash(jq:*),Bash(echo:*),Read,Write,Edit,Glob,Grep,WebFetch" + 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'" env: PR_NUMBER: ${{ github.event.pull_request.number }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}