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

pullRequestReviews.graphql.ts

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