diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index a433fd2..89b3cca 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -37,15 +37,15 @@ jobs: - name: Run Claude Code Review id: claude-review - uses: anthropics/claude-code-action@28f83620103c48a57093dcc2837eec89e036bb9f # beta + uses: anthropics/claude-code-action@9d7150bc8a3dae8149739a88019d192b579ad90c # v1.0.193 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) - model: "claude-opus-4-8" + claude_args: | + --model claude-opus-4-8 # Direct prompt for automated review (no @claude mention needed) - direct_prompt: | + prompt: | Please review this pull request and provide feedback on: - Code quality and best practices - Potential bugs or issues @@ -59,7 +59,7 @@ jobs: # use_sticky_comment: true # Optional: Customize review based on file types - # direct_prompt: | + # prompt: | # Review this PR focusing on: # - For TypeScript files: Type safety and proper interface usage # - For API endpoints: Security, input validation, and error handling @@ -67,13 +67,13 @@ jobs: # - For tests: Coverage, edge cases, and test quality # Optional: Different prompts for different authors - # direct_prompt: | + # prompt: | # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || # 'Please provide a thorough code review focusing on our coding standards and best practices.' }} - # Optional: Add specific tools for running tests or linting - # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)" + # Optional: Add this line to claude_args above to allow test or lint commands + # --allowedTools "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)" # Optional: Skip review for certain conditions # if: | diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 2e4e7e6..acfc196 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -35,7 +35,7 @@ jobs: - name: Run Claude Code id: claude - uses: anthropics/claude-code-action@28f83620103c48a57093dcc2837eec89e036bb9f # beta + uses: anthropics/claude-code-action@9d7150bc8a3dae8149739a88019d192b579ad90c # v1.0.193 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} @@ -43,8 +43,9 @@ jobs: additional_permissions: | actions: read - # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) - model: "claude-opus-4-8" + claude_args: | + --model claude-opus-4-8 + --allowedTools "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" # Optional: Customize the trigger phrase (default: @claude) # trigger_phrase: "/claude" @@ -52,9 +53,6 @@ jobs: # Optional: Trigger when specific user is assigned to an issue # assignee_trigger: "claude-bot" - # Optional: Allow Claude to run specific commands - allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" - # Optional: Add custom instructions for Claude to customize its behavior for your project # custom_instructions: | # Follow our coding standards