## Question Where to add GitHub personal access token to not get rate limited by the GitHub API? ## Conclusions * Depends on <https://github.com/ScoopInstaller/GithubActions/issues/64> (?). * Scoop GitHubActions uses the repository GitHub actions built in environment variable `GITHUB_TOKEN`. * There is currently no built-in way to provide a PAT (personal access token) to Scoop GitHubActions (?). * Scoop does not use `GITHUB_TOKEN` everywhere it can, which causes inconsistent rate limiting. * <https://github.com/ScoopInstaller/Scoop/pull/6535> * <https://github.com/ScoopInstaller/Scoop/issues/6609> * Scoop makes unnecessarily many API requests: * <https://github.com/ScoopInstaller/Scoop/issues/6608> GitHub API rate limiting: * <https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api> | Type | Limit | Scope | | :---------------------------------- | :------------ | :---------------- | | Unathenticated | 60 per hour | Source IP address | | Repo built in secret `GITHUB_TOKEN` | 1000 per hour | Per repo | | Personal Access Token (PAT) | 5000 per hour | Per user | * Multiple PATs will not increase the rate limit, as it is per user. ## Context Related issues: * 2025-10-16: <https://github.com/ScoopInstaller/GithubActions/issues/64> * 2025-11-23: <https://github.com/ScoopInstaller/Main/issues/7394> * 2025-12-22: <https://github.com/ScoopInstaller/Main/issues/7394#issuecomment-3683900451> Related PRs: * 2025-11-01: <https://github.com/ScoopInstaller/Scoop/pull/6535> Related code: * Scoop -> lib -> download.ps1 -> `function Get-GitHubToken`: <https://github.com/ScoopInstaller/Scoop/blob/b588a06e41d920d2123ec70aee682bae14935939/lib/download.ps1#L580-L582> * Scoop -> lib -> core.ps1 -> `function get_config`: <https://github.com/ScoopInstaller/Scoop/blob/b588a06e41d920d2123ec70aee682bae14935939/lib/core.ps1#L97-L103> * BucketTemplate -> .github -> workflows -> excavator.yml: <https://github.com/ScoopInstaller/BucketTemplate/blob/master/.github/workflows/excavator.yml> * Uses: <https://github.com/ScoopInstaller/GithubActions/blob/main/action.yml> * Calls `Invoke-Action`: <https://github.com/ScoopInstaller/GithubActions/blob/main/src/ActionWrapper.psm1>
Question
Where to add GitHub personal access token to not get rate limited by the GitHub API?
Conclusions
GITHUB_TOKEN.GITHUB_TOKENeverywhere it can, which causes inconsistent rate limiting.GitHub API rate limiting:
GITHUB_TOKENContext
Related issues:
Related PRs:
Related code:
function Get-GitHubToken: https://github.com/ScoopInstaller/Scoop/blob/b588a06e41d920d2123ec70aee682bae14935939/lib/download.ps1#L580-L582function get_config: https://github.com/ScoopInstaller/Scoop/blob/b588a06e41d920d2123ec70aee682bae14935939/lib/core.ps1#L97-L103Invoke-Action: https://github.com/ScoopInstaller/GithubActions/blob/main/src/ActionWrapper.psm1