Fix rate limit issue with EditorConfig checker CLI #4422
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #4224 as part of #4223
This PR fixes an issue where the
editorconfig-checker
npm package throws a GitHub REST API error:On first run, the
editorconfig-checker
npm package (Node.js) downloads its binary (Go) from GitHub releasesSteps to reproduce
Run these steps too many times:
npm run lint:editorconfig
editorconfig-checker
hits GitHub REST API to check for latest releaseeditorconfig-checker
releases is downloaded to/home/runner/work/_temp/
The problem
The error throws from step 2) above via
@octokit/rest
(GitHub REST API client for JavaScript) in lines:https://github.com/editorconfig-checker/editorconfig-checker.javascript/blob/b6f19742da5d22e47ca09884b13c0bed03b551f1/src/release.ts#L12-L15
The fix
This PR adds
GITHUB_TOKEN
similar to our own GitHub REST API calls (#3229, #3282)