[PR #543] Fix nightly upgrade workflow GitHub API rate limiting #553

Closed
opened 2026-03-02 04:13:57 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/543

State: closed
Merged: Yes


Avoid GitHub API rate limit failures in nightly upgrade workflow

Summary

The nightly upgrade validation workflow was intermittently failing with HTTP Error 403: rate limit exceeded when calling the GitHub Releases API unauthenticated (shared runner IPs can quickly exhaust the unauthenticated limit).

This PR:

  • Passes secrets.GITHUB_TOKEN into the “Select random older versions” steps (bash + Windows pwsh)
  • Uses Authorization: Bearer $GITHUB_TOKEN (when present) and adds an explicit User-Agent header for the GitHub API request

Review & Testing Checklist for Human

  • Confirm GITHUB_TOKEN is available for the scheduled workflow in this repo/org (permissions/policy) and that this doesn’t require any additional workflow permissions.
  • Sanity-check the Windows step: the Python snippet is embedded in a PowerShell here-string; verify the updated block is syntactically correct and still executes on windows-latest.
  • Optionally re-run the workflow (or a workflow_dispatch) and confirm the “Select random older versions” steps no longer fail with 403 rate limits.

Notes


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/543 **State:** closed **Merged:** Yes --- # Avoid GitHub API rate limit failures in nightly upgrade workflow ## Summary The nightly upgrade validation workflow was intermittently failing with `HTTP Error 403: rate limit exceeded` when calling the GitHub Releases API unauthenticated (shared runner IPs can quickly exhaust the unauthenticated limit). This PR: - Passes `secrets.GITHUB_TOKEN` into the “Select random older versions” steps (bash + Windows pwsh) - Uses `Authorization: Bearer $GITHUB_TOKEN` (when present) and adds an explicit `User-Agent` header for the GitHub API request ## Review & Testing Checklist for Human - [ ] Confirm `GITHUB_TOKEN` is available for the scheduled workflow in this repo/org (permissions/policy) and that this doesn’t require any additional workflow permissions. - [ ] Sanity-check the Windows step: the Python snippet is embedded in a PowerShell here-string; verify the updated block is syntactically correct and still executes on `windows-latest`. - [ ] Optionally re-run the workflow (or a `workflow_dispatch`) and confirm the “Select random older versions” steps no longer fail with 403 rate limits. ### Notes - Link to Devin run: https://app.devin.ai/sessions/542cbe6f96cc42d6b9e173485666d7b0 - Requested by: @svarlamov <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/543" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
kerem 2026-03-02 04:13:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#553
No description provided.