Repository navigation
chore: enable Claude issue trigger per org CI standard #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,8 @@ on: | |
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| issues: | ||
| types: [labeled] | ||
|
|
||
| permissions: {} | ||
|
|
||
|
|
@@ -21,17 +23,21 @@ jobs: | |
| contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) || | ||
| (github.event_name == 'pull_request_review_comment' && | ||
| contains(github.event.comment.body, '@claude') && | ||
| contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) | ||
| contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) || | ||
| (github.event_name == 'issues' && github.event.action == 'labeled' && | ||
| github.event.label.name == 'claude') | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| permissions: | ||
| contents: read | ||
| # write required for issue-triggered branch creation | ||
| contents: write | ||
| id-token: write | ||
| pull-requests: write | ||
| issues: write | ||
|
Comment on lines
31
to
36
|
||
| steps: | ||
| - name: Run Claude Code | ||
| if: github.event_name != 'pull_request' || github.event.pull_request.user.login != 'dependabot[bot]' | ||
| uses: anthropics/claude-code-action@1eddb334cfa79fdb21ecbe2180ca1a016e8e7d47 # v1 | ||
| uses: anthropics/claude-code-action@6e2bd52842c65e914eba5c8badd17560bd26b5de # v1.0.89 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| label_trigger: "claude" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
issues:labeledtrigger path doesn’t apply the same authorization guard as the comment-based triggers (which requireauthor_associationin OWNER/MEMBER/COLLABORATOR). With this change, anyone who can apply theclaudelabel can trigger a workflow run that has access toCLAUDE_CODE_OAUTH_TOKENandcontents: write. If that’s not intended, add an explicit restriction for the labeler/sender (or an early-exit validation step) so only the intended roles can trigger the automation via labels.