Skip to content

Pass repo-token to binary downloads to avoid rate limiting#2

Merged
thangktran merged 2 commits intomasterfrom
copilot/fix-protoc-rate-limit
Feb 3, 2026
Merged

Pass repo-token to binary downloads to avoid rate limiting#2
thangktran merged 2 commits intomasterfrom
copilot/fix-protoc-rate-limit

Conversation

Copy link

Copilot AI commented Jan 29, 2026

The action was hitting GitHub's rate limit (60/hr unauthenticated) when downloading protoc binaries. The repo-token parameter was only being used for release API calls, not for the actual binary downloads via tc.downloadTool().

Changes

  • downloadRelease(): Now accepts and uses repoToken parameter
  • getProtoc(): Passes repoToken through to downloadRelease()
  • tc.downloadTool(): Now called with authentication header
// Before
downloadPath = await tc.downloadTool(downloadUrl);

// After
const auth = repoToken ? `token ${repoToken}` : undefined;
downloadPath = await tc.downloadTool(downloadUrl, undefined, auth);

When repo-token: ${{ secrets.GITHUB_TOKEN }} is provided, downloads are authenticated (5000/hr limit vs 60/hr).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/protocolbuffers/protobuf/releases
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/setup-protoc/setup-protoc/node_modules/.bin/jest (http block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix Protoc pipeline to use GH_TOKEN for rate limits Pass repo-token to all test-integration workflow jobs Jan 29, 2026
Copilot AI requested a review from Akaame January 29, 2026 11:21
Copilot AI changed the title Pass repo-token to all test-integration workflow jobs Pass repo-token to binary downloads to avoid rate limiting Feb 3, 2026
@Akaame Akaame marked this pull request as ready for review February 3, 2026 10:31
@thangktran thangktran self-requested a review February 3, 2026 11:05
Copy link

@thangktran thangktran left a comment

Choose a reason for hiding this comment

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

LGTM

@thangktran thangktran force-pushed the copilot/fix-protoc-rate-limit branch from 638df64 to d9006af Compare February 3, 2026 11:06
@thangktran thangktran force-pushed the copilot/fix-protoc-rate-limit branch from d9006af to 9828328 Compare February 3, 2026 11:15
@thangktran thangktran removed the request for review from Akaame February 3, 2026 11:19
@thangktran thangktran force-pushed the copilot/fix-protoc-rate-limit branch from ee1ca04 to 36b8918 Compare February 3, 2026 11:39
@thangktran thangktran merged commit 8578085 into master Feb 3, 2026
3 checks passed
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