Skip to content

fix(tokenless): fix tokenless with push event#307

Merged
gregberge merged 2 commits into
mainfrom
greg/arg-354-regression-in-tokenless
May 21, 2026
Merged

fix(tokenless): fix tokenless with push event#307
gregberge merged 2 commits into
mainfrom
greg/arg-354-regression-in-tokenless

Conversation

@gregberge
Copy link
Copy Markdown
Member

@gregberge gregberge commented May 21, 2026

Fix #306

@gregberge gregberge requested review from a team, Copilot and jsfez and removed request for a team May 21, 2026 12:43
@linear
Copy link
Copy Markdown

linear Bot commented May 21, 2026

ARG-354

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
argos-js-sdk-reference Ready Ready Preview, Comment May 21, 2026 1:07pm

Request Review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ?? commit to the tokenless exchange endpoint.
  • Update tokenless auth tests to use commit in the base config (but some downstream assertions still assume prHeadCommit is 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.

Comment thread packages/core/src/github-actions-tokenless.ts
Comment thread packages/core/src/github-actions-tokenless.test.ts
@gregberge gregberge merged commit ad557f1 into main May 21, 2026
148 of 156 checks passed
@gregberge gregberge deleted the greg/arg-354-regression-in-tokenless branch May 21, 2026 13:37
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.

@argos-ci/cypress v7 throws "Missing Argos repository token 'ARGOS_TOKEN'" in after:run event

3 participants