Skip to content

Conversation

billykern
Copy link
Contributor

Summary

  • Adds optional github-token parameter to authenticate GitHub API requests
  • Increases rate limit from 60 requests/hour to 5000 requests/hour
  • Maintains full backward compatibility with automatic token defaulting

Problem

The action fails intermittently when GitHub's unauthenticated API rate limit (60 requests/hour) is exceeded, particularly in busy CI environments with multiple workflows.

Solution

Added conditional authentication using the GitHub token that's automatically available in workflows. The implementation:

  • Defaults to ${{ github.token }} for zero-configuration improvement
  • Falls back gracefully when no token is provided
  • Adds minimal logging to indicate authentication status

Evidence

Testing confirmed the rate limit improvements in this workflow run:

  • Unauthenticated: x-ratelimit-limit: 60
  • Authenticated: x-ratelimit-limit: 5000

The test validates three scenarios:

  1. Current upstream behavior (60/hour limit)
  2. With authentication using default token (5000/hour limit)
  3. Empty token parameter (graceful fallback to 60/hour limit)

Testing

  • Verified backward compatibility with empty/missing token
  • Confirmed successful authentication with default token
  • Tested explicit token passing

References

Adds optional github-token parameter that defaults to the automatic
GitHub token, increasing API rate limit from 60/hour to 5000/hour.
Maintains backward compatibility for users not providing a token.
@jandelgado jandelgado merged commit e461278 into jandelgado:master Aug 3, 2025
1 check passed
@billykern
Copy link
Contributor Author

@jandelgado thanks again for reviewing/merging, any chance you could bump the v1 tag to latest as well?

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.

2 participants