Skip to content

Commit 116acef

Browse files
Use correct type for octokit options
1 parent f6efcd5 commit 116acef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

extensions/ql-vscode/src/databases/code-search-api.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { BaseLogger } from "../common/logging";
66
import { AppOctokit } from "../common/octokit";
77
import type { ProgressCallback } from "../common/vscode/progress";
88
import { UserCancellationException } from "../common/vscode/progress";
9+
import { EndpointDefaults } from "@octokit/types";
910

1011
export async function getCodeSearchRepositories(
1112
query: string,
@@ -54,14 +55,17 @@ async function provideOctokitWithThrottling(
5455
const octokit = new MyOctokit({
5556
auth,
5657
throttle: {
57-
onRateLimit: (retryAfter: number, options: any): boolean => {
58+
onRateLimit: (retryAfter: number, options: EndpointDefaults): boolean => {
5859
void logger.log(
5960
`Rate Limit detected for request ${options.method} ${options.url}. Retrying after ${retryAfter} seconds!`,
6061
);
6162

6263
return true;
6364
},
64-
onSecondaryRateLimit: (_retryAfter: number, options: any): void => {
65+
onSecondaryRateLimit: (
66+
_retryAfter: number,
67+
options: EndpointDefaults,
68+
): void => {
6569
void logger.log(
6670
`Secondary Rate Limit detected for request ${options.method} ${options.url}`,
6771
);

0 commit comments

Comments
 (0)