-
Notifications
You must be signed in to change notification settings - Fork 738
Expand file tree
/
Copy pathlatestReviewCommitBuilder.ts
More file actions
29 lines (24 loc) · 1.22 KB
/
latestReviewCommitBuilder.ts
File metadata and controls
29 lines (24 loc) · 1.22 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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { createBuilderClass, createLink } from '../base';
import { LatestReviewCommitResponse } from '../../../github/graphql';
import { RateLimitBuilder } from './rateLimitBuilder';
type Repository = NonNullable<LatestReviewCommitResponse['repository']>;
type PullRequest = Repository['pullRequest'];
type ViewerLatestReview = PullRequest['viewerLatestReview'];
type Commit = ViewerLatestReview['commit'];
export const LatestReviewCommitBuilder = createBuilderClass<LatestReviewCommitResponse>()({
repository: createLink<Repository>()({
pullRequest: createLink<PullRequest>()({
viewerLatestReview: createLink<ViewerLatestReview>()({
commit: createLink<Commit>()({
oid: { default: 'abc' },
}),
}),
}),
}),
rateLimit: { linked: RateLimitBuilder },
});
export type LatestReviewCommitBuilder = InstanceType<typeof LatestReviewCommitBuilder>;