Skip to content

[FEATURE]: Support GITHUB_TOKEN env var in download_github to prevent rate limiting #1114

@AdamG100

Description

@AdamG100

Scope

Web

Feature Description

Support reading a GITHUB_TOKEN environment variable in the download_github recipe action and passing it as an Authorization: Bearer header on all GitHub API calls.

Use Case

When running multiple txAdmin instances on the same host, all instances share the same outbound IP address. GitHub rate limits unauthenticated API requests to 60 per hour per IP. The download_github action makes 2 unauthenticated API calls per action, so when multiple servers attempt recipe deployments simultaneously the rate limit is exhausted almost immediately, causing 403 errors mid-deployment with no clean workaround available at the OS or configuration level.

Proposed Solution

In the download_github action handler, check for GITHUB_TOKEN in the environment and inject it into the request headers if present:

const githubToken = process.env.GITHUB_TOKEN; const headers = githubToken ? { Authorization: Bearer ${githubToken} } : {};

This raises the limit from 60 req/hour to 5,000 req/hour. Falls back gracefully to unauthenticated if the variable is not set — zero breaking changes.

Additional Info

This is standard behaviour followed by virtually every tool that interacts with the GitHub API including npm, GitHub CLI, and curl. The txAdmin recipe documentation itself already acknowledges the 403 problem, noting that users with more than 30 download_github actions will hit rate limit errors. Native GITHUB_TOKEN support would be the proper fix rather than working around it with waste_time delays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions