Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [labeled]

permissions: {}

Expand All @@ -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

Copilot AI Apr 5, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contents: write is granted for all workflow triggers (pull_request / issue_comment / review_comment / issues). Since write access is only needed for issue-triggered branch creation, consider splitting into a separate job for issues:labeled with contents: write, keeping contents: read for the comment/PR-triggered job(s) to preserve least-privilege and reduce blast radius if the action is compromised.

Copilot uses AI. Check for mistakes.
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"
Loading