Skip to content

Commit

Permalink
fix: update for latest throttling options (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Jun 5, 2023
1 parent 1fa1a45 commit d8efed5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.js
Expand Up @@ -15,11 +15,15 @@ export const Octokit = OctokitCore.plugin(
).defaults({
userAgent: `octoherd-cli/${VERSION}`,
throttle: {
onAbuseLimit: (error, options, octokit) => {
octokit.log.error("onAbuseLimit", error, options);
onSecondaryRateLimit: (error, options, octokit, retryCount) => {
octokit.log.error("onSecondaryRateLimit", error, options);

return retryCount < 3;
},
onRateLimit: (error, options, octokit) => {
onRateLimit: (error, options, octokit, retryCount) => {
octokit.log.error("onRateLimit", error, options);

return retryCount < 3;
},
},
});

0 comments on commit d8efed5

Please sign in to comment.