Replace 'abuse limit' with 'secondary limit'#455
Conversation
|
This would be a breaking change, let's deprecate the "abuse" named methods and add new secondary rate limit named methods. We can then remove these in a new major version once the new team is in place. |
97330ae to
4f81504
Compare
e45018d to
a36302d
Compare
src/index.ts
Outdated
| deprecate( | ||
| state.onAbuseLimit, | ||
| "'onAbuseLimit' is deprecated, use 'onSecondaryRateLimit' instead" | ||
| ) |
There was a problem hiding this comment.
@wolfy1339
This is the method you expected to be deprecated right?
Is util/deprecate good in this case??
There was a problem hiding this comment.
This is the method you expected to be deprecated right?
Yes
Is
util/deprecategood in this case??
That's a NodeJS only function. Octokit can be run in a browser environment.
Take example from this commit:
octokit/webhooks.js@f8f3d15
There was a problem hiding this comment.
Change applied.
For the @deprecated annotation I think it has sense to improve types for octokitOptions so we can mark it as deprecated. What do you think @wolfy1339 ?
| minimumAbuseRetryAfter: 5, | ||
| minimumSecondaryRateRetryAfter: 5, |
There was a problem hiding this comment.
I decided to replace property minimumAbuseRetryAfter with minimumSecondaryRateRetryAfter. I assume the plugin is in control of it and it's not expected to be passed as an option by the user.
Is my assumption correct?
| // @ts-ignore | ||
| events.on("abuse-limit", state.onAbuseLimit); | ||
| events.on( | ||
| "secondary-limit", |
There was a problem hiding this comment.
I'm assuming secondary-limit event will be sent from the L145 (so we have full control of the name). Is that correct or it should be listening to both (["abuse-limit", "secondary-limit"]?
4231afb to
7241f93
Compare
docs(secondary-limits): replace 'abuse-limits' with 'secondary-limits'
7241f93 to
872d4a1
Compare
|
you merged it to Sorry for the late response, I don't have much time right now to help with Octokit 😫 |
Interesting. I'm going to take a look on why that happened. Commits look good to me in terms of semantic.
I think we did the
Once a week I have time to contribute to OSS. I have time tomorrow CET so... no problem 😉. I'm here to help and learn.
No worries at all. Whenever you have time is fine, no rush. |
when you use "Squash & Merge", then the commit message defaults to the pull request title, if there is more than one commit.
oh okay if you already have deprecation than it's all good. I think I usually use |
True. What's the process when we commit this mistake?
Since we need to fix the commit message + release I can include |
Good question, we should document that, probably at https://github.com/octokit/octokit.js/blob/main/CONTRIBUTING.md#maintainers-only? I would create an empty commit with the correct commit message & body, that will trigger the release without making any code changes |
|
🎉 This PR is included in version 3.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
GitHub renamed `abuse limits` to `secondary rate limits` in 2021: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits `@octokit/plugin-throttling` followed suit in March 2022, and released version `3.6.0` with this new name (and deprecated `onAbuseLimit`): octokit/plugin-throttling.js#455 This commit updates the README file to use the new name.
GitHub renamed `abuse limits` to `secondary rate limits` in 2021: https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits `@octokit/plugin-throttling` followed suit in March 2022, and released version `3.6.0` with this new name (and deprecated `onAbuseLimit`): octokit/plugin-throttling.js#455 This commit updates the codebase to use the new name.
Fixes #439