feat(cua-driver): honor GITHUB_TOKEN/GH_TOKEN in GitHub API update checks (#2106) - #2116
feat(cua-driver): honor GITHUB_TOKEN/GH_TOKEN in GitHub API update checks (#2106)#2116injaneity wants to merge 1 commit into
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughThis PR adds optional GitHub API token authentication (via ChangesGitHub Token Authentication
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant InstallScript as install.ps1 / version_check.rs
participant TokenReader as GitHubApiHeaders / github_token
participant GitHubAPI as GitHub Releases API
User->>InstallScript: run install/update check
InstallScript->>TokenReader: read GITHUB_TOKEN / GH_TOKEN
TokenReader-->>InstallScript: Authorization header or none
InstallScript->>GitHubAPI: request releases (with/without header)
GitHubAPI-->>InstallScript: releases data
InstallScript-->>User: install/update result
Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
f-trycua
left a comment
There was a problem hiding this comment.
The selector unit test covers environment precedence, but the security-sensitive request boundary is not exercised. After resolving the conflict, please add a deterministic request-level test that observes the actual Authorization header for GITHUB_TOKEN and GH_TOKEN precedence, empty-value behavior, absence of the header when unset, and confirmation that token values cannot appear in returned errors. Cover the PowerShell request path as well.
52d75a5 to
e4b3efd
Compare
e4b3efd to
fe01e5e
Compare
Summary
GITHUB_TOKEN, thenGH_TOKEN, for cua-driver GitHub Releases API update checksinstall.ps1release resolution without logging tokensDocs
npx tsx scripts/docs-generators/cua-driver.ts; no generated file drift.npx tsx scripts/docs-generators/cua-driver.ts --check.Verification
cd libs/cua-driver/rust && cargo check -p cua-drivernpx tsx scripts/docs-generators/cua-driver.ts --checkcargo test -p cua-driver github_token_prefers_github_token_and_trims_empty_valueswas attempted, but macOS linking failed due missing Swift compatibility libraries/frameworks (swiftCompatibility56,swiftCompatibilityConcurrency,CoreAudioTypes).pwsh/powershellis not installed in this environment.Summary by CodeRabbit
New Features
GITHUB_TOKENorGH_TOKENduring install and update checks to help avoid GitHub API rate limits.Bug Fixes