refactor: to use octokit throttling plugin#378
Closed
moltar wants to merge 7 commits intosemantic-release:masterfrom
Closed
refactor: to use octokit throttling plugin#378moltar wants to merge 7 commits intosemantic-release:masterfrom
moltar wants to merge 7 commits intosemantic-release:masterfrom
Conversation
Member
Author
Member
gr2m
reviewed
Jun 3, 2021
lib/get-client.js
Outdated
| auth: `token ${githubToken}`, | ||
| baseUrl, | ||
| request: { | ||
| retries: RETRY_CONF.retries, |
Member
Author
There was a problem hiding this comment.
I think other tests were failing when I did not set that. Tbh, it was through denial and error.
Member
Author
Author
achingbrain
added a commit
to achingbrain/github
that referenced
this pull request
Apr 8, 2022
Refactors the client to use [@octokit/plugin-retry](https://www.npmjs.com/package/@octokit/plugin-retry) and [@octokit/plugin-throttling](https://www.npmjs.com/package/@octokit/plugin-throttling) as GitHub occasionally changes it's API and these plugins can abstract those changes away from this module. - Removes `lib/definitions/rate-limit.js` - Adds `lib/definitions/retry.js` and `lib/definitions/throttle.js` to handle retry/throttle settings - Updates tests to be more like GitHub (returing the correct rate limit response headers, etc) Fixes semantic-release#299 and semantic-release/semantic-release#2204 See also semantic-release#480 and semantic-release#378
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is still WIP, but I need help.
get-clientis failing, but I am not sure if they still make sense, given that we are switching to the plugin, which handles all of the logic. See below. Thoughts?nockand hitting live endpoints? Or maybe it is just the throttling/retry that does that.Closes #377