Skip to content

Commit cd5096e

Browse files
committed
feat: pass octokit as third argument to onAbuseLimit/onRateLimit
1 parent 063174b commit cd5096e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ export function throttling(octokit: Octokit, octokitOptions = {}) {
132132
const wantRetry = await emitter.trigger(
133133
"abuse-limit",
134134
retryAfter,
135-
options
135+
options,
136+
octokit
136137
);
137138
return { wantRetry, retryAfter };
138139
}
@@ -153,7 +154,8 @@ export function throttling(octokit: Octokit, octokitOptions = {}) {
153154
const wantRetry = await emitter.trigger(
154155
"rate-limit",
155156
retryAfter,
156-
options
157+
options,
158+
octokit
157159
);
158160
return { wantRetry, retryAfter };
159161
}

0 commit comments

Comments
 (0)