Skip to content

Commit 86b41be

Browse files
committed
Add Claude Code Review in Actions:
cf. https://github.com/yasslab/claude_review_action
1 parent 85d268f commit 86b41be

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/claude-review.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Claude Review
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
issue_comment:
7+
types: [created]
8+
pull_request:
9+
types: [opened, synchronize]
10+
pull_request_review:
11+
types: [submitted]
12+
pull_request_review_comment:
13+
types: [created]
14+
15+
jobs:
16+
claude-review:
17+
if: |
18+
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude')) ||
19+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
20+
(github.event_name == 'pull_request' && contains(github.event.pull_request.body, '@claude')) ||
21+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
22+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude'))
23+
24+
runs-on: ubuntu-latest
25+
26+
# 推奨: 最小限の権限のみ付与
27+
permissions:
28+
contents: read # Repository 内の権限
29+
actions: read # Actionsログへの権限
30+
issues: read # Issueコメントの権限
31+
pull-requests: read # PR 内コメントの権限
32+
id-token: write # 実行時に適切な権限を取得
33+
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
fetch-depth: 2
39+
40+
- name: Claude Review
41+
uses: yasslab/claude_review_action@main
42+
with:
43+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

0 commit comments

Comments
 (0)