File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
extensions/ql-vscode/src/variant-analysis/gh-api Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,13 @@ export async function getCodeSearchRepositories(
2929 } ,
3030 ) ) {
3131 nwos . push ( ...response . data . map ( ( item ) => item . full_name ) ) ;
32- const numberOfRequests = Math . ceil ( response . data . total_count / 99 ) ;
33- const increment = numberOfRequests < 10 ? 80 / numberOfRequests : 8 ;
32+ // calculate progress bar: 80% of the progress bar is used for the code search
33+ const totalNumberOfRequests = Math . ceil ( response . data . total_count / 100 ) ;
34+ // Since we have a maximum 10 of requests, we use a fixed increment whenever the totalNumberOfRequests is greater than 10
35+ const increment =
36+ totalNumberOfRequests < 10 ? 80 / totalNumberOfRequests : 8 ;
3437 progress . report ( { increment } ) ;
38+
3539 if ( token . isCancellationRequested ) {
3640 nwos = [ ] ;
3741 break ;
You can’t perform that action at this time.
0 commit comments