Stop checking result count and rename repoScanHasResults
This commit is contained in:
@@ -153,10 +153,10 @@ export function hasRepoScanCompleted(repo: VariantAnalysisScannedRepository): bo
|
||||
|
||||
/**
|
||||
* @param repo
|
||||
* @returns whether the repo scan is complete and has results that can be downloaded
|
||||
* @returns whether the repo scan has an artifact that can be downloaded
|
||||
*/
|
||||
export function repoScanHasResults(repo: VariantAnalysisScannedRepository): boolean {
|
||||
return repo.analysisStatus === VariantAnalysisRepoStatus.Succeeded && (repo.resultCount || 0) > 0;
|
||||
export function repoHasDownloadableArtifact(repo: VariantAnalysisScannedRepository): boolean {
|
||||
return repo.analysisStatus === VariantAnalysisRepoStatus.Succeeded;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from './gh-api/variant-analysis';
|
||||
import {
|
||||
hasRepoScanCompleted,
|
||||
repoScanHasResults,
|
||||
repoHasDownloadableArtifact,
|
||||
VariantAnalysis, VariantAnalysisQueryLanguage,
|
||||
VariantAnalysisScannedRepository,
|
||||
VariantAnalysisScannedRepositoryDownloadStatus,
|
||||
@@ -87,7 +87,7 @@ export class VariantAnalysisManager extends DisposableObject implements VariantA
|
||||
private async isVariantAnalysisRepoComplete(variantAnalysisId: number, repo: VariantAnalysisScannedRepository): Promise<boolean> {
|
||||
if (!hasRepoScanCompleted(repo)) {
|
||||
return false;
|
||||
} else if (!repoScanHasResults(repo)) {
|
||||
} else if (!repoHasDownloadableArtifact(repo)) {
|
||||
return true;
|
||||
} else {
|
||||
const storageLocation = this.getVariantAnalysisStorageLocation(variantAnalysisId);
|
||||
|
||||
Reference in New Issue
Block a user