From c782bde26e7edaeb7615a2809b349a1c027fb44a Mon Sep 17 00:00:00 2001 From: Ajit Pratap Singh Date: Sat, 10 Oct 2026 23:06:58 +0530 Subject: [PATCH] ci(claude-review): skip automatic review on fork PRs Fork PRs receive a read-only GITHUB_TOKEN and no repository secrets, so claude-code-action fails with 403 'Resource not accessible by integration' when creating its initial comment. Every fork PR (#525, #527, #529, #532-#535) has been failing this check. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VCRwrpJY25CRtyTcu6aD8V --- .github/workflows/claude-code-review.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 58e9a87e..0597a299 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -7,12 +7,11 @@ on: jobs: claude-review: - # Optional: Filter by PR author - # if: | - # github.event.pull_request.user.login == 'external-contributor' || - # github.event.pull_request.user.login == 'new-developer' || - # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' - + # Fork PRs get a read-only GITHUB_TOKEN and no secrets, so the action fails + # with 403 when posting its comment. Skip them; maintainers can still + # request a review with an @claude comment. + if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest permissions: contents: read