Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(throttling): use Octokit's plugin-throttling instead of a custom implementation #480

Closed

Conversation

oscard0m
Copy link
Contributor

📓 Description

Use Octokit's throttling plugin instead of implementing a custom implementation.

❓ Unknowns

  • Do we want to get rid of all custom logic and rely on the settings offered by default by Octokit's plugin-throttling?
  • Do we want to provide new options so the users of semantic-release can tweak the configuration of this plugin?

🔌 Context

The idea is to fix current throttling problems and rely on Octokit's plugin for future throttling options that could occur.

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
@oscard0m oscard0m force-pushed the use-octokit-plugin-throttling branch 3 times, most recently from 74e7752 to e4d583e Compare February 25, 2023 23:03
@oscard0m oscard0m force-pushed the use-octokit-plugin-throttling branch from e4d583e to 7959645 Compare February 25, 2023 23:05
@oscard0m
Copy link
Contributor Author

Closing this PR in favor of #487

@oscard0m oscard0m closed this Feb 25, 2023
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.

replace custom throttling code with @octokit/plugin-throttling
1 participant