Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

pullRequestReviews.graphql.ts

628 lines28.6 KB

1// Generated by @effect/graphql-generator from pullRequestReviews.graphql. Do not edit.
2import { GraphQL, GraphQLGroup } from "effect/graphql"
3import * as Schema from "effect/Schema"
4import * as Shared from "../../schema/github.graphql.ts"
5​
6/** A user is an individual's account on GitHub that owns repositories and can make new content. */
7export const NodesUser = Schema.Struct({
8 __typename: Schema.Literal("User"),
9 /** The username used to login. */
10 login: Schema.String
11})
12export interface NodesUser extends Schema.Struct.Type<typeof NodesUser.fields> {}
13​
14/** A special type of user which takes actions on behalf of GitHub Apps. */
15export const NodesBot = Schema.Struct({
16 __typename: Schema.Literal("Bot"),
17 /** The username of the actor. */
18 login: Schema.String
19})
20export interface NodesBot extends Schema.Struct.Type<typeof NodesBot.fields> {}
21​
22/** An account on GitHub, with one or more owners, that has repositories, members and teams. */
23export const Organization = Schema.Struct({
24 __typename: Schema.Literal("Organization"),
25 /** The organization's login name. */
26 login: Schema.String
27})
28export interface Organization extends Schema.Struct.Type<typeof Organization.fields> {}
29​
30/** A placeholder user for attribution of imported data on GitHub. */
31export const Mannequin = Schema.Struct({
32 __typename: Schema.Literal("Mannequin"),
33 /** The username of the actor. */
34 login: Schema.String
35})
36export interface Mannequin extends Schema.Struct.Type<typeof Mannequin.fields> {}
37​
38/** Types that can be assigned to reactions. */
39export const ReactorOther = Schema.Struct({
40 __typename: GraphQL.otherTypename<Shared.Typename.Reactor>()(["User", "Bot", "Organization", "Mannequin"])
41})
42export interface ReactorOther extends Schema.Struct.Type<typeof ReactorOther.fields> {}
43​
44/** The connection type for Reactor. */
45export const ReactorConnection = Schema.Struct({
46 /** Identifies the total count of items in the connection. */
47 totalCount: Shared.Int,
48 /** A list of nodes. */
49 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(Schema.Union([
50 NodesUser,
51 NodesBot,
52 Organization,
53 Mannequin,
54 ReactorOther
55 ]))))
56})
57export interface ReactorConnection extends Schema.Struct.Type<typeof ReactorConnection.fields> {}
58​
59/** A group of emoji reactions to a particular piece of content. */
60export const ReactionGroup = Schema.Struct({
61 /** Identifies the emoji reaction. */
62 content: GraphQL.enumLiterals(Shared.ReactionContent.literals),
63 /** Whether or not the authenticated user has left a reaction on the subject. */
64 viewerHasReacted: Schema.Boolean,
65 /** Reactors to the reaction subject with the emotion represented by this reaction group. */
66 reactors: ReactorConnection
67})
68export interface ReactionGroup extends Schema.Struct.Type<typeof ReactionGroup.fields> {}
69​
70/**
71 * `fragment Reactions on Reactable`
72 *
73 * Represents a subject that can be reacted on.
74 */
75export const Reactions = Schema.Struct({
76 __typename: GraphQL.otherTypename<Shared.Typename.Reactable>()([]),
77 /** A list of reactions grouped by content left on the subject. */
78 reactionGroups: Schema.NullOr(Schema.Array(ReactionGroup))
79})
80export type Reactions = typeof Reactions.Type
81​
82/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
83export const Actor = Schema.Struct({
84 __typename: GraphQL.otherTypename<Shared.Typename.Actor>()([]),
85 /** The username of the actor. */
86 login: Schema.String,
87 /** A URL pointing to the actor's public avatar. */
88 avatarUrl: Shared.URI
89})
90export interface Actor extends Schema.Struct.Type<typeof Actor.fields> {}
91​
92/**
93 * `fragment ThreadComment on PullRequestReviewComment`
94 *
95 * A review comment associated with a given repository pull request.
96 */
97export const ThreadComment = Schema.Struct({
98 /** The Node ID of the PullRequestReviewComment object */
99 id: Shared.ID,
100 /** The actor who authored the comment. */
101 author: Schema.NullOr(Actor),
102 /** The comment body of this review comment. */
103 body: Schema.String,
104 /** Identifies when the comment was created. */
105 createdAt: Shared.DateTime,
106 /** The moment the editor made the last edit */
107 lastEditedAt: Schema.NullOr(Shared.DateTime),
108 /** The HTTP URL permalink for this review comment. */
109 url: Shared.URI,
110 /** Returns whether or not a comment has been minimized. */
111 isMinimized: Schema.Boolean,
112 /** A list of reactions grouped by content left on the subject. */
113 reactionGroups: Schema.NullOr(Schema.Array(ReactionGroup))
114})
115export interface ThreadComment extends Schema.Struct.Type<typeof ThreadComment.fields> {}
116​
117/** Information about pagination in a connection. */
118export const PageInfo = Schema.Struct({
119 /** When paginating forwards, are there more items? */
120 hasNextPage: Schema.Boolean,
121 /** When paginating forwards, the cursor to continue. */
122 endCursor: Schema.NullOr(Schema.String)
123})
124export interface PageInfo extends Schema.Struct.Type<typeof PageInfo.fields> {}
125​
126/** The connection type for PullRequestReviewComment. */
127export const NodesCommentsPullRequestReviewCommentConnection = Schema.Struct({
128 /** Identifies the total count of items in the connection. */
129 totalCount: Shared.Int,
130 /** Information to aid in pagination. */
131 pageInfo: PageInfo,
132 /** A list of nodes. */
133 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(ThreadComment)))
134})
135export interface NodesCommentsPullRequestReviewCommentConnection extends Schema.Struct.Type<typeof NodesCommentsPullRequestReviewCommentConnection.fields> {}
136​
137/** A threaded list of comments for a given pull request. */
138export const NodesPullRequestReviewThread = Schema.Struct({
139 /** The Node ID of the PullRequestReviewThread object */
140 id: Shared.ID,
141 /** Whether this thread has been resolved */
142 isResolved: Schema.Boolean,
143 /** Indicates whether this thread was outdated by newer changes. */
144 isOutdated: Schema.Boolean,
145 /** Identifies the file path of this thread. */
146 path: Schema.String,
147 /** The line in the file to which this thread refers */
148 line: Schema.NullOr(Shared.Int),
149 /** The side of the diff on which this thread was placed. */
150 diffSide: GraphQL.enumLiterals(Shared.DiffSide.literals),
151 /** A list of pull request comments associated with the thread. */
152 comments: NodesCommentsPullRequestReviewCommentConnection
153})
154export interface NodesPullRequestReviewThread extends Schema.Struct.Type<typeof NodesPullRequestReviewThread.fields> {}
155​
156/**
157 * `fragment ReviewThreadPage on PullRequestReviewThreadConnection`
158 *
159 * Review comment threads for a pull request review.
160 */
161export const ReviewThreadPage = Schema.Struct({
162 /** Identifies the total count of items in the connection. */
163 totalCount: Shared.Int,
164 /** Information to aid in pagination. */
165 pageInfo: PageInfo,
166 /** A list of nodes. */
167 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesPullRequestReviewThread)))
168})
169export interface ReviewThreadPage extends Schema.Struct.Type<typeof ReviewThreadPage.fields> {}
170​
171/** A user is an individual's account on GitHub that owns repositories and can make new content. */
172export const ViewerUser = Schema.Struct({
173 /** The username used to login. */
174 login: Schema.String
175})
176export interface ViewerUser extends Schema.Struct.Type<typeof ViewerUser.fields> {}
177​
178/** Represents a comment on an Issue. */
179export const IssueComment = Schema.Struct({
180 /** The Node ID of the IssueComment object */
181 id: Shared.ID,
182 /** The moment the editor made the last edit */
183 lastEditedAt: Schema.NullOr(Shared.DateTime),
184 /** The actor who authored the comment. */
185 author: Schema.NullOr(Actor),
186 /** A list of reactions grouped by content left on the subject. */
187 reactionGroups: Schema.NullOr(Schema.Array(ReactionGroup))
188})
189export interface IssueComment extends Schema.Struct.Type<typeof IssueComment.fields> {}
190​
191/** The connection type for IssueComment. */
192export const IssueCommentConnection = Schema.Struct({
193 /** A list of nodes. */
194 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(IssueComment)))
195})
196export interface IssueCommentConnection extends Schema.Struct.Type<typeof IssueCommentConnection.fields> {}
197​
198/** A review object for a given pull request. */
199export const ReviewsNodesPullRequestReview = Schema.Struct({
200 /** The Node ID of the PullRequestReview object */
201 id: Shared.ID,
202 /** The moment the editor made the last edit */
203 lastEditedAt: Schema.NullOr(Shared.DateTime),
204 /** The actor who authored the comment. */
205 author: Schema.NullOr(Actor),
206 /** A list of reactions grouped by content left on the subject. */
207 reactionGroups: Schema.NullOr(Schema.Array(ReactionGroup))
208})
209export interface ReviewsNodesPullRequestReview extends Schema.Struct.Type<typeof ReviewsNodesPullRequestReview.fields> {}
210​
211/** The connection type for PullRequestReview. */
212export const ReviewsPullRequestReviewConnection = Schema.Struct({
213 /** A list of nodes. */
214 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(ReviewsNodesPullRequestReview)))
215})
216export interface ReviewsPullRequestReviewConnection extends Schema.Struct.Type<typeof ReviewsPullRequestReviewConnection.fields> {}
217​
218/** A user is an individual's account on GitHub that owns repositories and can make new content. */
219export const RequestedReviewerUser = Schema.Struct({
220 __typename: Schema.Literal("User"),
221 /** The username used to login. */
222 login: Schema.String,
223 /** The user's public profile name. */
224 name: Schema.NullOr(Schema.String),
225 /** A URL pointing to the user's public avatar. */
226 avatarUrl: Shared.URI
227})
228export interface RequestedReviewerUser extends Schema.Struct.Type<typeof RequestedReviewerUser.fields> {}
229​
230/** A special type of user which takes actions on behalf of GitHub Apps. */
231export const RequestedReviewerBot = Schema.Struct({
232 __typename: Schema.Literal("Bot"),
233 /** The username of the actor. */
234 login: Schema.String,
235 /** A URL pointing to the GitHub App's public avatar. */
236 avatarUrl: Shared.URI
237})
238export interface RequestedReviewerBot extends Schema.Struct.Type<typeof RequestedReviewerBot.fields> {}
239​
240/** A team of users in an organization. */
241export const Team = Schema.Struct({
242 __typename: Schema.Literal("Team"),
243 /** The slug corresponding to the organization and team. */
244 combinedSlug: Schema.String,
245 /** The name of the team. */
246 teamName: Schema.String,
247 /** A URL pointing to the team's avatar. */
248 teamAvatarUrl: Schema.NullOr(Shared.URI)
249})
250export interface Team extends Schema.Struct.Type<typeof Team.fields> {}
251​
252/** Types that can be requested reviewers. */
253export const RequestedReviewerOther = Schema.Struct({
254 __typename: GraphQL.otherTypename<Shared.Typename.RequestedReviewer>()(["User", "Bot", "Team"])
255})
256export interface RequestedReviewerOther extends Schema.Struct.Type<typeof RequestedReviewerOther.fields> {}
257​
258/** A request for a user to review a pull request. */
259export const ReviewRequest = Schema.Struct({
260 /** The reviewer that is requested. */
261 requestedReviewer: Schema.NullOr(Schema.Union([
262 RequestedReviewerUser,
263 RequestedReviewerBot,
264 Team,
265 RequestedReviewerOther
266 ]))
267})
268export interface ReviewRequest extends Schema.Struct.Type<typeof ReviewRequest.fields> {}
269​
270/** The connection type for ReviewRequest. */
271export const ReviewRequestConnection = Schema.Struct({
272 /** A list of nodes. */
273 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(ReviewRequest)))
274})
275export interface ReviewRequestConnection extends Schema.Struct.Type<typeof ReviewRequestConnection.fields> {}
276​
277/** A review object for a given pull request. */
278export const LatestReviewsNodesPullRequestReview = Schema.Struct({
279 /** Identifies the current state of the pull request review. */
280 state: GraphQL.enumLiterals(Shared.PullRequestReviewState.literals),
281 /** Returns whether or not a comment has been minimized. */
282 isMinimized: Schema.Boolean,
283 /** The actor who authored the comment. */
284 author: Schema.NullOr(Actor)
285})
286export interface LatestReviewsNodesPullRequestReview extends Schema.Struct.Type<typeof LatestReviewsNodesPullRequestReview.fields> {}
287​
288/** The connection type for PullRequestReview. */
289export const LatestReviewsPullRequestReviewConnection = Schema.Struct({
290 /** A list of nodes. */
291 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(LatestReviewsNodesPullRequestReview)))
292})
293export interface LatestReviewsPullRequestReviewConnection extends Schema.Struct.Type<typeof LatestReviewsPullRequestReviewConnection.fields> {}
294​
295/** A review object for a given pull request. */
296export const ReviewPullRequestReview = Schema.Struct({
297 /** The Node ID of the PullRequestReview object */
298 id: Shared.ID
299})
300export interface ReviewPullRequestReview extends Schema.Struct.Type<typeof ReviewPullRequestReview.fields> {}
301​
302/** Represents a 'review_dismissed' event on a given issue or pull request. */
303export const ReviewDismissedEvent = Schema.Struct({
304 __typename: Schema.Literal("ReviewDismissedEvent"),
305 /** Identifies the optional message associated with the 'review_dismissed' event. */
306 dismissalMessage: Schema.NullOr(Schema.String),
307 /** Identifies the review associated with the 'review_dismissed' event. */
308 review: Schema.NullOr(ReviewPullRequestReview)
309})
310export interface ReviewDismissedEvent extends Schema.Struct.Type<typeof ReviewDismissedEvent.fields> {}
311​
312/** An item in a pull request timeline */
313export const PullRequestTimelineItemsOther = Schema.Struct({
314 __typename: GraphQL.otherTypename<Shared.Typename.PullRequestTimelineItems>()(["ReviewDismissedEvent"])
315})
316export interface PullRequestTimelineItemsOther extends Schema.Struct.Type<typeof PullRequestTimelineItemsOther.fields> {}
317​
318/** The connection type for PullRequestTimelineItems. */
319export const PullRequestTimelineItemsConnection = Schema.Struct({
320 /** Information to aid in pagination. */
321 pageInfo: PageInfo,
322 /** A list of nodes. */
323 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(Schema.Union([
324 ReviewDismissedEvent,
325 PullRequestTimelineItemsOther
326 ]))))
327})
328export interface PullRequestTimelineItemsConnection extends Schema.Struct.Type<typeof PullRequestTimelineItemsConnection.fields> {}
329​
330/** Represents an actor in a Git commit (ie. an author or committer). */
331export const GitActor = Schema.Struct({
332 /** The name in the Git commit. */
333 name: Schema.NullOr(Schema.String),
334 /** A URL pointing to the author's public avatar. */
335 avatarUrl: Shared.URI,
336 /** The GitHub user corresponding to the email field. Null if no such user exists. */
337 user: Schema.NullOr(ViewerUser)
338})
339export interface GitActor extends Schema.Struct.Type<typeof GitActor.fields> {}
340​
341/** The connection type for GitActor. */
342export const GitActorConnection = Schema.Struct({
343 /** A list of nodes. */
344 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(GitActor)))
345})
346export interface GitActorConnection extends Schema.Struct.Type<typeof GitActorConnection.fields> {}
347​
348/** Represents a Git commit. */
349export const Commit = Schema.Struct({
350 /** The Git object ID */
351 oid: Shared.GitObjectID,
352 /** The Git commit message headline */
353 messageHeadline: Schema.String,
354 /** The datetime when this commit was committed. */
355 committedDate: Shared.DateTime,
356 /**
357 * The list of authors for this commit based on the git author and the Co-authored-by
358 * message trailer. The git author will always be first.
359 */
360 authors: GitActorConnection
361})
362export interface Commit extends Schema.Struct.Type<typeof Commit.fields> {}
363​
364/** Represents a Git commit part of a pull request. */
365export const PullRequestCommit = Schema.Struct({
366 /** The Git commit object */
367 commit: Commit
368})
369export interface PullRequestCommit extends Schema.Struct.Type<typeof PullRequestCommit.fields> {}
370​
371/** The connection type for PullRequestCommit. */
372export const PullRequestCommitConnection = Schema.Struct({
373 /** A list of nodes. */
374 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCommit)))
375})
376export interface PullRequestCommitConnection extends Schema.Struct.Type<typeof PullRequestCommitConnection.fields> {}
377​
378/** A repository pull request. */
379export const ReviewThreadsRepositoryPullRequestPullRequest = Schema.Struct({
380 /** The list of all review threads for this pull request. */
381 reviewThreads: ReviewThreadPage,
382 /** Check if the current viewer can update this object. */
383 viewerCanUpdate: Schema.Boolean,
384 /** Did the viewer author this comment. */
385 viewerDidAuthor: Schema.Boolean,
386 /** The actor who authored the comment. */
387 author: Schema.NullOr(Actor),
388 /** A list of reactions grouped by content left on the subject. */
389 reactionGroups: Schema.NullOr(Schema.Array(ReactionGroup)),
390 /** A list of comments associated with the pull request. */
391 comments: IssueCommentConnection,
392 /** A list of reviews associated with the pull request. */
393 reviews: Schema.NullOr(ReviewsPullRequestReviewConnection),
394 /** A list of review requests associated with the pull request. */
395 reviewRequests: Schema.NullOr(ReviewRequestConnection),
396 /** A list of latest reviews per user associated with the pull request that are not also pending review. */
397 latestReviews: Schema.NullOr(LatestReviewsPullRequestReviewConnection),
398 /** A list of events, comments, commits, etc. associated with the pull request. */
399 reviewDismissals: PullRequestTimelineItemsConnection,
400 /** A list of commits present in this pull request's head branch not present in the base branch. */
401 commits: PullRequestCommitConnection
402})
403export interface ReviewThreadsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ReviewThreadsRepositoryPullRequestPullRequest.fields> {}
404​
405/** A repository contains the content for a project. */
406export const ReviewThreadsRepositoryRepository = Schema.Struct({
407 /** Returns a single pull request from the current repository by number. */
408 pullRequest: Schema.NullOr(ReviewThreadsRepositoryPullRequestPullRequest)
409})
410export interface ReviewThreadsRepositoryRepository extends Schema.Struct.Type<typeof ReviewThreadsRepositoryRepository.fields> {}
411​
412/** `query ReviewThreads` */
413export const ReviewThreads = GraphQL.query("ReviewThreads", {
414 document: {
415 variables: [
416 { name: "owner", body: "String!" },
417 { name: "name", body: "String!" },
418 { name: "number", body: "Int!" },
419 { name: "requestedReviewers", body: "Int!" }
420 ],
421 selections: [
422 { name: "viewer", body: ["{login}"] },
423 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){reviewThreads(first:100){...ReviewThreadPage}viewerCanUpdate viewerDidAuthor author{__typename login avatarUrl}...Reactions comments(first:100){nodes{id lastEditedAt author{__typename login avatarUrl}...Reactions}}reviews(first:100){nodes{id lastEditedAt author{__typename login avatarUrl}...Reactions}}reviewRequests(first:$", "requestedReviewers", "){nodes{requestedReviewer{__typename...on User{login name avatarUrl}...on Bot{login avatarUrl}...on Team{combinedSlug teamName:name teamAvatarUrl:avatarUrl}}}}latestReviews(first:50){nodes{state isMinimized author{__typename login avatarUrl}}}reviewDismissals:timelineItems(itemTypes:[REVIEW_DISMISSED_EVENT]first:100){pageInfo{hasNextPage endCursor}nodes{__typename...on ReviewDismissedEvent{dismissalMessage review{id}}}}commits(last:100){nodes{commit{oid messageHeadline committedDate authors(first:3){nodes{name avatarUrl user{login}}}}}}}}"] }
424 ],
425 fragments: [
426 { name: "ReviewThreadPage", body: ["on PullRequestReviewThreadConnection{totalCount pageInfo{hasNextPage endCursor}nodes{id isResolved isOutdated path line diffSide comments(first:10){totalCount pageInfo{hasNextPage endCursor}nodes{...ThreadComment}}}}"] },
427 { name: "Reactions", body: ["on Reactable{__typename reactionGroups{content viewerHasReacted reactors(first:10){totalCount nodes{__typename...on User{login}...on Bot{login}...on Organization{login}...on Mannequin{login}}}}}"] },
428 { name: "ThreadComment", body: ["on PullRequestReviewComment{id author{__typename login avatarUrl}body createdAt lastEditedAt url isMinimized...Reactions}"] }
429 ]
430 },
431 variables: {
432 owner: Schema.String,
433 name: Schema.String,
434 number: Shared.Int,
435 requestedReviewers: Shared.Int
436 },
437 result: Schema.Struct({
438 /** The currently authenticated user. */
439 viewer: ViewerUser,
440 /** Lookup a given repository by the owner and repository name. */
441 repository: Schema.NullOr(ReviewThreadsRepositoryRepository)
442 })
443})
444export declare namespace ReviewThreads {
445 export type Variables = typeof ReviewThreads.variables.Type
446 export type Result = typeof ReviewThreads.result.Type
448​
449/** A repository pull request. */
450export const ReviewThreadPagesRepositoryPullRequestPullRequest = Schema.Struct({
451 /** The list of all review threads for this pull request. */
452 reviewThreads: ReviewThreadPage
453})
454export interface ReviewThreadPagesRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ReviewThreadPagesRepositoryPullRequestPullRequest.fields> {}
455​
456/** A repository contains the content for a project. */
457export const ReviewThreadPagesRepositoryRepository = Schema.Struct({
458 /** Returns a single pull request from the current repository by number. */
459 pullRequest: Schema.NullOr(ReviewThreadPagesRepositoryPullRequestPullRequest)
460})
461export interface ReviewThreadPagesRepositoryRepository extends Schema.Struct.Type<typeof ReviewThreadPagesRepositoryRepository.fields> {}
462​
463/** `query ReviewThreadPages` */
464export const ReviewThreadPages = GraphQL.query("ReviewThreadPages", {
465 document: {
466 variables: [
467 { name: "owner", body: "String!" },
468 { name: "name", body: "String!" },
469 { name: "number", body: "Int!" },
470 { name: "after", body: "String!" }
471 ],
472 selections: [
473 { name: "viewer", body: ["{login}"] },
474 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){reviewThreads(first:100 after:$", "after", "){...ReviewThreadPage}}}"] }
475 ],
476 fragments: [
477 { name: "ReviewThreadPage", body: ["on PullRequestReviewThreadConnection{totalCount pageInfo{hasNextPage endCursor}nodes{id isResolved isOutdated path line diffSide comments(first:10){totalCount pageInfo{hasNextPage endCursor}nodes{...ThreadComment}}}}"] },
478 { name: "ThreadComment", body: ["on PullRequestReviewComment{id author{__typename login avatarUrl}body createdAt lastEditedAt url isMinimized...Reactions}"] },
479 { name: "Reactions", body: ["on Reactable{__typename reactionGroups{content viewerHasReacted reactors(first:10){totalCount nodes{__typename...on User{login}...on Bot{login}...on Organization{login}...on Mannequin{login}}}}}"] }
480 ]
481 },
482 variables: {
483 owner: Schema.String,
484 name: Schema.String,
485 number: Shared.Int,
486 after: Schema.String
487 },
488 result: Schema.Struct({
489 /** The currently authenticated user. */
490 viewer: ViewerUser,
491 /** Lookup a given repository by the owner and repository name. */
492 repository: Schema.NullOr(ReviewThreadPagesRepositoryRepository)
493 })
494})
495export declare namespace ReviewThreadPages {
496 export type Variables = typeof ReviewThreadPages.variables.Type
497 export type Result = typeof ReviewThreadPages.result.Type
499​
500/** A repository pull request. */
501export const ReviewThreadCommentsRepositoryPullRequestPullRequest = Schema.Struct({
502 /** The Node ID of the PullRequest object */
503 id: Shared.ID
504})
505export interface ReviewThreadCommentsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ReviewThreadCommentsRepositoryPullRequestPullRequest.fields> {}
506​
507/** A repository contains the content for a project. */
508export const ReviewThreadCommentsRepositoryRepository = Schema.Struct({
509 /** Returns a single pull request from the current repository by number. */
510 pullRequest: Schema.NullOr(ReviewThreadCommentsRepositoryPullRequestPullRequest)
511})
512export interface ReviewThreadCommentsRepositoryRepository extends Schema.Struct.Type<typeof ReviewThreadCommentsRepositoryRepository.fields> {}
513​
514/** The connection type for PullRequestReviewComment. */
515export const NodeCommentsPullRequestReviewCommentConnection = Schema.Struct({
516 /** Information to aid in pagination. */
517 pageInfo: PageInfo,
518 /** A list of nodes. */
519 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(ThreadComment)))
520})
521export interface NodeCommentsPullRequestReviewCommentConnection extends Schema.Struct.Type<typeof NodeCommentsPullRequestReviewCommentConnection.fields> {}
522​
523/** A threaded list of comments for a given pull request. */
524export const NodePullRequestReviewThread = Schema.Struct({
525 __typename: Schema.Literal("PullRequestReviewThread"),
526 /** Identifies the pull request associated with this thread. */
527 pullRequest: ReviewThreadCommentsRepositoryPullRequestPullRequest,
528 /** A list of pull request comments associated with the thread. */
529 comments: NodeCommentsPullRequestReviewCommentConnection
530})
531export interface NodePullRequestReviewThread extends Schema.Struct.Type<typeof NodePullRequestReviewThread.fields> {}
532​
533/** An object with an ID. */
534export const NodeOther = Schema.Struct({
535 __typename: GraphQL.otherTypename<Shared.Typename.Node>()(["PullRequestReviewThread"])
536})
537export interface NodeOther extends Schema.Struct.Type<typeof NodeOther.fields> {}
538​
539/** `query ReviewThreadComments` */
540export const ReviewThreadComments = GraphQL.query("ReviewThreadComments", {
541 document: {
542 variables: [
543 { name: "owner", body: "String!" },
544 { name: "name", body: "String!" },
545 { name: "number", body: "Int!" },
546 { name: "threadId", body: "ID!" },
547 { name: "after", body: "String" }
548 ],
549 selections: [
550 { name: "viewer", body: ["{login}"] },
551 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id}}"] },
552 { name: "node", body: ["(id:$", "threadId", "){__typename...on PullRequestReviewThread{pullRequest{id}comments(first:100 after:$", "after", "){pageInfo{hasNextPage endCursor}nodes{...ThreadComment}}}}"] }
553 ],
554 fragments: [
555 { name: "ThreadComment", body: ["on PullRequestReviewComment{id author{__typename login avatarUrl}body createdAt lastEditedAt url isMinimized...Reactions}"] },
556 { name: "Reactions", body: ["on Reactable{__typename reactionGroups{content viewerHasReacted reactors(first:10){totalCount nodes{__typename...on User{login}...on Bot{login}...on Organization{login}...on Mannequin{login}}}}}"] }
557 ]
558 },
559 variables: {
560 owner: Schema.String,
561 name: Schema.String,
562 number: Shared.Int,
563 threadId: Shared.ID,
564 after: Schema.optional(Schema.NullOr(Schema.String))
565 },
566 result: Schema.Struct({
567 /** The currently authenticated user. */
568 viewer: ViewerUser,
569 /** Lookup a given repository by the owner and repository name. */
570 repository: Schema.NullOr(ReviewThreadCommentsRepositoryRepository),
571 /** Fetches an object given its ID. */
572 node: Schema.NullOr(Schema.Union([
573 NodePullRequestReviewThread,
574 NodeOther
575 ]))
576 })
577})
578export declare namespace ReviewThreadComments {
579 export type Variables = typeof ReviewThreadComments.variables.Type
580 export type Result = typeof ReviewThreadComments.result.Type
582​
583/** A repository pull request. */
584export const ReviewDismissalsRepositoryPullRequestPullRequest = Schema.Struct({
585 /** A list of events, comments, commits, etc. associated with the pull request. */
586 timelineItems: PullRequestTimelineItemsConnection
587})
588export interface ReviewDismissalsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ReviewDismissalsRepositoryPullRequestPullRequest.fields> {}
589​
590/** A repository contains the content for a project. */
591export const ReviewDismissalsRepositoryRepository = Schema.Struct({
592 /** Returns a single pull request from the current repository by number. */
593 pullRequest: Schema.NullOr(ReviewDismissalsRepositoryPullRequestPullRequest)
594})
595export interface ReviewDismissalsRepositoryRepository extends Schema.Struct.Type<typeof ReviewDismissalsRepositoryRepository.fields> {}
596​
597/** `query ReviewDismissals` */
598export const ReviewDismissals = GraphQL.query("ReviewDismissals", {
599 document: {
600 variables: [
601 { name: "owner", body: "String!" },
602 { name: "name", body: "String!" },
603 { name: "number", body: "Int!" },
604 { name: "after", body: "String" }
605 ],
606 selections: [
607 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){timelineItems(itemTypes:[REVIEW_DISMISSED_EVENT]first:100 after:$", "after", "){pageInfo{hasNextPage endCursor}nodes{__typename...on ReviewDismissedEvent{dismissalMessage review{id}}}}}}"] }
608 ],
609 fragments: []
610 },
611 variables: {
612 owner: Schema.String,
613 name: Schema.String,
614 number: Shared.Int,
615 after: Schema.optional(Schema.NullOr(Schema.String))
616 },
617 result: Schema.Struct({
618 /** Lookup a given repository by the owner and repository name. */
619 repository: Schema.NullOr(ReviewDismissalsRepositoryRepository)
620 })
621})
622export declare namespace ReviewDismissals {
623 export type Variables = typeof ReviewDismissals.variables.Type
624 export type Result = typeof ReviewDismissals.result.Type
626​
627/** Every operation in pullRequestReviews.graphql. */
628export const PullRequestReviewsGraphQLGroup = GraphQLGroup.make(ReviewThreads, ReviewThreadPages, ReviewThreadComments, ReviewDismissals)