fix(tokenless): fix tokenless with push event#307
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This pull request fixes GitHub Actions “tokenless” authentication for non-PR workflows (e.g. push events) by allowing the token exchange to use the build commit when prHeadCommit isn’t available, and updates the test mocking utilities accordingly.
Changes:
- Relax tokenless availability detection for GitHub Actions and send
commit = prHeadCommit ?? committo the tokenless exchange endpoint. - Update tokenless auth tests to use
commitin the base config (but some downstream assertions still assumeprHeadCommitis required). - Rename the MSW OIDC mock server helpers to a more general “token exchange” server and update references.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/github-actions-tokenless.ts | Use prHeadCommit when present, otherwise fall back to commit for tokenless exchange; simplify availability check. |
| packages/core/src/github-actions-tokenless.test.ts | Switch test base config to commit-based setup and remove tokenless availability tests (but leaves inconsistent expectations later in the file). |
| packages/core/src/github-actions-oidc.test.ts | Update to the renamed mock server helper. |
| packages/core/src/auth.test.ts | Update to the renamed mock server helper. |
| packages/core/mocks/oidc.ts | Rename and generalize MSW handlers/server from OIDC-only to token exchange helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jsfez
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #306