@@ -17,13 +17,24 @@ jobs:
1717 # github.event.pull_request.user.login == 'external-contributor' ||
1818 # github.event.pull_request.user.login == 'new-developer' ||
1919 # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20-
20+ #
21+ # 現時点では Org 内の MEMBER と OWNER のみが使用可能
22+ if : |
23+ (github.event_name == 'pull_request' &&
24+ contains(fromJSON('["MEMBER", "OWNER"]'), github.event.pull_request.author_association)) ||
25+ (github.event_name == 'issue_comment' &&
26+ github.event.issue.pull_request &&
27+ contains(github.event.comment.body, '@claude') &&
28+ contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association))
29+
2130 runs-on : ubuntu-latest
31+
32+ # 最小限の権限のみ付与
2233 permissions :
23- contents : read
24- pull-requests : read
25- issues : read
26- id-token : write
34+ contents : read # リポジトリ内容の読込/書込
35+ pull-requests : read # PRのコメントの読込/書込
36+ issues : read # Issueのコメントの読込/書込
37+ id-token : write # 実行時に適切な権限を取得 (ココがwriteの時、上記はreadで良い)
2738
2839 steps :
2940 - name : Checkout repository
3849 claude_code_oauth_token : ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3950
4051 # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
41- # model: "claude-opus-4-20250514"
52+ model : " claude-opus-4-20250514"
4253
4354 # Direct prompt for automated review (no @claude mention needed)
4455 direct_prompt : |
5061 - Test coverage
5162
5263 Be constructive and helpful in your feedback.
64+ Always respond in Japanese, even if given instructions are in English.
65+ Use Japanese for all outputs, explanations, and comments in code
5366
5467 # Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
5568 # use_sticky_comment: true
0 commit comments