|
| 1 | +import { Repository } from './repository'; |
| 2 | + |
| 3 | +export interface VariantAnalysis { |
| 4 | + id: number, |
| 5 | + controllerRepoId: number, |
| 6 | + query: { |
| 7 | + name: string, |
| 8 | + filePath: string, |
| 9 | + language: VariantAnalysisQueryLanguage |
| 10 | + }, |
| 11 | + databases: { |
| 12 | + repositories?: string[], |
| 13 | + repositoryLists?: string[], |
| 14 | + repositoryOwners?: string[], |
| 15 | + }, |
| 16 | + status: VariantAnalysisStatus, |
| 17 | + actionsWorkflowRunId?: number, |
| 18 | + failureReason?: VariantAnalysisFailureReason, |
| 19 | + scannedRepos?: VariantAnalysisScannedRepository[], |
| 20 | + skippedRepos?: VariantAnalysisSkippedRepositories |
| 21 | +} |
| 22 | + |
| 23 | +export enum VariantAnalysisQueryLanguage { |
| 24 | + CSharp = 'csharp', |
| 25 | + Cpp = 'cpp', |
| 26 | + Go = 'go', |
| 27 | + Java = 'java', |
| 28 | + Javascript = 'javascript', |
| 29 | + Python = 'python', |
| 30 | + Ruby = 'ruby' |
| 31 | +} |
| 32 | + |
1 | 33 | export enum VariantAnalysisStatus { |
2 | 34 | InProgress = 'inProgress', |
3 | 35 | Succeeded = 'succeeded', |
4 | 36 | Failed = 'failed', |
5 | 37 | } |
| 38 | + |
| 39 | +export enum VariantAnalysisFailureReason { |
| 40 | + NoReposQueried = 'noReposQueried', |
| 41 | + InternalError = 'internalError', |
| 42 | +} |
| 43 | + |
| 44 | +export enum VariantAnalysisRepoStatus { |
| 45 | + Pending = 'pending', |
| 46 | + InProgress = 'inProgress', |
| 47 | + Succeeded = 'succeeded', |
| 48 | + Failed = 'failed', |
| 49 | + Canceled = 'canceled', |
| 50 | + TimedOut = 'timedOut', |
| 51 | +} |
| 52 | + |
| 53 | +export interface VariantAnalysisScannedRepository { |
| 54 | + repository: Repository, |
| 55 | + analysisStatus: VariantAnalysisRepoStatus, |
| 56 | + resultCount?: number, |
| 57 | + artifactSizeInBytes?: number, |
| 58 | + failureMessage?: string |
| 59 | +} |
| 60 | + |
| 61 | +export interface VariantAnalysisSkippedRepositories { |
| 62 | + accessMismatchRepos?: VariantAnalysisSkippedRepositoryGroup, |
| 63 | + notFoundRepos?: VariantAnalysisSkippedRepositoryGroup, |
| 64 | + noCodeqlDbRepos?: VariantAnalysisSkippedRepositoryGroup, |
| 65 | + overLimitRepos?: VariantAnalysisSkippedRepositoryGroup |
| 66 | +} |
| 67 | + |
| 68 | +export interface VariantAnalysisSkippedRepositoryGroup { |
| 69 | + repositoryCount: number, |
| 70 | + repositories: Array<{ |
| 71 | + id?: number, |
| 72 | + fullName: string |
| 73 | + }> |
| 74 | +} |
0 commit comments