forked from microsoft/vscode-pull-request-github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.ts
More file actions
126 lines (108 loc) · 2.75 KB
/
interface.ts
File metadata and controls
126 lines (108 loc) · 2.75 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
114
115
116
117
118
119
120
121
122
123
124
125
126
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export enum PRType {
RequestReview = 0,
AssignedToMe = 1,
Mine = 2,
Mention = 3,
All = 4,
LocalPullRequest = 5
}
export enum ReviewEvent {
Approve = 'APPROVE',
RequestChanges = 'REQUEST_CHANGES',
Comment = 'COMMENT'
}
export enum PullRequestStateEnum {
Open,
Merged,
Closed,
}
export interface ReviewState {
reviewer: IAccount;
state: string;
}
export interface IAccount {
login: string;
name?: string;
avatarUrl: string;
url: string;
}
export interface MergePullRequest {
sha: string;
merged: boolean;
message: string;
documentation_url: string;
}
export interface IRepository {
cloneUrl: string;
}
export interface IGitHubRef {
label: string;
ref: string;
sha: string;
repo: IRepository;
}
export interface ILabel {
name: string;
}
export interface PullRequest {
url: string;
number: number;
state: string;
body: string;
bodyHTML?: string;
title: string;
assignee?: IAccount;
createdAt: string;
updatedAt: string;
head?: IGitHubRef;
base?: IGitHubRef;
user: IAccount;
labels: ILabel[];
merged: boolean;
mergeable?: boolean;
nodeId: string;
}
export interface IRawFileChange {
filename: string;
previous_filename?: string;
additions: number;
deletions: number;
changes: number;
status: string;
raw_url: string;
blob_url: string;
patch: string;
}
export interface IPullRequestsPagingOptions {
fetchNextPage: boolean;
}
export interface IGitHubRepository {
authenticate(): Promise<boolean>;
}
export interface IPullRequestEditData {
body?: string;
title?: string;
}
export type MergeMethod = 'merge' | 'squash' | 'rebase';
export type MergeMethodsAvailability = {
[method in MergeMethod]: boolean;
};
export interface ITelemetry {
on(action: 'startup'): Promise<void>;
on(action: 'authSuccess'): Promise<void>;
on(action: 'commentsFromEditor'): Promise<void>;
on(action: 'commentsFromDescription'): Promise<void>;
on(action: 'prListExpandLocalPullRequest'): Promise<void>;
on(action: 'prListExpandRequestReview'): Promise<void>;
on(action: 'prListExpandAssignedToMe'): Promise<void>;
on(action: 'prListExpandMine'): Promise<void>;
on(action: 'prListExpandAll'): Promise<void>;
on(action: 'prCheckoutFromContext'): Promise<void>;
on(action: 'prCheckoutFromDescription'): Promise<void>;
on(action: string): Promise<void>;
shutdown(): Promise<void>;
}