Test PR for Claude Code Action #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Claude Code Integration | |
| on: | |
| issue_comment: | |
| types: [created] | |
| jobs: | |
| process-pr-review: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, 'claude:') }} | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get PR details | |
| id: pr | |
| run: | | |
| PR_NUMBER="${{ github.event.issue.number }}" | |
| FEEDBACK="${{ github.event.comment.body }}" | |
| # Remove the "claude:" prefix | |
| FEEDBACK="${FEEDBACK#claude:}" | |
| echo "number=$PR_NUMBER" >> $GITHUB_OUTPUT | |
| echo "feedback=$FEEDBACK" >> $GITHUB_OUTPUT | |
| - name: Process with Claude Code | |
| uses: fractureinc/claude-code-github-action@v0.2.0 | |
| with: | |
| mode: 'review' | |
| pr-number: ${{ steps.pr.outputs.number }} | |
| feedback: ${{ steps.pr.outputs.feedback }} | |
| anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| process-pr-suggestions: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, 'claude-suggest:') }} | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get PR details | |
| id: pr | |
| run: | | |
| PR_NUMBER="${{ github.event.issue.number }}" | |
| FEEDBACK="${{ github.event.comment.body }}" | |
| # Remove the "claude-suggest:" prefix | |
| FEEDBACK="${FEEDBACK#claude-suggest:}" | |
| echo "number=$PR_NUMBER" >> $GITHUB_OUTPUT | |
| echo "feedback=$FEEDBACK" >> $GITHUB_OUTPUT | |
| - name: Process with Claude Code Suggestions | |
| uses: fractureinc/claude-code-github-action@v0.2.0 | |
| with: | |
| mode: 'suggest' | |
| pr-number: ${{ steps.pr.outputs.number }} | |
| feedback: ${{ steps.pr.outputs.feedback }} | |
| anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |