-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
types.ts
103 lines (90 loc) · 1.74 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
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
import type { Pr } from '../types';
export type BitbucketMergeStrategy = 'fast_forward' | 'merge_commit' | 'squash';
export interface MergeRequestBody {
close_source_branch?: boolean;
message?: string;
merge_strategy?: BitbucketMergeStrategy;
}
export interface Config {
defaultBranch: string;
has_issues: boolean;
mergeMethod: string;
owner: string;
prList: Pr[];
repository: string;
ignorePrAuthor: boolean;
}
export interface PagedResult<T = any> {
pagelen: number;
size?: number;
next?: string;
values: T[];
}
export interface RepoInfo {
isFork: boolean;
owner: string;
mainbranch: string;
mergeMethod: string;
has_issues: boolean;
uuid: string;
}
export interface RepoBranchingModel {
development: {
name: string;
branch?: {
name: string;
};
};
}
export interface BranchResponse {
target: {
hash: string;
};
}
export type BitbucketBranchState = 'SUCCESSFUL' | 'FAILED' | 'INPROGRESS';
export interface BitbucketStatus {
key: string;
state: BitbucketBranchState;
}
export interface RepoInfoBody {
parent?: any;
owner: { username: string };
mainbranch: { name: string };
has_issues: boolean;
uuid: string;
full_name: string;
}
export interface PrResponse {
id: number;
title: string;
state: string;
links: {
commits: {
href: string;
};
};
summary?: { raw: string };
source: {
branch: {
name: string;
};
};
destination: {
branch: {
name: string;
};
};
reviewers: Array<Account>;
created_on: string;
}
export interface Account {
display_name?: string;
uuid: string;
nickname?: string;
account_status?: string;
}
export interface EffectiveReviewer {
type: string;
reviewer_type: string;
user: Account;
}