Skip to content

feat(invoke-gati-v2): initial changes - #1659

Open
erikburt wants to merge 3 commits into
mainfrom
feat/invoke-gati-v2
Open

feat(invoke-gati-v2): initial changes#1659
erikburt wants to merge 3 commits into
mainfrom
feat/invoke-gati-v2

Conversation

@erikburt

@erikburt erikburt commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

This implements the action required to call GATI v2. GATI v2 is fundementally different from GATI v1, so a new action is required.

  • For more information on the design - see internal documentation (link not provided on public repository).

Notes

Merging this by itself does nothing to existing usages.

Testing

Related

#1660 <- required for automatic rollout

@erikburt erikburt self-assigned this Sep 10, 2026
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🦋 Changeset is good to go

Latest commit: 55866be

We got this.

Not sure what this means? Click here to learn what changesets are.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

There are security/operational concerns around logging raw inputs and allowing unbounded retries/insufficiently constrained URL inputs that should be addressed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Introduces a new invoke-gati-v2 JavaScript action that exchanges a GitHub OIDC token for a scoped GitHub installation access token via the GATI v2 ingress, and revokes the token in a post step. This fits alongside the existing GATI v1 action as a separate, non-breaking action intended for future rollout via setup-github-token (#1660).

Changes:

  • Added the invoke-gati-v2 action implementation (OIDC mint → token exchange → output + post-step revocation) with input parsing and profile/audience shaping.
  • Added unit tests (Vitest) for input parsing, profile parsing, ingress exchange retry behavior, and token revocation behavior.
  • Added CI/validation workflow coverage for v1-migration profiles and updated artifact-diff checking to include post.js.
File summaries
File Description
pnpm-lock.yaml Adds the actions/invoke-gati-v2 workspace dependencies/devDependencies.
actions/invoke-gati-v2/tsconfig.spec.json TypeScript config for running specs/tests for the new action.
actions/invoke-gati-v2/tsconfig.json Base TS compiler options for the action source.
actions/invoke-gati-v2/src/state.ts Stores/loads the minted access token in step state for post-step revocation.
actions/invoke-gati-v2/src/run.ts Main action entry logic: resolve profile/audience, mint OIDC, exchange for installation token, output token.
actions/invoke-gati-v2/src/run-post.ts Post-step cleanup logic: revoke token if present, warn (don’t fail job) on revoke failure.
actions/invoke-gati-v2/src/run-inputs.ts Reads and validates action inputs (profile, url, retries).
actions/invoke-gati-v2/src/profile.ts Parses profile strings into structured types and renders the OIDC audience claim.
actions/invoke-gati-v2/src/post.ts Post-step entrypoint wiring.
actions/invoke-gati-v2/src/index.ts Main entrypoint wiring.
actions/invoke-gati-v2/src/github.ts Implements DELETE /installation/token revocation call.
actions/invoke-gati-v2/src/gati.ts Implements token exchange against the ingress with retry/backoff and safe response parsing.
actions/invoke-gati-v2/src/tests/run-inputs.test.ts Unit tests for inputs reading/validation behavior.
actions/invoke-gati-v2/src/tests/profile.test.ts Unit tests for profile parsing and audience rendering.
actions/invoke-gati-v2/src/tests/github.test.ts Unit tests for installation token revocation call behavior.
actions/invoke-gati-v2/src/tests/gati.test.ts Unit tests for token exchange, retry/backoff behavior, and response parsing safety.
actions/invoke-gati-v2/README.md Documents usage, inputs/outputs, profiles, and token lifetime behavior.
actions/invoke-gati-v2/project.json Nx project definition for building, type-checking, and testing the new action.
actions/invoke-gati-v2/package.json Declares action package metadata, Node engine requirement, and dependencies.
actions/invoke-gati-v2/action.yml Action metadata: inputs/outputs and node24 main+post entrypoints.
.github/workflows/pull-request-main.yml Updates PR workflow to check both index.js and post.js built artifacts; adjusts a disabled job condition.
.github/workflows/invoke-gati-v2-validate.yml Adds a dedicated validation workflow to exercise v1 migration profiles safely in public logs.
.changeset/plenty-donuts-count.md Adds a changeset for versioning/release tracking of invoke-gati-v2.
Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file
  • Files reviewed: 22/25 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread actions/invoke-gati-v2/src/run-inputs.ts
Comment thread actions/invoke-gati-v2/src/run.ts
Comment thread actions/invoke-gati-v2/src/run-inputs.ts
Comment thread actions/invoke-gati-v2/src/run-post.ts
Comment thread actions/invoke-gati-v2/src/run.ts
@erikburt
erikburt requested a review from chainchad September 10, 2026 20:32
@erikburt
erikburt marked this pull request as ready for review September 10, 2026 20:32
@erikburt
erikburt requested a review from a team as a code owner September 10, 2026 20:32
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.

3 participants