Skip to content

Commit d8efed5

Browse files
authored
fix: update for latest throttling options (#53)
1 parent 1fa1a45 commit d8efed5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

index.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ export const Octokit = OctokitCore.plugin(
1515
).defaults({
1616
userAgent: `octoherd-cli/${VERSION}`,
1717
throttle: {
18-
onAbuseLimit: (error, options, octokit) => {
19-
octokit.log.error("onAbuseLimit", error, options);
18+
onSecondaryRateLimit: (error, options, octokit, retryCount) => {
19+
octokit.log.error("onSecondaryRateLimit", error, options);
20+
21+
return retryCount < 3;
2022
},
21-
onRateLimit: (error, options, octokit) => {
23+
onRateLimit: (error, options, octokit, retryCount) => {
2224
octokit.log.error("onRateLimit", error, options);
25+
26+
return retryCount < 3;
2327
},
2428
},
2529
});

0 commit comments

Comments
 (0)