Fix JetBrains GitHub token resolution - #1224
Merged
brunoborges merged 1 commit intoAug 6, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes GitHub authentication for JetBrains Runtime release discovery by resolving credentials from the action token input first (with GITHUB_TOKEN as a fallback), and ensuring the same authentication headers are used consistently across paginated GitHub Releases API requests while negotiating JSON responses.
Changes:
- Introduces a shared
getGitHubToken()utility to centralize token resolution (tokeninput →GITHUB_TOKENfallback). - Updates JetBrains Runtime release discovery to use the shared resolver, preserve auth across pagination, and request GitHub JSON media.
- Adds/updates unit tests covering token precedence, fallback behavior, and omission of auth when no token is available (and includes regenerated
distbundles).
Show a summary per file
| File | Description |
|---|---|
| src/util.ts | Adds shared getGitHubToken() and reuses it in GitHub header construction. |
| src/distributions/jetbrains/installer.ts | Uses shared token resolver and JSON Accept header for paginated GitHub Releases API calls. |
| tests/distributors/jetbrains-installer.test.ts | Adds coverage for token input precedence, env fallback, and unauthenticated behavior across pagination. |
| dist/setup/index.js | Regenerated bundle reflecting the shared token resolver usage. |
| dist/setup/282.index.js | Regenerated JetBrains-related bundle reflecting token/header changes. |
| dist/cleanup/index.js | Regenerated bundle reflecting the shared token resolver export/use. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/6 changed files
- Comments generated: 0
- Review effort level: Lite
brunoborges
approved these changes
Aug 6, 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.
Description:
Resolve GitHub authentication for JetBrains Runtime release discovery from the action
tokeninput first, withGITHUB_TOKENretained as a fallback. Releases API pagination now keeps the same authentication and requests GitHub JSON media; requests remain unauthenticated when neither token source is set.The shared token resolver is also used by the existing GitHub-hosted manifest headers. Generated
distbundles are included.Related issue:
Fixes #1221
Check list:
npm run checklocally (format, lint, build, test) and all checks pass.