Repository navigation
Expand file tree
/
Copy pathgithub_pull_request_review_protocol.ts
More file actions
94 lines (86 loc) · 2.54 KB
/
Copy pathgithub_pull_request_review_protocol.ts
File metadata and controls
94 lines (86 loc) · 2.54 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
export interface GithubReviewUser {
login: string;
}
export interface GithubReview {
state?: string | null;
user?: GithubReviewUser | null;
}
export interface GithubRequestedReviewersPage {
users: GithubReviewUser[];
}
export interface GithubPullRequestReviewerClient {
paginate: {
iterator<T>(
method: (parameters: Record<string, unknown>) => Promise<{ data: T }>,
parameters: Record<string, unknown>,
): AsyncIterable<{ data: T }>;
};
rest: {
pulls: {
listRequestedReviewers(
parameters: Record<string, unknown>,
): Promise<{ data: GithubRequestedReviewersPage }>;
listReviews(
parameters: Record<string, unknown>,
): Promise<{ data: GithubReview[] }>;
requestReviewers(parameters: Record<string, unknown>): Promise<{
data: { requested_reviewers?: GithubReviewUser[] | null };
}>;
};
};
}
export interface GithubReviewComment {
id: number;
node_id: string;
body?: string | null;
path?: string;
line?: number | null;
user?: { login?: string | null; type?: string | null } | null;
pull_request_review_id?: number | null;
html_url?: string | null;
created_at?: string | null;
}
export interface GithubPullRequestReview {
id: number;
body?: string | null;
user?: { login?: string | null } | null;
commit_id?: string | null;
html_url?: string | null;
}
export interface GithubPullRequestReviewCommentQueryClient {
paginate: {
iterator<T>(
method: (parameters: Record<string, unknown>) => Promise<{ data: T }>,
parameters: Record<string, unknown>,
): AsyncIterable<{ data: T }>;
};
rest: {
pulls: {
getReviewComment(
parameters: Record<string, unknown>,
): Promise<{ data: GithubReviewComment }>;
listReviewComments(
parameters: Record<string, unknown>,
): Promise<{ data: GithubReviewComment[] }>;
listReviews(
parameters: Record<string, unknown>,
): Promise<{ data: GithubPullRequestReview[] }>;
};
};
}
export interface GithubPullRequestReviewCommentCreateClient {
rest: {
pulls: {
createReview(
parameters: Record<string, unknown>,
): Promise<{ data: GithubPullRequestReview }>;
updateReview(
parameters: Record<string, unknown>,
): Promise<{ data: GithubPullRequestReview }>;
};
};
}
/** Shared route-scoped provider lifecycle, projected to narrow adapter protocols. */
export type GithubPullRequestReviewCommentClient =
GithubPullRequestReviewCommentQueryClient &
GithubPullRequestReviewCommentCreateClient;