Skip to content

Skip Claude review action on fork PRs to avoid OIDC preflight failure - #106

Closed
kaiemjoy with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-claude-code-review-job
Closed

Skip Claude review action on fork PRs to avoid OIDC preflight failure#106
kaiemjoy with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-claude-code-review-job

Conversation

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The Claude Code Review workflow was failing before execution on PR #77 because fork-triggered runs had no OAuth secret and the action attempted OIDC token acquisition (ACTIONS_ID_TOKEN_REQUEST_URL unavailable). This change prevents that failure path while preserving review-comment behavior for same-repo PRs.

  • Workflow gating

    • Added a step-level condition so anthropics/claude-code-action@v1 runs only when the PR head repo matches the base repo.
    • Result: fork PRs safely skip the Claude step; same-repo PRs continue to run with existing pull-requests: write behavior.
  • Auth-path preservation

    • Kept existing OAuth-token input and workflow comments/documentation intact.
    • Did not broaden permissions or change trigger model (pull_request remains unchanged).
- name: Run Claude Code Review
  id: claude-review
  if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
  uses: anthropics/claude-code-action@v1
  with:
    claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1-2-g6ad689f
Preview removed because the pull request was closed.
2026-08-20 03:04 UTC

Copilot AI and others added 2 commits August 20, 2026 02:52
Co-authored-by: kaiemjoy <16113030+kaiemjoy@users.noreply.github.com>
Co-authored-by: kaiemjoy <16113030+kaiemjoy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job for Claude Code Review workflow Skip Claude review action on fork PRs to avoid OIDC preflight failure Aug 20, 2026
Copilot AI requested a review from kaiemjoy August 20, 2026 02:55
@kaiemjoy
kaiemjoy marked this pull request as ready for review August 20, 2026 02:59
@kaiemjoy kaiemjoy closed this Aug 20, 2026
@kaiemjoy
kaiemjoy deleted the copilot/fix-claude-code-review-job branch August 20, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants