name: Claude Code on: issue_comment: types: [created] pull_request_review_comment: types: [created] issues: types: [opened, assigned] pull_request_review: types: [submitted] pull_request: types: [opened, synchronize] jobs: claude: if: | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || (github.event_name == 'issues' && contains(github.event.issue.body, '@claude')) runs-on: ubuntu-latest permissions: contents: write pull-requests: write issues: write id-token: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} aws-region: us-east-1 - name: Run Claude Code uses: anthropics/claude-code-action@v1 with: use_bedrock: "true" github_token: ${{ secrets.GITHUB_TOKEN }} pr-review: if: github.event_name == 'pull_request' runs-on: ubuntu-latest permissions: contents: read pull-requests: write id-token: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} aws-region: us-east-1 - name: Run Claude Code PR Review uses: anthropics/claude-code-action@v1 with: use_bedrock: "true" github_token: ${{ secrets.GITHUB_TOKEN }} prompt: | REPO: ${{ github.repository }} PR NUMBER: ${{ github.event.pull_request.number }} Review this PR by examining the diff carefully. For each issue you find: 1. Use `mcp__github_inline_comment__create_inline_comment` to add comments directly on specific lines of code 2. Include code suggestions using GitHub's suggestion syntax when appropriate: ```suggestion // corrected code here ``` Focus on: - Bugs and logic errors - Security vulnerabilities - Performance issues - Code quality problems Be concise. Only comment on significant issues, not style nitpicks. After adding inline comments, provide a brief summary. claude_args: | --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"