From bc9879868d65669279b47830cd9dd26e4147e3da Mon Sep 17 00:00:00 2001 From: Vitalii Kleshchevnikov Date: Sun, 22 Feb 2026 16:13:46 +0000 Subject: [PATCH] Fix claude workflow: add checkout step and match official config - Add checkout step (fixes 'not a git repository' error) - Add actions:read permission (allows reading CI results) - Add pull_request_review trigger for @claude in PR reviews - Add issue title trigger for @claude Co-Authored-By: Claude Opus 4.6 --- .github/workflows/claude.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 7f821206..275cdea0 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -7,20 +7,31 @@ on: types: [created] issues: types: [opened, assigned] + pull_request_review: + types: [submitted] jobs: claude: if: | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || - (github.event_name == 'issues' && contains(github.event.issue.body, '@claude')) + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) runs-on: ubuntu-latest permissions: contents: write pull-requests: write issues: write id-token: write + actions: read steps: - - uses: anthropics/claude-code-action@v1 + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code + id: claude + uses: anthropics/claude-code-action@v1 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}