Skip to content

ci(qa-review): unset empty CLAUDE_CODE_OAUTH_TOKEN for fork PRs#19

Merged
kitplummer merged 1 commit into
mainfrom
ci/fork-pr-token-fallback
Jul 4, 2026
Merged

ci(qa-review): unset empty CLAUDE_CODE_OAUTH_TOKEN for fork PRs#19
kitplummer merged 1 commit into
mainfrom
ci/fork-pr-token-fallback

Conversation

@kitplummer

Copy link
Copy Markdown
Collaborator

Summary

  • When CLAUDE_CODE_OAUTH_TOKEN is set from secrets.CLAUDE_CODE_OAUTH_TOKEN on a fork PR, GitHub strips the secret to empty string
  • The empty env var overrides the runner-local credential (~/.claude/.credentials.json), causing QA Review to fail
  • Unset the var when empty so claude falls back to the local credential

Test plan

  • Fork PRs: secret is empty → var is unset → claude uses runner-local credential
  • Non-fork PRs: secret is populated → used as-is (no change in behavior)

GitHub strips secrets from fork pull_request events, setting the
env var to empty. This overrides the runner-local credential
(~/.claude/.credentials.json). Unset the var when empty so claude
falls back to the local credential.
@kitplummer kitplummer requested a review from a team as a code owner July 4, 2026 17:57

@peat-bot peat-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Peat QA Review (SHA: 61340bb)

No findings.

@kitplummer kitplummer merged commit 291d7e4 into main Jul 4, 2026
9 checks passed
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