-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
types.ts
55 lines (48 loc) · 1.28 KB
/
types.ts
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
import { Pr } from '../common';
import GitStorage from '../git';
// https://developer.github.com/v3/repos/statuses
// https://developer.github.com/v3/checks/runs/
export type CombinedBranchState = 'failure' | 'pending' | 'success';
export type BranchState = 'failure' | 'pending' | 'success' | 'error';
export interface GhBranchStatus {
context: string;
state: BranchState;
}
export interface CombinedBranchStatus {
state: CombinedBranchState;
statuses: GhBranchStatus[];
}
export interface Comment {
id: number;
body: string;
}
export interface GhPr extends Pr {
comments: Comment[];
}
export interface LocalRepoConfig {
repositoryName: string;
pushProtection: boolean;
prReviewsRequired: boolean;
repoForceRebase?: boolean;
storage: GitStorage;
parentRepo: string;
baseCommitSHA: string | null;
forkMode?: boolean;
forkToken?: string;
closedPrList: PrList | null;
openPrList: PrList | null;
prList: GhPr[] | null;
issueList: any[] | null;
mergeMethod: string;
baseBranch: string;
defaultBranch: string;
enterpriseVersion: string;
repositoryOwner: string;
repository: string | null;
localDir: string;
isGhe: boolean;
renovateUsername: string;
productLinks: any;
}
export type BranchProtection = any;
export type PrList = Record<number, GhPr>;