Skip to content

fix: add missing GITHUB_TOKEN default#120

Draft
pandektes-braedon wants to merge 2 commits intoscaleway:mainfrom
pandektes-braedon:fix-default-github-token
Draft

fix: add missing GITHUB_TOKEN default#120
pandektes-braedon wants to merge 2 commits intoscaleway:mainfrom
pandektes-braedon:fix-default-github-token

Conversation

@pandektes-braedon
Copy link
Copy Markdown

@pandektes-braedon pandektes-braedon commented Dec 19, 2025

Note: This is WIP and I still need to test this PR works as expected.

Description

Fixed GitHub API rate limiting issues by ensuring the repo-token is used during CLI binary downloads and providing a default value for the token.

Reason for Change

The action was failing with HttpClientError: API rate limit exceeded because it was making unauthenticated requests to GitHub Releases when downloading the Scaleway CLI binary.
While the action previously supported a repo-token for version checks, it wasn't being passed to the tool-cache download utility, and it wasn't provided by default. This PR:

  • Sets the default value of repo-token to ${{ github.token }} in config.ts.
  • Updates src/cli.ts to pass the token as an authorization header to tc.downloadTool.

These changes ensure that all requests to the GitHub API are authenticated, increasing the rate limit from 60 to 1,000+ requests per hour per repository.

Comment thread package-lock.json Outdated
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is there a reason there is no lockfile? Should I remove this from the PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@estellesoulard estellesoulard changed the base branch from master to main February 27, 2026 10:20
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