-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathindex.ts
More file actions
113 lines (101 loc) · 2.3 KB
/
index.ts
File metadata and controls
113 lines (101 loc) · 2.3 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
107
108
109
110
111
112
113
export interface BranchOptions {
compareBranch: string;
stackAPIKey: string;
module: string;
format: string;
baseBranch?: string;
authToken?: string;
host?: string;
}
export interface BranchDiffRes {
uid: string;
title: string;
type: string;
status: string;
merge_strategy?: string;
}
export interface BranchDiffSummary {
base: string;
compare: string;
base_only: number;
compare_only: number;
modified: number;
}
export interface BranchCompactTextRes {
modified?: BranchDiffRes[];
added?: BranchDiffRes[];
deleted?: BranchDiffRes[];
}
export interface MergeSummary {
requestPayload: MergeSummaryRequestPayload;
}
type MergeSummaryRequestPayload = {
base_branch: string;
compare_branch: string;
default_merge_strategy: string;
item_merge_strategies?: any[];
no_revert?: boolean;
merge_comment?: string;
};
export interface MergeInputOptions {
compareBranch: string;
strategy: string;
strategySubOption: string;
branchCompareData: any;
mergeComment?: string;
executeOption?: string;
noRevert?: boolean;
baseBranch: string;
format?: string;
exportSummaryPath?: string;
mergeSummary?: MergeSummary;
stackAPIKey: string;
host: string;
enableEntryExp: boolean;
}
export interface ModifiedFieldsType {
uid: string;
displayName: string;
path: string;
field: string;
}
export interface ModifiedFieldsInput {
modified?: ModifiedFieldsType[];
added?: ModifiedFieldsType[];
deleted?: ModifiedFieldsType[];
}
export interface BranchModifiedDetails {
moduleDetails: BranchDiffRes;
modifiedFields: ModifiedFieldsInput;
}
export interface BranchDiffVerboseRes {
modified?: BranchModifiedDetails[];
added?: BranchDiffRes[];
deleted?: BranchDiffRes[];
}
export interface BranchDiffPayload {
module: string;
apiKey: string;
baseBranch: string;
compareBranch: string;
filter?: string;
host?: string;
uid?: string;
spinner?: any;
url?: string;
}
export type MergeStrategy =
| 'merge_prefer_base'
| 'merge_prefer_compare'
| 'overwrite_with_compare'
| 'merge_new_only'
| 'merge_modified_only_prefer_base'
| 'merge_modified_only_prefer_compare'
| 'ignore';
export interface MergeParams {
base_branch: string;
compare_branch: string;
default_merge_strategy: MergeStrategy;
merge_comment: string;
no_revert?: boolean;
}