Skip to content

Commit 008d7b3

Browse files
Merge pull request #1826 from github/robertbrignull/check_status
Check variant analysis status in isVariantAnalysisComplete
2 parents c9d6bfd + 1d4cbde commit 008d7b3

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

extensions/ql-vscode/src/remote-queries/shared/variant-analysis.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,15 @@ export async function isVariantAnalysisComplete(
165165
repo: VariantAnalysisScannedRepository,
166166
) => Promise<boolean>,
167167
): Promise<boolean> {
168-
// It's only acceptable to have no scanned repos if the variant analysis is not in a final state.
169-
// Otherwise it means the analysis hit some kind of internal error or there were no repos to scan.
168+
if (!isFinalVariantAnalysisStatus(variantAnalysis.status)) {
169+
return false;
170+
}
171+
170172
if (
171173
variantAnalysis.scannedRepos === undefined ||
172174
variantAnalysis.scannedRepos.length === 0
173175
) {
174-
return variantAnalysis.status !== VariantAnalysisStatus.InProgress;
176+
return true;
175177
}
176178

177179
return (

0 commit comments

Comments
 (0)