name: Claude Code

on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]

jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    env:
      DEBUG_CLAUDE_AGENT_SDK: "true"
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: anthropics/claude-code-action@v1.0.35
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
          use_commit_signing: true
          show_full_output: true

permissions:                                                                     
  contents: write                                                                
  pull-requests: write                                                           
  issues: write                                                                  
  id-token: write  
