Skip to content

Commit fc01b3d

Browse files
authored
Merge pull request #63 from devondragon/add-claude-github-actions-1773355879852
Add Claude Code GitHub Workflow
2 parents a4789c4 + 1ed8321 commit fc01b3d

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Claude Code Review
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types: [opened, synchronize, ready_for_review, reopened]
66
# Optional: Only run on specific file changes
77
# paths:
@@ -21,24 +21,24 @@ jobs:
2121
runs-on: ubuntu-latest
2222
permissions:
2323
contents: read
24-
pull-requests: write
25-
issues: write
24+
pull-requests: read
25+
issues: read
2626
id-token: write
2727

2828
steps:
2929
- name: Checkout repository
3030
uses: actions/checkout@v4
3131
with:
32-
ref: ${{ github.event.pull_request.head.sha }}
3332
fetch-depth: 1
3433

3534
- name: Run Claude Code Review
3635
id: claude-review
3736
uses: anthropics/claude-code-action@v1
3837
with:
39-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
38+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
4039
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
4140
plugins: 'code-review@claude-code-plugins'
4241
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
4342
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
4443
# or https://code.claude.com/docs/en/cli-reference for available options
44+

.github/workflows/claude.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
contents: read
23-
pull-requests: write
24-
issues: write
23+
pull-requests: read
24+
issues: read
2525
id-token: write
2626
actions: read # Required for Claude to read CI results on PRs
2727
steps:
@@ -34,7 +34,7 @@ jobs:
3434
id: claude
3535
uses: anthropics/claude-code-action@v1
3636
with:
37-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
37+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3838

3939
# This is an optional setting that allows Claude to read CI results on PRs
4040
additional_permissions: |
@@ -47,3 +47,4 @@ jobs:
4747
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
4848
# or https://code.claude.com/docs/en/cli-reference for available options
4949
# claude_args: '--allowed-tools Bash(gh pr:*)'
50+

0 commit comments

Comments
 (0)