Fix GitHub API rate limit errors in test actions#26489
Merged
TravisEz13 merged 2 commits intomasterfrom Nov 19, 2025
Merged
Conversation
- Add GITHUB_TOKEN input to nix and windows test actions - Use Authorization header with Bearer token in all Invoke-RestMethod calls - Pass GITHUB_TOKEN from workflows to test actions - Fixes GitHub API rate limit errors by using authenticated requests Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix API rate limit issue in action.yml
Fix GitHub API rate limit errors in test actions
Nov 19, 2025
TravisEz13
reviewed
Nov 19, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses GitHub API rate limit errors in test actions by adding authentication to API calls. Unauthenticated requests to the GitHub API are limited to 60 requests per hour, which CI jobs were exceeding when fetching DSC releases. By authenticating with the built-in GITHUB_TOKEN, the rate limit increases to 5,000 requests per hour.
Key changes:
- Added
GITHUB_TOKENinput parameter to test actions with Bearer authentication headers - Updated all
Invoke-RestMethodcalls to include the Authorization header - Passed
secrets.GITHUB_TOKENto test actions in 12 job invocations across Linux, macOS, and Windows CI workflows
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/actions/test/windows/action.yml |
Added GITHUB_TOKEN input and Authorization header to both GitHub API calls (releases and asset download) |
.github/actions/test/nix/action.yml |
Added GITHUB_TOKEN input and Authorization header to both GitHub API calls (releases and asset download) |
.github/workflows/windows-ci.yml |
Passed GITHUB_TOKEN to 4 test job invocations (unelevated/elevated × CI/Others) |
.github/workflows/macos-ci.yml |
Passed GITHUB_TOKEN to 4 test job invocations (unelevated/elevated × CI/Others) |
.github/workflows/linux-ci.yml |
Passed GITHUB_TOKEN to 4 test job invocations (unelevated/elevated × CI/Others) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adityapatwardhan
approved these changes
Nov 19, 2025
TravisEz13
added a commit
to TravisEz13/PowerShell
that referenced
this pull request
Nov 19, 2025
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
9 tasks
SIRMARGIN
pushed a commit
to SIRMARGIN/PowerShell
that referenced
this pull request
Dec 12, 2025
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
kilasuit
pushed a commit
to kilasuit/PowerShell
that referenced
this pull request
Jan 2, 2026
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
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.
PR Summary
Test actions were hitting GitHub API rate limits (60 req/hr unauthenticated) when fetching DSC releases, causing CI failures:
Changes
Added
GITHUB_TOKENauthentication to API calls in test actions:Test actions (
.github/actions/test/{nix,windows}/action.yml)GITHUB_TOKENinput parameterInvoke-RestMethodcallsWorkflows (
.github/workflows/{linux,macos,windows}-ci.yml)${{ secrets.GITHUB_TOKEN }}to test actions (12 job invocations)Authenticated requests have 5000 req/hr limit vs 60 unauthenticated.
PR Context
CI jobs intermittently fail when multiple test runs execute concurrently, exhausting the unauthenticated rate limit. Uses built-in
GITHUB_TOKEN, no new secrets required.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWarning
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/rate_limitpwsh /tmp/test_api_auth.ps1(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.