File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
extensions/ql-vscode/src/variant-analysis/gh-api Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { Progress } from "vscode";
1111import { CancellationToken } from "vscode-jsonrpc" ;
1212import { throttling } from "@octokit/plugin-throttling" ;
1313import { Octokit } from "@octokit/rest" ;
14+ import { showAndLogWarningMessage } from "../../helpers" ;
1415
1516export async function getCodeSearchRepositories (
1617 credentials : Credentials ,
@@ -28,23 +29,15 @@ export async function getCodeSearchRepositories(
2829 const octokit = new MyOctokit ( {
2930 auth,
3031 throttle : {
31- onRateLimit : (
32- retryAfter : number ,
33- options : any ,
34- octokit : Octokit ,
35- ) : boolean => {
36- octokit . log . warn (
32+ onRateLimit : ( retryAfter : number , options : any ) : boolean => {
33+ void showAndLogWarningMessage (
3734 `Request quota exhausted for request ${ options . method } ${ options . url } . Retrying after ${ retryAfter } seconds!` ,
3835 ) ;
3936
4037 return true ;
4138 } ,
42- onSecondaryRateLimit : (
43- _retryAfter : number ,
44- options : any ,
45- octokit : Octokit ,
46- ) : void => {
47- octokit . log . warn (
39+ onSecondaryRateLimit : ( _retryAfter : number , options : any ) : void => {
40+ void showAndLogWarningMessage (
4841 `SecondaryRateLimit detected for request ${ options . method } ${ options . url } ` ,
4942 ) ;
5043 } ,
You can’t perform that action at this time.
0 commit comments