diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 53ba88e4..6ad04369 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -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 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"