-
Notifications
You must be signed in to change notification settings - Fork 2.7k
45 lines (43 loc) · 1.6 KB
/
claude-code-review.yml
File metadata and controls
45 lines (43 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Claude Code Review
# For deepset-ai org members: runs automatically on every PR
# For external contributors: runs when a maintainer adds the 'claude-review' label
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
pull_request_target:
types: [labeled]
jobs:
claude-review:
if: |
(
github.event_name == 'pull_request' &&
!github.event.pull_request.head.repo.fork &&
(
github.event.pull_request.author_association == 'MEMBER' ||
github.event.pull_request.author_association == 'OWNER' ||
github.event.pull_request.author_association == 'COLLABORATOR'
)
) || (
github.event_name == 'pull_request_target' &&
github.event.label.name == 'claude-review'
)
runs-on: ubuntu-slim
continue-on-error: true
permissions:
contents: read
pull-requests: write
issues: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@5d5c10a4f389689f992ea10bb14dcb6fcc83146d # v1.0.102
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY_PR_REVIEWS_PUBLIC_REPOS }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'