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: 1 - 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" bedrock_model_id: "us.anthropic.claude-sonnet-4-5-20250929-v1:0" 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" bedrock_model_id: "us.anthropic.claude-sonnet-4-5-20250929-v1:0" github_token: ${{ secrets.GITHUB_TOKEN }} direct_prompt: | Review this PR by examining the diff carefully. For each issue you find: 1. Use the GitHub inline comment tool to add comments directly on the specific lines of code that have issues 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 of your review.