| name: Claude AI Review with inline comments |
|
|
| on: |
| issue_comment: |
| types: [created] |
| pull_request_review_comment: |
| types: [created] |
|
|
| permissions: |
| contents: read |
| pull-requests: write |
| issues: read |
|
|
| jobs: |
| claude-ai-review: |
| if: | |
| ( |
| github.event_name == 'issue_comment' && |
| github.event.issue.pull_request && |
| github.event.issue.state == 'open' && |
| contains(github.event.comment.body, '@claude-2-serge') && |
| (github.event.comment.author_association == 'MEMBER' || |
| github.event.comment.author_association == 'OWNER' || |
| github.event.comment.author_association == 'COLLABORATOR') |
| ) || ( |
| github.event_name == 'pull_request_review_comment' && |
| contains(github.event.comment.body, '@claude-2-serge') && |
| (github.event.comment.author_association == 'MEMBER' || |
| github.event.comment.author_association == 'OWNER' || |
| github.event.comment.author_association == 'COLLABORATOR') |
| ) |
| concurrency: |
| group: claude-ai-review-${{ github.event.issue.number || github.event.pull_request.number }} |
| cancel-in-progress: false |
| runs-on: ubuntu-latest |
| steps: |
| - name: Resolve PR number |
| id: pr |
| run: | |
| NUM="${{ github.event.issue.number || github.event.pull_request.number }}" |
| echo "number=${NUM}" >> "$GITHUB_OUTPUT" |
| |
| - name: Check out PR head (shallow) |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| with: |
| ref: refs/pull/${{ steps.pr.outputs.number }}/head |
| fetch-depth: 1 |
|
|
| - name: Strip fork-supplied reviewer/agent config |
| |
| |
| |
| |
| |
| |
| |
| |
| run: rm -rf .ai/ .claude/ CLAUDE.md |
|
|
| - uses: tarekziade/ai-reviewer@main |
| with: |
| llm_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
| llm_api_base: https://api.anthropic.com |
| llm_model: claude-opus-4-6 |
| llm_stream: 'true' |
| mention_trigger: '@claude-2-serge' |
|
|