Repository navigation
feat: pass the job's GitHub token to analytics-cli as GITHUB_TOKEN - #155
Merged
acatxnamedvirtue merged 2 commits intoNov 9, 2026
Merged
acatxnamedvirtue merged 2 commits into
acatxnamedvirtue merged 2 commits into
Conversation
The github-token input (default ${{ github.token }}) was declared but
never used. Export it to the CLI as GITHUB_TOKEN, as trunk-io/login
does, so a fork PR run with allow-forked-pr-uploads and no token can
exchange it for a Trunk login. The token goes through env only, never
the command line, and is masked with setSecret.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Customers should not set it: ${{ github.token }} is right for every run.
It stays out of the README's parameter tables like the other inputs in
that block.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Closing: the v2 fork lane will swap the opted-in collection id for a Trunk login (TRUNK-23488), so analytics-cli no longer needs the job's GitHub token. The branch is kept in case the GitHub-token lane is wanted later. |
Contributor
Author
|
Reopening: analytics-cli will swap the job's GITHUB_TOKEN at /v2/auth/github-actions/login for fork PR uploads on v2 (the flow impacted targets uses), so it needs this input again. |
TylerJang27
approved these changes
Nov 9, 2026
acatxnamedvirtue
deleted the
tylerbeebe/trunk-23480-analytics-uploader-pass-the-jobs
branch
November 9, 2026 16:31
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.
The
github-tokeninput (default${{ github.token }}) was declared but never used. This exports it to analytics-cli asGITHUB_TOKEN, the same waytrunk-io/logindoes. On a run for a pull request from a fork, withallow-forked-pr-uploadsand notoken, the CLI exchanges it atPOST /v2/auth/github-actions/loginfor a Trunk login (TRUNK-23482). Fork PR uploads then work on v2 with no change to the customer's workflow. GitHub mints this token for every run, so no secret is stored.execSyncerror messages, and it is masked withcore.setSecret.GITHUB_TOKENthe job already has passes through unchanged.Current CLI versions ignore
GITHUB_TOKEN, so this is safe to ship before TRUNK-23482.@v2users get it only after a release and the "Update release version" workflow;v2is already behindmain.Part of TRUNK-23480
🤖 Generated with Claude Code