-
Notifications
You must be signed in to change notification settings - Fork 226
Expand file tree
/
Copy pathquery-history-variant-analysis-dto.ts
More file actions
106 lines (95 loc) · 2.72 KB
/
query-history-variant-analysis-dto.ts
File metadata and controls
106 lines (95 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Contains models and consts for the data we want to store in the query history store.
// Changes to these models should be done carefully and account for backwards compatibility of data.
import { QueryLanguageDto } from "./query-history-dto";
export interface QueryHistoryVariantAnalysisDto {
readonly t: "variant-analysis";
failureReason?: string;
resultCount?: number;
status: QueryStatusDto;
completed: boolean;
variantAnalysis: VariantAnalysisDto;
userSpecifiedLabel?: string;
}
export interface VariantAnalysisDto {
id: number;
controllerRepo: {
id: number;
fullName: string;
private: boolean;
};
query: {
name: string;
filePath: string;
language: QueryLanguageDto;
text: string;
kind?: string;
};
databases: {
repositories?: string[];
repositoryLists?: string[];
repositoryOwners?: string[];
};
createdAt: string;
updatedAt: string;
executionStartTime: number;
status: VariantAnalysisStatusDto;
completedAt?: string;
actionsWorkflowRunId?: number;
failureReason?: VariantAnalysisFailureReasonDto;
scannedRepos?: VariantAnalysisScannedRepositoryDto[];
skippedRepos?: VariantAnalysisSkippedRepositoriesDto;
}
export interface VariantAnalysisScannedRepositoryDto {
repository: {
id: number;
fullName: string;
private: boolean;
stargazersCount: number;
updatedAt: string | null;
};
analysisStatus: VariantAnalysisRepoStatusDto;
resultCount?: number;
artifactSizeInBytes?: number;
failureMessage?: string;
}
export interface VariantAnalysisSkippedRepositoriesDto {
accessMismatchRepos?: VariantAnalysisSkippedRepositoryGroupDto;
notFoundRepos?: VariantAnalysisSkippedRepositoryGroupDto;
noCodeqlDbRepos?: VariantAnalysisSkippedRepositoryGroupDto;
overLimitRepos?: VariantAnalysisSkippedRepositoryGroupDto;
}
export interface VariantAnalysisSkippedRepositoryGroupDto {
repositoryCount: number;
repositories: VariantAnalysisSkippedRepositoryDto[];
}
export interface VariantAnalysisSkippedRepositoryDto {
id?: number;
fullName: string;
private?: boolean;
stargazersCount?: number;
updatedAt?: string | null;
}
export enum VariantAnalysisFailureReasonDto {
NoReposQueried = "noReposQueried",
ActionsWorkflowRunFailed = "actionsWorkflowRunFailed",
InternalError = "internalError",
}
export enum VariantAnalysisRepoStatusDto {
Pending = "pending",
InProgress = "inProgress",
Succeeded = "succeeded",
Failed = "failed",
Canceled = "canceled",
TimedOut = "timedOut",
}
export enum VariantAnalysisStatusDto {
InProgress = "inProgress",
Succeeded = "succeeded",
Failed = "failed",
Canceled = "canceled",
}
export enum QueryStatusDto {
InProgress = "InProgress",
Completed = "Completed",
Failed = "Failed",
}