Skip to content

Commit a2cd190

Browse files
jamesrwebclaude
andcommitted
fix(claude): Use OAuth token and enable assignee trigger for PRs and issues
Switched from anthropic_api_key to claude_code_oauth_token to match the stored secret type. Added pull_request assigned event and assignee_trigger so Claude can be assigned directly to PRs and issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 63e9b2d commit a2cd190

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/claude.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
types: [created]
88
issues:
99
types: [opened, assigned]
10+
pull_request:
11+
types: [assigned]
1012
pull_request_review:
1113
types: [submitted]
1214

@@ -16,7 +18,8 @@ jobs:
1618
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
1719
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
1820
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
21+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) ||
22+
(github.event_name == 'pull_request')
2023
runs-on: ubuntu-latest
2124
permissions:
2225
contents: write
@@ -34,13 +37,13 @@ jobs:
3437
id: claude
3538
uses: anthropics/claude-code-action@v1
3639
with:
37-
anthropic_api_key: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
40+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3841

3942
# Optional: Customize the trigger phrase (default: @claude)
4043
# trigger_phrase: "/claude"
4144

42-
# Optional: Trigger when specific user is assigned to an issue
43-
# assignee_trigger: "claude-bot"
45+
# Trigger when "claude" is assigned to an issue or PR
46+
assignee_trigger: "claude"
4447

4548
# Optional: Configure Claude's behavior with CLI arguments
4649
# claude_args: |

0 commit comments

Comments
 (0)