@gitkraken/provider-apis 0.17.5 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +167 -0
- package/dist/index.js +124 -111
- package/dist/providers/azureDevops/azureDevOps.d.ts +67 -34
- package/dist/providers/bitbucket/bitbucket.d.ts +9 -9
- package/dist/providers/bitbucketServer/bitbucketServer.d.ts +10 -14
- package/dist/providers/gitProvider.d.ts +73 -0
- package/dist/providers/github/github.d.ts +51 -29
- package/dist/providers/github/githubTypes.d.ts +4 -0
- package/dist/providers/gitlab/gitlab.d.ts +48 -37
- package/dist/providers/issueProvider.d.ts +61 -6
- package/dist/providers/jira/jira.d.ts +17 -18
- package/dist/providers/jira/sharedHelpers.d.ts +10 -13
- package/dist/providers/jira/sharedTypes.d.ts +12 -0
- package/dist/providers/jiraServer/jiraServer.d.ts +10 -8
- package/dist/providers/trello/trello.d.ts +16 -12
- package/package.json +1 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { PagedResult, Result } from '../../types';
|
|
2
|
-
import { CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, Options } from '../gitProvider';
|
|
3
|
-
import { Issue } from '../issueProvider';
|
|
2
|
+
import { CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, Options, SetAccountInput, SetLabelInput, SetPullRequestInput } from '../gitProvider';
|
|
3
|
+
import { Issue, IssueProvider, SetIssueInput, SetStatusInput } from '../issueProvider';
|
|
4
4
|
import { Provider } from '../provider';
|
|
5
5
|
import { AzureGraphAccount, PullRequestAsyncStatus, WorkItemType } from './azureDevOpsTypes';
|
|
6
|
+
export interface AzureDevOpsProject {
|
|
7
|
+
namespace: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
6
10
|
export interface AzureGetRepoInput extends GetRepoInput {
|
|
7
11
|
project: string;
|
|
8
12
|
}
|
|
@@ -10,6 +14,26 @@ export interface AzureGetReposInput {
|
|
|
10
14
|
namespace: string;
|
|
11
15
|
project: string;
|
|
12
16
|
}
|
|
17
|
+
export interface AzureSetAccountInput extends SetAccountInput {
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AzureSetIssueInput extends SetIssueInput {
|
|
21
|
+
project: {
|
|
22
|
+
namespace: string;
|
|
23
|
+
resourceId: null;
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface AzureSetPullRequestInput extends SetPullRequestInput {
|
|
28
|
+
repository: {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
project: string;
|
|
32
|
+
owner: {
|
|
33
|
+
login: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}
|
|
13
37
|
export interface AzureProject {
|
|
14
38
|
id: string;
|
|
15
39
|
name: string;
|
|
@@ -26,7 +50,7 @@ export type StatusByWorkItemIdByStatusId = {
|
|
|
26
50
|
};
|
|
27
51
|
};
|
|
28
52
|
};
|
|
29
|
-
export declare class AzureDevOps extends Provider implements GitProvider {
|
|
53
|
+
export declare class AzureDevOps extends Provider implements GitProvider, IssueProvider {
|
|
30
54
|
/** Note: PATs are not supported for this function, only OAuth tokens are. */
|
|
31
55
|
getCurrentUser(input?: Record<string, never>, options?: EnterpriseOptions): Promise<{
|
|
32
56
|
data: {
|
|
@@ -207,40 +231,54 @@ export declare class AzureDevOps extends Provider implements GitProvider {
|
|
|
207
231
|
}>;
|
|
208
232
|
private updatePullRequest;
|
|
209
233
|
closePullRequest(input: {
|
|
210
|
-
|
|
211
|
-
pullRequestId: string;
|
|
234
|
+
pullRequest: AzureSetPullRequestInput;
|
|
212
235
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
213
236
|
mergePullRequest(input: {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
237
|
+
pullRequest: {
|
|
238
|
+
headRef: {
|
|
239
|
+
oid: string;
|
|
240
|
+
};
|
|
241
|
+
} & AzureSetPullRequestInput;
|
|
217
242
|
mergeStrategy?: GitMergeStrategy.MergeCommit | GitMergeStrategy.Rebase | GitMergeStrategy.RebaseThenMergeCommit | GitMergeStrategy.Squash;
|
|
218
243
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
219
244
|
addPullRequestLabel(input: {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
labelName: string;
|
|
245
|
+
pullRequest: SetPullRequestInput;
|
|
246
|
+
label: SetLabelInput;
|
|
223
247
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
224
248
|
removePullRequestLabel(input: {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
249
|
+
pullRequest: SetPullRequestInput;
|
|
250
|
+
label: SetLabelInput;
|
|
251
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
252
|
+
setPullRequestLabels(input: {
|
|
253
|
+
pullRequest: {
|
|
254
|
+
labels?: SetLabelInput[];
|
|
255
|
+
} & SetPullRequestInput;
|
|
256
|
+
labels: SetLabelInput[];
|
|
228
257
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
229
258
|
setPullRequestAsDraft(input: {
|
|
230
|
-
|
|
231
|
-
pullRequestId: string;
|
|
259
|
+
pullRequest: AzureSetPullRequestInput;
|
|
232
260
|
isDraft: boolean;
|
|
233
261
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
234
262
|
addPullRequestReviewer(input: {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
263
|
+
pullRequest: AzureSetPullRequestInput;
|
|
264
|
+
reviewer: {
|
|
265
|
+
id: string;
|
|
266
|
+
};
|
|
238
267
|
isRequired: boolean;
|
|
239
268
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
240
269
|
removePullRequestReviewer(input: {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
270
|
+
pullRequest: AzureSetPullRequestInput;
|
|
271
|
+
reviewer: {
|
|
272
|
+
id: string;
|
|
273
|
+
};
|
|
274
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
275
|
+
setPullRequestReviewers(input: {
|
|
276
|
+
pullRequest: {
|
|
277
|
+
assignees: {
|
|
278
|
+
id: string;
|
|
279
|
+
}[];
|
|
280
|
+
} & AzureSetPullRequestInput;
|
|
281
|
+
reviewers: SetAccountInput[];
|
|
244
282
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
245
283
|
getIssuesForAzureProject(input: {
|
|
246
284
|
namespace: string;
|
|
@@ -264,22 +302,16 @@ export declare class AzureDevOps extends Provider implements GitProvider {
|
|
|
264
302
|
}>;
|
|
265
303
|
private updateIssue;
|
|
266
304
|
setIssueStatus(input: {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
issueId: string;
|
|
270
|
-
status: string;
|
|
305
|
+
issue: AzureSetIssueInput;
|
|
306
|
+
status: SetStatusInput;
|
|
271
307
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
272
308
|
setIssueAssignee(input: {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
issueId: string;
|
|
276
|
-
assigneeNameOrEmail: string | null;
|
|
309
|
+
issue: AzureSetIssueInput;
|
|
310
|
+
assignee: AzureSetAccountInput | null;
|
|
277
311
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
278
312
|
setIssueLabels(input: {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
issueId: string;
|
|
282
|
-
tagNames: string[];
|
|
313
|
+
issue: AzureSetIssueInput;
|
|
314
|
+
labels: SetLabelInput[];
|
|
283
315
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
284
316
|
getIssueTypesForAzureProject(input: {
|
|
285
317
|
namespace: string;
|
|
@@ -296,6 +328,7 @@ export declare class AzureDevOps extends Provider implements GitProvider {
|
|
|
296
328
|
description: null;
|
|
297
329
|
id: string;
|
|
298
330
|
name: string;
|
|
331
|
+
url: string;
|
|
299
332
|
}[];
|
|
300
333
|
}>;
|
|
301
334
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Account, CursorPageInput, GetRepoErrorData, GetRepoInput, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, Options } from '../gitProvider';
|
|
1
|
+
import { Account, CursorPageInput, GetRepoErrorData, GetRepoInput, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, Options, SetAccountInput, SetPullRequestInput } from '../gitProvider';
|
|
2
2
|
import { Provider } from '../provider';
|
|
3
3
|
export interface RefreshTokenResponse {
|
|
4
4
|
access_token: string;
|
|
@@ -101,18 +101,18 @@ export declare class Bitbucket extends Provider implements GitProvider {
|
|
|
101
101
|
data: GitPullRequest[];
|
|
102
102
|
}>;
|
|
103
103
|
closePullRequest(input: {
|
|
104
|
-
|
|
105
|
-
pullRequestId: string;
|
|
104
|
+
pullRequest: SetPullRequestInput;
|
|
106
105
|
}, options?: Options): Promise<void>;
|
|
107
106
|
mergePullRequest(input: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
pullRequest: {
|
|
108
|
+
headRef: {
|
|
109
|
+
oid: string | null;
|
|
110
|
+
} | null;
|
|
111
|
+
} & SetPullRequestInput;
|
|
111
112
|
mergeStrategy?: GitMergeStrategy.MergeCommit | GitMergeStrategy.FastForward | GitMergeStrategy.Squash;
|
|
112
113
|
}, options?: Options): Promise<void>;
|
|
113
114
|
setPullRequestReviewers(input: {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
reviewerUsernames: string[];
|
|
115
|
+
pullRequest: SetPullRequestInput;
|
|
116
|
+
reviewers: SetAccountInput[];
|
|
117
117
|
}, options?: Options): Promise<void>;
|
|
118
118
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitProvider, GitPullRequest, GitRepository, NumberedPageInput } from '../gitProvider';
|
|
1
|
+
import { EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, SetPullRequestInput } from '../gitProvider';
|
|
2
2
|
import { EnterpriseProvider } from '../provider';
|
|
3
3
|
import { BitbucketServerMergeStrategy } from './bitbucketServerTypes';
|
|
4
4
|
export declare class BitbucketServer extends EnterpriseProvider implements GitProvider {
|
|
@@ -45,26 +45,22 @@ export declare class BitbucketServer extends EnterpriseProvider implements GitPr
|
|
|
45
45
|
data: GitPullRequest[];
|
|
46
46
|
}>;
|
|
47
47
|
closePullRequest(input: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
version: number;
|
|
51
|
-
}, options: EnterpriseOptions): Promise<void>;
|
|
48
|
+
pullRequest: SetPullRequestInput;
|
|
49
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
52
50
|
mergePullRequest(input: {
|
|
53
|
-
|
|
54
|
-
pullRequestId: string;
|
|
51
|
+
pullRequest: SetPullRequestInput;
|
|
55
52
|
mergeStrategyId?: string;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
getMergeStrategies(options: EnterpriseOptions): Promise<{
|
|
53
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
54
|
+
getMergeStrategies(options?: EnterpriseOptions): Promise<{
|
|
59
55
|
data: {
|
|
60
56
|
defaultStrategy: BitbucketServerMergeStrategy;
|
|
61
57
|
strategies: BitbucketServerMergeStrategy[];
|
|
62
58
|
};
|
|
63
59
|
}>;
|
|
64
60
|
setPullRequestReviewers(input: {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
pullRequest: SetPullRequestInput;
|
|
62
|
+
reviewers: {
|
|
63
|
+
username: string | null;
|
|
64
|
+
}[];
|
|
69
65
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
70
66
|
}
|
|
@@ -202,6 +202,7 @@ export interface GitPullRequest {
|
|
|
202
202
|
milestone?: GitMilestone | null;
|
|
203
203
|
labels?: GitLabel[];
|
|
204
204
|
permissions: GitPullRequestPermissions | null;
|
|
205
|
+
version?: number;
|
|
205
206
|
}
|
|
206
207
|
export interface GitComment {
|
|
207
208
|
author: Account | User | null;
|
|
@@ -247,6 +248,35 @@ export type GetPRForRepoInput = {
|
|
|
247
248
|
repo: GetRepoInput;
|
|
248
249
|
number: number;
|
|
249
250
|
};
|
|
251
|
+
export interface SetPullRequestInput {
|
|
252
|
+
id: string;
|
|
253
|
+
number: number;
|
|
254
|
+
graphQLId?: string;
|
|
255
|
+
repository: {
|
|
256
|
+
id: string;
|
|
257
|
+
name: string;
|
|
258
|
+
project?: string;
|
|
259
|
+
owner: {
|
|
260
|
+
login: string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
version?: number;
|
|
264
|
+
}
|
|
265
|
+
export interface SetMilestoneInput {
|
|
266
|
+
id: string;
|
|
267
|
+
graphQLId?: string;
|
|
268
|
+
}
|
|
269
|
+
export interface SetAccountInput {
|
|
270
|
+
id: string;
|
|
271
|
+
name: string | null;
|
|
272
|
+
graphQLId?: string;
|
|
273
|
+
username: string | null;
|
|
274
|
+
}
|
|
275
|
+
export interface SetLabelInput {
|
|
276
|
+
id: string | null;
|
|
277
|
+
graphQLId?: string;
|
|
278
|
+
name: string;
|
|
279
|
+
}
|
|
250
280
|
export interface CursorPageInput {
|
|
251
281
|
cursor?: string | null;
|
|
252
282
|
}
|
|
@@ -288,5 +318,48 @@ export interface GitProvider {
|
|
|
288
318
|
}, options: Options): Promise<Result<GitBlame>>;
|
|
289
319
|
getPullRequestsForRepos?(input: GetPRsForReposInput, options: Options): Promise<Result<GitPullRequest[]>>;
|
|
290
320
|
getPullRequestForRepo?(input: GetPRForRepoInput, options: Options): Promise<Result<GitPullRequest | null>>;
|
|
321
|
+
setPullRequestAssignees?(input: {
|
|
322
|
+
pullRequest: SetPullRequestInput;
|
|
323
|
+
assignees: SetAccountInput[];
|
|
324
|
+
}, options: Options): Promise<void>;
|
|
325
|
+
setPullRequestLabels?(input: {
|
|
326
|
+
pullRequest: {
|
|
327
|
+
labels?: GitLabel[];
|
|
328
|
+
} & SetPullRequestInput;
|
|
329
|
+
labels: SetLabelInput[];
|
|
330
|
+
}, options: Options): Promise<void>;
|
|
331
|
+
setPullRequestMilestone?(input: {
|
|
332
|
+
pullRequest: SetPullRequestInput;
|
|
333
|
+
milestone: SetMilestoneInput | null;
|
|
334
|
+
}, options: Options): Promise<void>;
|
|
335
|
+
setPullRequestAsDraft?(input: {
|
|
336
|
+
pullRequest: SetPullRequestInput;
|
|
337
|
+
isDraft: boolean;
|
|
338
|
+
}, options: Options): Promise<void>;
|
|
339
|
+
setPullRequestReviewers?(input: {
|
|
340
|
+
pullRequest: SetPullRequestInput;
|
|
341
|
+
reviewers: SetAccountInput[];
|
|
342
|
+
}, options: Options): Promise<void>;
|
|
343
|
+
reRequestPullRequestReviews?(input: {
|
|
344
|
+
pullRequest: {
|
|
345
|
+
reviews: {
|
|
346
|
+
reviewer: {
|
|
347
|
+
graphQLId?: string;
|
|
348
|
+
};
|
|
349
|
+
}[] | null;
|
|
350
|
+
} & SetPullRequestInput;
|
|
351
|
+
reviewers: SetAccountInput[];
|
|
352
|
+
}, options: Options): Promise<void>;
|
|
353
|
+
mergePullRequest?(input: {
|
|
354
|
+
pullRequest: {
|
|
355
|
+
headRef: {
|
|
356
|
+
oid: string | null;
|
|
357
|
+
} | null;
|
|
358
|
+
} & SetPullRequestInput;
|
|
359
|
+
mergeStrategy?: GitMergeStrategy;
|
|
360
|
+
}, options: Options): Promise<void>;
|
|
361
|
+
closePullRequest?(input: {
|
|
362
|
+
pullRequest: SetPullRequestInput;
|
|
363
|
+
}, options: Options): Promise<void>;
|
|
291
364
|
}
|
|
292
365
|
export declare const MAX_PAGE_SIZE = 100;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitProvider, GitPullRequest, GitPullRequestReviewComment, GitRepository, Organization } from '../gitProvider';
|
|
3
|
-
import { Issue } from '../issueProvider';
|
|
2
|
+
import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitMilestone, GitProvider, GitPullRequest, GitPullRequestReviewComment, GitPullRequestReviewState, GitRepository, Organization, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../gitProvider';
|
|
3
|
+
import { Issue, IssueProvider, SetIssueInput } from '../issueProvider';
|
|
4
4
|
import { EnterpriseProvider } from '../provider';
|
|
5
|
-
import { FetchIssuesData, FetchPullRequestsData } from './githubTypes';
|
|
6
|
-
export declare class GitHub extends EnterpriseProvider implements GitProvider {
|
|
5
|
+
import { FetchIssuesData, FetchPullRequestsData, GitHubIssueCloseReason } from './githubTypes';
|
|
6
|
+
export declare class GitHub extends EnterpriseProvider implements GitProvider, IssueProvider {
|
|
7
7
|
private _scopesCache;
|
|
8
8
|
private _enterpriseVersionsCache;
|
|
9
9
|
private getScopes;
|
|
@@ -210,30 +210,50 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider {
|
|
|
210
210
|
data: GitPullRequest | null;
|
|
211
211
|
}>;
|
|
212
212
|
closePullRequest(input: {
|
|
213
|
-
|
|
213
|
+
pullRequest: SetPullRequestInput;
|
|
214
214
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
215
215
|
mergePullRequest(input: {
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
pullRequest: {
|
|
217
|
+
headRef: {
|
|
218
|
+
oid: string | null;
|
|
219
|
+
} | null;
|
|
220
|
+
} & SetPullRequestInput;
|
|
218
221
|
mergeStrategy?: GitMergeStrategy.MergeCommit | GitMergeStrategy.Rebase | GitMergeStrategy.Squash;
|
|
219
222
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
220
223
|
setPullRequestMilestone(input: {
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
pullRequest: SetPullRequestInput;
|
|
225
|
+
milestone: SetMilestoneInput | null;
|
|
223
226
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
224
227
|
private markPullRequestReadyForReview;
|
|
225
228
|
private convertPullRequestToDraft;
|
|
226
229
|
setPullRequestAsDraft(input: {
|
|
227
|
-
|
|
230
|
+
pullRequest: SetPullRequestInput;
|
|
228
231
|
isDraft: boolean;
|
|
229
232
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
230
233
|
setPullRequestReviewers(input: {
|
|
231
|
-
|
|
232
|
-
|
|
234
|
+
pullRequest: {
|
|
235
|
+
reviews: {
|
|
236
|
+
reviewer: {
|
|
237
|
+
graphQLId?: string;
|
|
238
|
+
};
|
|
239
|
+
state: GitPullRequestReviewState;
|
|
240
|
+
}[] | null;
|
|
241
|
+
} & SetPullRequestInput;
|
|
242
|
+
reviewers: SetAccountInput[];
|
|
243
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
244
|
+
reRequestPullRequestReviews(input: {
|
|
245
|
+
pullRequest: {
|
|
246
|
+
reviews: {
|
|
247
|
+
reviewer: {
|
|
248
|
+
graphQLId?: string;
|
|
249
|
+
};
|
|
250
|
+
}[] | null;
|
|
251
|
+
} & SetPullRequestInput;
|
|
252
|
+
reviewers: SetAccountInput[];
|
|
233
253
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
234
254
|
setPullRequestAssignees(input: {
|
|
235
|
-
|
|
236
|
-
|
|
255
|
+
pullRequest: SetPullRequestInput;
|
|
256
|
+
assignees: SetAccountInput[];
|
|
237
257
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
238
258
|
getReviewsForPullRequest(input: {
|
|
239
259
|
repo: GetRepoInput;
|
|
@@ -266,8 +286,8 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider {
|
|
|
266
286
|
data: Issue[];
|
|
267
287
|
}>;
|
|
268
288
|
setPullRequestLabels(input: {
|
|
269
|
-
|
|
270
|
-
|
|
289
|
+
pullRequest: SetPullRequestInput;
|
|
290
|
+
labels: SetLabelInput[];
|
|
271
291
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
272
292
|
getIssuesForRepos(input: FetchIssuesData & CursorPageInput, options?: EnterpriseOptions): Promise<{
|
|
273
293
|
pageInfo: {
|
|
@@ -276,25 +296,27 @@ export declare class GitHub extends EnterpriseProvider implements GitProvider {
|
|
|
276
296
|
};
|
|
277
297
|
data: Issue[];
|
|
278
298
|
}>;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
299
|
+
closeIssueWithReason(input: {
|
|
300
|
+
issue: SetIssueInput;
|
|
301
|
+
reason: GitHubIssueCloseReason;
|
|
302
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
303
|
+
closeIssue(input: {
|
|
304
|
+
issue: SetIssueInput;
|
|
305
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
306
|
+
reOpenIssue(input: {
|
|
307
|
+
issue: SetIssueInput;
|
|
286
308
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
287
309
|
setIssueLabels(input: {
|
|
288
|
-
|
|
289
|
-
|
|
310
|
+
issue: SetIssueInput;
|
|
311
|
+
labels: SetLabelInput[];
|
|
290
312
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
291
313
|
setIssueMilestone(input: {
|
|
292
|
-
|
|
293
|
-
|
|
314
|
+
issue: SetIssueInput;
|
|
315
|
+
milestone: SetMilestoneInput | null;
|
|
294
316
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
295
317
|
setIssueAssignees(input: {
|
|
296
|
-
|
|
297
|
-
|
|
318
|
+
issue: SetIssueInput;
|
|
319
|
+
assignees: SetAccountInput[];
|
|
298
320
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
299
321
|
getMilestonesForRepo(input: {
|
|
300
322
|
repo: GetRepoInput;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput } from '../gitProvider';
|
|
2
|
-
import {
|
|
1
|
+
import { Account, CursorPageInput, EnterpriseOptions, GetRepoErrorData, GetRepoInput, GitLabel, GitMergeStrategy, GitProvider, GitPullRequest, GitRepository, NumberedPageInput, SetAccountInput, SetLabelInput, SetMilestoneInput, SetPullRequestInput } from '../gitProvider';
|
|
2
|
+
import { Issue, IssueProvider, SetIssueInput } from '../issueProvider';
|
|
3
3
|
import { EnterpriseProvider } from '../provider';
|
|
4
|
+
export interface GitLabGetIssueInput {
|
|
5
|
+
namespace: string;
|
|
6
|
+
name: string;
|
|
7
|
+
number: string;
|
|
8
|
+
}
|
|
4
9
|
export type PullRequestState = 'opened' | 'merged' | 'closed';
|
|
5
10
|
export type PullRequestAssociation = 'assigned' | 'authored' | 'reviewRequested';
|
|
6
11
|
export declare class GitLab extends EnterpriseProvider implements GitProvider, IssueProvider {
|
|
@@ -168,41 +173,48 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
|
|
|
168
173
|
data: GitPullRequest[];
|
|
169
174
|
}>;
|
|
170
175
|
closePullRequest(input: {
|
|
171
|
-
|
|
172
|
-
pullRequestId: string;
|
|
176
|
+
pullRequest: SetPullRequestInput;
|
|
173
177
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
174
178
|
mergePullRequest(input: {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
179
|
+
pullRequest: {
|
|
180
|
+
headRef: {
|
|
181
|
+
oid: string | null;
|
|
182
|
+
} | null;
|
|
183
|
+
} & SetPullRequestInput;
|
|
178
184
|
mergeStrategy?: GitMergeStrategy.Squash;
|
|
179
185
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
180
186
|
setPullRequestMilestone(input: {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
milestoneGraphQLId: string | null;
|
|
187
|
+
pullRequest: SetPullRequestInput;
|
|
188
|
+
milestone: SetMilestoneInput | null;
|
|
184
189
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
185
190
|
setPullRequestAsDraft(input: {
|
|
186
|
-
|
|
187
|
-
pullRequestId: string;
|
|
191
|
+
pullRequest: SetPullRequestInput;
|
|
188
192
|
isDraft: boolean;
|
|
189
193
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
190
194
|
setPullRequestReviewers(input: {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
195
|
+
pullRequest: SetPullRequestInput;
|
|
196
|
+
reviewers: SetAccountInput[];
|
|
197
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
198
|
+
private reRequestPullRequestReview;
|
|
199
|
+
reRequestPullRequestReviews(input: {
|
|
200
|
+
pullRequest: {
|
|
201
|
+
reviews: {
|
|
202
|
+
reviewer: {
|
|
203
|
+
graphQLId?: string;
|
|
204
|
+
};
|
|
205
|
+
}[] | null;
|
|
206
|
+
} & SetPullRequestInput;
|
|
207
|
+
reviewers: SetAccountInput[];
|
|
194
208
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
195
209
|
setPullRequestAssignees(input: {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
assigneeUsernames: string[];
|
|
210
|
+
pullRequest: SetPullRequestInput;
|
|
211
|
+
assignees: SetAccountInput[];
|
|
199
212
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
200
213
|
setPullRequestLabels(input: {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
labelGraphQLIds: string[];
|
|
214
|
+
pullRequest: SetPullRequestInput;
|
|
215
|
+
labels: SetLabelInput[];
|
|
204
216
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
205
|
-
getIssue(input:
|
|
217
|
+
getIssue(input: GitLabGetIssueInput, options?: EnterpriseOptions): Promise<{
|
|
206
218
|
data: Issue;
|
|
207
219
|
}>;
|
|
208
220
|
private getVariablesForIssues;
|
|
@@ -215,7 +227,7 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
|
|
|
215
227
|
pageInfo: {
|
|
216
228
|
endCursor: string | null;
|
|
217
229
|
hasNextPage: boolean;
|
|
218
|
-
}
|
|
230
|
+
};
|
|
219
231
|
data: Issue[];
|
|
220
232
|
}>;
|
|
221
233
|
getIssuesForRepos(input: {
|
|
@@ -227,28 +239,27 @@ export declare class GitLab extends EnterpriseProvider implements GitProvider, I
|
|
|
227
239
|
pageInfo: {
|
|
228
240
|
endCursor: string | null;
|
|
229
241
|
hasNextPage: boolean;
|
|
230
|
-
}
|
|
242
|
+
};
|
|
231
243
|
data: Issue[];
|
|
232
244
|
}>;
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
245
|
+
private setIssueState;
|
|
246
|
+
closeIssue(input: {
|
|
247
|
+
issue: SetIssueInput;
|
|
248
|
+
}, options?: EnterpriseOptions): Promise<void>;
|
|
249
|
+
reOpenIssue(input: {
|
|
250
|
+
issue: SetIssueInput;
|
|
237
251
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
238
252
|
setIssueLabels(input: {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
labelGraphQLIds: string[];
|
|
253
|
+
issue: SetIssueInput;
|
|
254
|
+
labels: SetLabelInput[];
|
|
242
255
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
243
256
|
setIssueMilestone(input: {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
milestoneGraphQLId: string | null;
|
|
257
|
+
issue: SetIssueInput;
|
|
258
|
+
milestone: SetMilestoneInput | null;
|
|
247
259
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
248
260
|
setIssueAssignees(input: {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
assigneeUsernames: string[];
|
|
261
|
+
issue: SetIssueInput;
|
|
262
|
+
assignees: SetAccountInput[];
|
|
252
263
|
}, options?: EnterpriseOptions): Promise<void>;
|
|
253
264
|
getMilestonesForRepo(input: {
|
|
254
265
|
repo: GetRepoInput;
|