Open History to see the last commit
1// Generated by @effect/graphql-generator from pullRequestMutations.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 User = Schema.Struct({
8 __typename: Schema.Literal("User"),
9 /** The username used to login. */
10 login: Schema.String,
11 /** A URL pointing to the user's public avatar. */
12 avatarUrl: Shared.URI,
13 /** The user's public profile name. */
14 name: Schema.NullOr(Schema.String)
15})
16export interface User extends Schema.Struct.Type<typeof User.fields> {}
17
18/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
19export const ActorOther = Schema.Struct({
20 __typename: GraphQL.otherTypename<Shared.Typename.Actor>()(["User"]),
21 /** The username of the actor. */
22 login: Schema.String,
23 /** A URL pointing to the actor's public avatar. */
24 avatarUrl: Shared.URI
25})
26export interface ActorOther extends Schema.Struct.Type<typeof ActorOther.fields> {}
27
28/** Represents an auto-merge request for a pull request */
29export const AutoMergeRequest = Schema.Struct({
30 /**
31 * The merge method of the auto-merge request. If a merge queue is required by
32 * the base branch, this value will be set by the merge queue when merging.
33 */
34 mergeMethod: GraphQL.enumLiterals(Shared.PullRequestMergeMethod.literals)
35})
36export interface AutoMergeRequest extends Schema.Struct.Type<typeof AutoMergeRequest.fields> {}
37
38/**
39 * `fragment PullRequestActionSummary on PullRequest`
40 *
41 * A repository pull request.
42 */
43export const PullRequestActionSummary = Schema.Struct({
44 /** Identifies the pull request number. */
45 number: Shared.Int,
46 /** Identifies the pull request title. */
47 title: Schema.String,
48 /** The HTTP URL for this pull request. */
49 url: Shared.URI,
50 /** Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. */
51 headRefName: Schema.String,
52 /** Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. */
53 baseRefName: Schema.String,
54 /** Identifies the state of the pull request. */
55 state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
56 /** Identifies if the pull request is a draft. */
57 isDraft: Schema.Boolean,
58 /** Identifies the date and time when the object was last updated. */
59 updatedAt: Shared.DateTime,
60 /** The date and time that the pull request was merged. */
61 mergedAt: Schema.NullOr(Shared.DateTime),
62 /** Identifies the date and time when the object was closed. */
63 closedAt: Schema.NullOr(Shared.DateTime),
64 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
65 headRefOid: Shared.GitObjectID,
66 /** The actor who authored the comment. */
67 author: Schema.NullOr(Schema.Union([
68 User,
69 ActorOther
70 ])),
71 /** Returns the auto-merge request object if one exists for this pull request. */
72 autoMergeRequest: Schema.NullOr(AutoMergeRequest)
73})
74export interface PullRequestActionSummary extends Schema.Struct.Type<typeof PullRequestActionSummary.fields> {}
75
76/** A review comment associated with a given repository pull request. */
77export const PullRequestReviewComment = Schema.Struct({
78 /** The Node ID of the PullRequestReviewComment object */
79 id: Shared.ID
80})
81export interface PullRequestReviewComment extends Schema.Struct.Type<typeof PullRequestReviewComment.fields> {}
82
83/** Autogenerated return type of AddPullRequestReviewThreadReply. */
84export const AddPullRequestReviewThreadReplyPayload = Schema.Struct({
85 /** The newly created reply. */
86 comment: Schema.NullOr(PullRequestReviewComment)
87})
88export interface AddPullRequestReviewThreadReplyPayload extends Schema.Struct.Type<typeof AddPullRequestReviewThreadReplyPayload.fields> {}
89
90/** `mutation AddReviewThreadReply` */
91export const AddReviewThreadReply = GraphQL.mutation("AddReviewThreadReply", {
92 document: {
93 variables: [
94 { name: "threadId", body: "ID!" },
95 { name: "body", body: "String!" }
96 ],
97 selections: [
98 { name: "addPullRequestReviewThreadReply", body: ["(input:{pullRequestReviewThreadId:$", "threadId", " body:$", "body", "}){comment{id}}"] }
99 ],
100 fragments: []
101 },
102 variables: {
103 threadId: Shared.ID,
104 body: Schema.String
105 },
106 result: Schema.Struct({
107 /** Adds a reply to an existing Pull Request Review Thread. */
108 addPullRequestReviewThreadReply: Schema.NullOr(AddPullRequestReviewThreadReplyPayload)
109 })
110})
111export declare namespace AddReviewThreadReply {
112 export type Variables = typeof AddReviewThreadReply.variables.Type
113 export type Result = typeof AddReviewThreadReply.result.Type
114}
115
116/** An emoji reaction to a particular piece of content. */
117export const Reaction = Schema.Struct({
118 /** Identifies the emoji reaction. */
119 content: GraphQL.enumLiterals(Shared.ReactionContent.literals)
120})
121export interface Reaction extends Schema.Struct.Type<typeof Reaction.fields> {}
122
123/** Autogenerated return type of AddReaction. */
124export const AddReactionPayload = Schema.Struct({
125 /** The reaction object. */
126 reaction: Schema.NullOr(Reaction)
127})
128export interface AddReactionPayload extends Schema.Struct.Type<typeof AddReactionPayload.fields> {}
129
130/** `mutation AddReaction` */
131export const AddReaction = GraphQL.mutation("AddReaction", {
132 document: {
133 variables: [
134 { name: "subjectId", body: "ID!" },
135 { name: "content", body: "ReactionContent!" }
136 ],
137 selections: [
138 { name: "addReaction", body: ["(input:{subjectId:$", "subjectId", " content:$", "content", "}){reaction{content}}"] }
139 ],
140 fragments: []
141 },
142 variables: {
143 subjectId: Shared.ID,
144 content: Shared.ReactionContent
145 },
146 result: Schema.Struct({
147 /** Adds a reaction to a subject. */
148 addReaction: Schema.NullOr(AddReactionPayload)
149 })
150})
151export declare namespace AddReaction {
152 export type Variables = typeof AddReaction.variables.Type
153 export type Result = typeof AddReaction.result.Type
154}
155
156/** Autogenerated return type of RemoveReaction. */
157export const RemoveReactionPayload = Schema.Struct({
158 /** The reaction object. */
159 reaction: Schema.NullOr(Reaction)
160})
161export interface RemoveReactionPayload extends Schema.Struct.Type<typeof RemoveReactionPayload.fields> {}
162
163/** `mutation RemoveReaction` */
164export const RemoveReaction = GraphQL.mutation("RemoveReaction", {
165 document: {
166 variables: [
167 { name: "subjectId", body: "ID!" },
168 { name: "content", body: "ReactionContent!" }
169 ],
170 selections: [
171 { name: "removeReaction", body: ["(input:{subjectId:$", "subjectId", " content:$", "content", "}){reaction{content}}"] }
172 ],
173 fragments: []
174 },
175 variables: {
176 subjectId: Shared.ID,
177 content: Shared.ReactionContent
178 },
179 result: Schema.Struct({
180 /** Removes a reaction from a subject. */
181 removeReaction: Schema.NullOr(RemoveReactionPayload)
182 })
183})
184export declare namespace RemoveReaction {
185 export type Variables = typeof RemoveReaction.variables.Type
186 export type Result = typeof RemoveReaction.result.Type
187}
188
189/** A threaded list of comments for a given pull request. */
190export const PullRequestReviewThread = Schema.Struct({
191 /** Whether this thread has been resolved */
192 isResolved: Schema.Boolean
193})
194export interface PullRequestReviewThread extends Schema.Struct.Type<typeof PullRequestReviewThread.fields> {}
195
196/** Autogenerated return type of ResolveReviewThread. */
197export const ResolveReviewThreadPayload = Schema.Struct({
198 /** The thread to resolve. */
199 thread: Schema.NullOr(PullRequestReviewThread)
200})
201export interface ResolveReviewThreadPayload extends Schema.Struct.Type<typeof ResolveReviewThreadPayload.fields> {}
202
203/** `mutation ResolveReviewThread` */
204export const ResolveReviewThread = GraphQL.mutation("ResolveReviewThread", {
205 document: {
206 variables: [
207 { name: "threadId", body: "ID!" }
208 ],
209 selections: [
210 { name: "resolveReviewThread", body: ["(input:{threadId:$", "threadId", "}){thread{isResolved}}"] }
211 ],
212 fragments: []
213 },
214 variables: {
215 threadId: Shared.ID
216 },
217 result: Schema.Struct({
218 /** Marks a review thread as resolved. */
219 resolveReviewThread: Schema.NullOr(ResolveReviewThreadPayload)
220 })
221})
222export declare namespace ResolveReviewThread {
223 export type Variables = typeof ResolveReviewThread.variables.Type
224 export type Result = typeof ResolveReviewThread.result.Type
225}
226
227/** Autogenerated return type of UnresolveReviewThread. */
228export const UnresolveReviewThreadPayload = Schema.Struct({
229 /** The thread to resolve. */
230 thread: Schema.NullOr(PullRequestReviewThread)
231})
232export interface UnresolveReviewThreadPayload extends Schema.Struct.Type<typeof UnresolveReviewThreadPayload.fields> {}
233
234/** `mutation UnresolveReviewThread` */
235export const UnresolveReviewThread = GraphQL.mutation("UnresolveReviewThread", {
236 document: {
237 variables: [
238 { name: "threadId", body: "ID!" }
239 ],
240 selections: [
241 { name: "unresolveReviewThread", body: ["(input:{threadId:$", "threadId", "}){thread{isResolved}}"] }
242 ],
243 fragments: []
244 },
245 variables: {
246 threadId: Shared.ID
247 },
248 result: Schema.Struct({
249 /** Marks a review thread as unresolved. */
250 unresolveReviewThread: Schema.NullOr(UnresolveReviewThreadPayload)
251 })
252})
253export declare namespace UnresolveReviewThread {
254 export type Variables = typeof UnresolveReviewThread.variables.Type
255 export type Result = typeof UnresolveReviewThread.result.Type
256}
257
258/** A repository pull request. */
259export const PullRequest = Schema.Struct({
260 /** The Node ID of the PullRequest object */
261 id: Shared.ID
262})
263export interface PullRequest extends Schema.Struct.Type<typeof PullRequest.fields> {}
264
265/** Autogenerated return type of UpdatePullRequest. */
266export const UpdatePullRequestPayload = Schema.Struct({
267 /** The updated pull request. */
268 pullRequest: Schema.NullOr(PullRequest)
269})
270export interface UpdatePullRequestPayload extends Schema.Struct.Type<typeof UpdatePullRequestPayload.fields> {}
271
272/** `mutation UpdatePullRequest` */
273export const UpdatePullRequest = GraphQL.mutation("UpdatePullRequest", {
274 document: {
275 variables: [
276 { name: "pullRequestId", body: "ID!" },
277 { name: "title", body: "String" },
278 { name: "body", body: "String" },
279 { name: "maintainerCanModify", body: "Boolean" }
280 ],
281 selections: [
282 { name: "updatePullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", " title:$", "title", " body:$", "body", " maintainerCanModify:$", "maintainerCanModify", "}){pullRequest{id}}"] }
283 ],
284 fragments: []
285 },
286 variables: {
287 pullRequestId: Shared.ID,
288 title: Schema.optional(Schema.NullOr(Schema.String)),
289 body: Schema.optional(Schema.NullOr(Schema.String)),
290 maintainerCanModify: Schema.optional(Schema.NullOr(Schema.Boolean))
291 },
292 result: Schema.Struct({
293 /** Update a pull request */
294 updatePullRequest: Schema.NullOr(UpdatePullRequestPayload)
295 })
296})
297export declare namespace UpdatePullRequest {
298 export type Variables = typeof UpdatePullRequest.variables.Type
299 export type Result = typeof UpdatePullRequest.result.Type
300}
301
302/** Autogenerated return type of RevertPullRequest. */
303export const RevertPullRequestPayload = Schema.Struct({
304 /** The new pull request that reverts the input pull request. */
305 revertPullRequest: Schema.NullOr(PullRequest)
306})
307export interface RevertPullRequestPayload extends Schema.Struct.Type<typeof RevertPullRequestPayload.fields> {}
308
309/** `mutation RevertPullRequest` */
310export const RevertPullRequest = GraphQL.mutation("RevertPullRequest", {
311 document: {
312 variables: [
313 { name: "pullRequestId", body: "ID!" }
314 ],
315 selections: [
316 { name: "revertPullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", "}){revertPullRequest{id}}"] }
317 ],
318 fragments: []
319 },
320 variables: {
321 pullRequestId: Shared.ID
322 },
323 result: Schema.Struct({
324 /** Create a pull request that reverts the changes from a merged pull request. */
325 revertPullRequest: Schema.NullOr(RevertPullRequestPayload)
326 })
327})
328export declare namespace RevertPullRequest {
329 export type Variables = typeof RevertPullRequest.variables.Type
330 export type Result = typeof RevertPullRequest.result.Type
331}
332
333/** Represents a comment on an Issue. */
334export const IssueComment = Schema.Struct({
335 /** The Node ID of the IssueComment object */
336 id: Shared.ID
337})
338export interface IssueComment extends Schema.Struct.Type<typeof IssueComment.fields> {}
339
340/** Autogenerated return type of UpdateIssueComment. */
341export const UpdateIssueCommentPayload = Schema.Struct({
342 /** The updated comment. */
343 issueComment: Schema.NullOr(IssueComment)
344})
345export interface UpdateIssueCommentPayload extends Schema.Struct.Type<typeof UpdateIssueCommentPayload.fields> {}
346
347/** `mutation UpdateIssueComment` */
348export const UpdateIssueComment = GraphQL.mutation("UpdateIssueComment", {
349 document: {
350 variables: [
351 { name: "commentId", body: "ID!" },
352 { name: "body", body: "String!" }
353 ],
354 selections: [
355 { name: "updateIssueComment", body: ["(input:{id:$", "commentId", " body:$", "body", "}){issueComment{id}}"] }
356 ],
357 fragments: []
358 },
359 variables: {
360 commentId: Shared.ID,
361 body: Schema.String
362 },
363 result: Schema.Struct({
364 /** Updates an IssueComment object. */
365 updateIssueComment: Schema.NullOr(UpdateIssueCommentPayload)
366 })
367})
368export declare namespace UpdateIssueComment {
369 export type Variables = typeof UpdateIssueComment.variables.Type
370 export type Result = typeof UpdateIssueComment.result.Type
371}
372
373/** Autogenerated return type of UpdatePullRequestReviewComment. */
374export const UpdatePullRequestReviewCommentPayload = Schema.Struct({
375 /** The updated comment. */
376 pullRequestReviewComment: Schema.NullOr(PullRequestReviewComment)
377})
378export interface UpdatePullRequestReviewCommentPayload extends Schema.Struct.Type<typeof UpdatePullRequestReviewCommentPayload.fields> {}
379
380/** `mutation UpdateReviewComment` */
381export const UpdateReviewComment = GraphQL.mutation("UpdateReviewComment", {
382 document: {
383 variables: [
384 { name: "commentId", body: "ID!" },
385 { name: "body", body: "String!" }
386 ],
387 selections: [
388 { name: "updatePullRequestReviewComment", body: ["(input:{pullRequestReviewCommentId:$", "commentId", " body:$", "body", "}){pullRequestReviewComment{id}}"] }
389 ],
390 fragments: []
391 },
392 variables: {
393 commentId: Shared.ID,
394 body: Schema.String
395 },
396 result: Schema.Struct({
397 /** Updates a pull request review comment. */
398 updatePullRequestReviewComment: Schema.NullOr(UpdatePullRequestReviewCommentPayload)
399 })
400})
401export declare namespace UpdateReviewComment {
402 export type Variables = typeof UpdateReviewComment.variables.Type
403 export type Result = typeof UpdateReviewComment.result.Type
404}
405
406/** Autogenerated return type of MarkFileAsViewed. */
407export const MarkFileAsViewedPayload = Schema.Struct({
408 /** A unique identifier for the client performing the mutation. */
409 clientMutationId: Schema.NullOr(Schema.String)
410})
411export interface MarkFileAsViewedPayload extends Schema.Struct.Type<typeof MarkFileAsViewedPayload.fields> {}
412
413/** Autogenerated return type of UnmarkFileAsViewed. */
414export const UnmarkFileAsViewedPayload = Schema.Struct({
415 /** A unique identifier for the client performing the mutation. */
416 clientMutationId: Schema.NullOr(Schema.String)
417})
418export interface UnmarkFileAsViewedPayload extends Schema.Struct.Type<typeof UnmarkFileAsViewedPayload.fields> {}
419
420/** `mutation SetFileViewed` */
421export const SetFileViewed = GraphQL.mutation("SetFileViewed", {
422 document: {
423 variables: [
424 { name: "pullRequestId", body: "ID!" },
425 { name: "path", body: "String!" },
426 { name: "viewed", body: "Boolean!" }
427 ],
428 selections: [
429 { name: "markFileAsViewed", body: ["(input:{pullRequestId:$", "pullRequestId", " path:$", "path", "})@include(if:$", "viewed", "){clientMutationId}"] },
430 { name: "unmarkFileAsViewed", body: ["(input:{pullRequestId:$", "pullRequestId", " path:$", "path", "})@skip(if:$", "viewed", "){clientMutationId}"] }
431 ],
432 fragments: []
433 },
434 variables: {
435 pullRequestId: Shared.ID,
436 path: Schema.String,
437 viewed: Schema.Boolean
438 },
439 result: Schema.Struct({
440 /** Mark a pull request file as viewed */
441 markFileAsViewed: Schema.optionalKey(Schema.NullOr(MarkFileAsViewedPayload)),
442 /** Unmark a pull request file as viewed */
443 unmarkFileAsViewed: Schema.optionalKey(Schema.NullOr(UnmarkFileAsViewedPayload))
444 })
445})
446export declare namespace SetFileViewed {
447 export type Variables = typeof SetFileViewed.variables.Type
448 export type Result = typeof SetFileViewed.result.Type
449}
450
451/** Autogenerated return type of MergePullRequest. */
452export const MergePullRequestPayload = Schema.Struct({
453 /** The pull request that was merged. */
454 pullRequest: Schema.NullOr(PullRequestActionSummary)
455})
456export interface MergePullRequestPayload extends Schema.Struct.Type<typeof MergePullRequestPayload.fields> {}
457
458/** `mutation MergePullRequest` */
459export const MergePullRequest = GraphQL.mutation("MergePullRequest", {
460 document: {
461 variables: [
462 { name: "input", body: "MergePullRequestInput!" }
463 ],
464 selections: [
465 { name: "mergePullRequest", body: ["(input:$", "input", "){pullRequest{...PullRequestActionSummary}}"] }
466 ],
467 fragments: [
468 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
469 ]
470 },
471 variables: {
472 input: Shared.MergePullRequestInput
473 },
474 result: Schema.Struct({
475 /**
476 * Merge a pull request.
477 *
478 * > [!NOTE]
479 * > We recommend using the [asynchronous merge REST
480 * API](${externalDocsUrl}/rest/pulls/pulls#merge-a-pull-request-asynchronously) instead.
481 * > This mutation does not support stacked pull requests.
482 */
483 mergePullRequest: Schema.NullOr(MergePullRequestPayload)
484 })
485})
486export declare namespace MergePullRequest {
487 export type Variables = typeof MergePullRequest.variables.Type
488 export type Result = typeof MergePullRequest.result.Type
489}
490
491/** Autogenerated return type of EnablePullRequestAutoMerge. */
492export const EnablePullRequestAutoMergePayload = Schema.Struct({
493 /** The pull request auto-merge was enabled on. */
494 pullRequest: Schema.NullOr(PullRequestActionSummary)
495})
496export interface EnablePullRequestAutoMergePayload extends Schema.Struct.Type<typeof EnablePullRequestAutoMergePayload.fields> {}
497
498/** `mutation EnablePullRequestAutoMerge` */
499export const EnablePullRequestAutoMerge = GraphQL.mutation("EnablePullRequestAutoMerge", {
500 document: {
501 variables: [
502 { name: "input", body: "EnablePullRequestAutoMergeInput!" }
503 ],
504 selections: [
505 { name: "enablePullRequestAutoMerge", body: ["(input:$", "input", "){pullRequest{...PullRequestActionSummary}}"] }
506 ],
507 fragments: [
508 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
509 ]
510 },
511 variables: {
512 input: Shared.EnablePullRequestAutoMergeInput
513 },
514 result: Schema.Struct({
515 /** Enable the default auto-merge on a pull request. */
516 enablePullRequestAutoMerge: Schema.NullOr(EnablePullRequestAutoMergePayload)
517 })
518})
519export declare namespace EnablePullRequestAutoMerge {
520 export type Variables = typeof EnablePullRequestAutoMerge.variables.Type
521 export type Result = typeof EnablePullRequestAutoMerge.result.Type
522}
523
524/** Autogenerated return type of DisablePullRequestAutoMerge. */
525export const DisablePullRequestAutoMergePayload = Schema.Struct({
526 /** The pull request auto merge was disabled on. */
527 pullRequest: Schema.NullOr(PullRequestActionSummary)
528})
529export interface DisablePullRequestAutoMergePayload extends Schema.Struct.Type<typeof DisablePullRequestAutoMergePayload.fields> {}
530
531/** `mutation DisablePullRequestAutoMerge` */
532export const DisablePullRequestAutoMerge = GraphQL.mutation("DisablePullRequestAutoMerge", {
533 document: {
534 variables: [
535 { name: "pullRequestId", body: "ID!" }
536 ],
537 selections: [
538 { name: "disablePullRequestAutoMerge", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
539 ],
540 fragments: [
541 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
542 ]
543 },
544 variables: {
545 pullRequestId: Shared.ID
546 },
547 result: Schema.Struct({
548 /** Disable auto merge on the given pull request */
549 disablePullRequestAutoMerge: Schema.NullOr(DisablePullRequestAutoMergePayload)
550 })
551})
552export declare namespace DisablePullRequestAutoMerge {
553 export type Variables = typeof DisablePullRequestAutoMerge.variables.Type
554 export type Result = typeof DisablePullRequestAutoMerge.result.Type
555}
556
557/** `mutation DisableStackAutoMerge` */
558export const DisableStackAutoMerge = GraphQL.mutation("DisableStackAutoMerge", {
559 document: {
560 variables: [
561 { name: "pullRequestId", body: "ID!" }
562 ],
563 selections: [
564 { name: "disablePullRequestAutoMerge", body: ["(input:{pullRequestId:$", "pullRequestId", " includeStack:true}){pullRequest{...PullRequestActionSummary}}"] }
565 ],
566 fragments: [
567 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
568 ]
569 },
570 variables: {
571 pullRequestId: Shared.ID
572 },
573 result: Schema.Struct({
574 /** Disable auto merge on the given pull request */
575 disablePullRequestAutoMerge: Schema.NullOr(DisablePullRequestAutoMergePayload)
576 })
577})
578export declare namespace DisableStackAutoMerge {
579 export type Variables = typeof DisableStackAutoMerge.variables.Type
580 export type Result = typeof DisableStackAutoMerge.result.Type
581}
582
583/** Autogenerated return type of UpdatePullRequestBranch. */
584export const UpdatePullRequestBranchPayload = Schema.Struct({
585 /** The updated pull request. */
586 pullRequest: Schema.NullOr(PullRequestActionSummary)
587})
588export interface UpdatePullRequestBranchPayload extends Schema.Struct.Type<typeof UpdatePullRequestBranchPayload.fields> {}
589
590/** `mutation UpdatePullRequestBranch` */
591export const UpdatePullRequestBranch = GraphQL.mutation("UpdatePullRequestBranch", {
592 document: {
593 variables: [
594 { name: "pullRequestId", body: "ID!" },
595 { name: "expectedHeadOid", body: "GitObjectID!" },
596 { name: "updateMethod", body: "PullRequestBranchUpdateMethod!" }
597 ],
598 selections: [
599 { name: "updatePullRequestBranch", body: ["(input:{pullRequestId:$", "pullRequestId", " expectedHeadOid:$", "expectedHeadOid", " updateMethod:$", "updateMethod", "}){pullRequest{...PullRequestActionSummary}}"] }
600 ],
601 fragments: [
602 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
603 ]
604 },
605 variables: {
606 pullRequestId: Shared.ID,
607 expectedHeadOid: Shared.GitObjectID,
608 updateMethod: Shared.PullRequestBranchUpdateMethod
609 },
610 result: Schema.Struct({
611 /** Merge or Rebase HEAD from upstream branch into pull request branch */
612 updatePullRequestBranch: Schema.NullOr(UpdatePullRequestBranchPayload)
613 })
614})
615export declare namespace UpdatePullRequestBranch {
616 export type Variables = typeof UpdatePullRequestBranch.variables.Type
617 export type Result = typeof UpdatePullRequestBranch.result.Type
618}
619
620/** Autogenerated return type of MarkPullRequestReadyForReview. */
621export const MarkPullRequestReadyForReviewPayload = Schema.Struct({
622 /** The pull request that is ready for review. */
623 pullRequest: Schema.NullOr(PullRequestActionSummary)
624})
625export interface MarkPullRequestReadyForReviewPayload extends Schema.Struct.Type<typeof MarkPullRequestReadyForReviewPayload.fields> {}
626
627/** `mutation MarkPullRequestReadyForReview` */
628export const MarkPullRequestReadyForReview = GraphQL.mutation("MarkPullRequestReadyForReview", {
629 document: {
630 variables: [
631 { name: "pullRequestId", body: "ID!" }
632 ],
633 selections: [
634 { name: "markPullRequestReadyForReview", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
635 ],
636 fragments: [
637 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
638 ]
639 },
640 variables: {
641 pullRequestId: Shared.ID
642 },
643 result: Schema.Struct({
644 /** Marks a pull request ready for review. */
645 markPullRequestReadyForReview: Schema.NullOr(MarkPullRequestReadyForReviewPayload)
646 })
647})
648export declare namespace MarkPullRequestReadyForReview {
649 export type Variables = typeof MarkPullRequestReadyForReview.variables.Type
650 export type Result = typeof MarkPullRequestReadyForReview.result.Type
651}
652
653/** Autogenerated return type of ConvertPullRequestToDraft. */
654export const ConvertPullRequestToDraftPayload = Schema.Struct({
655 /** The pull request that is now a draft. */
656 pullRequest: Schema.NullOr(PullRequestActionSummary)
657})
658export interface ConvertPullRequestToDraftPayload extends Schema.Struct.Type<typeof ConvertPullRequestToDraftPayload.fields> {}
659
660/** `mutation ConvertPullRequestToDraft` */
661export const ConvertPullRequestToDraft = GraphQL.mutation("ConvertPullRequestToDraft", {
662 document: {
663 variables: [
664 { name: "pullRequestId", body: "ID!" }
665 ],
666 selections: [
667 { name: "convertPullRequestToDraft", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
668 ],
669 fragments: [
670 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
671 ]
672 },
673 variables: {
674 pullRequestId: Shared.ID
675 },
676 result: Schema.Struct({
677 /** Converts a pull request to draft */
678 convertPullRequestToDraft: Schema.NullOr(ConvertPullRequestToDraftPayload)
679 })
680})
681export declare namespace ConvertPullRequestToDraft {
682 export type Variables = typeof ConvertPullRequestToDraft.variables.Type
683 export type Result = typeof ConvertPullRequestToDraft.result.Type
684}
685
686/** Autogenerated return type of ClosePullRequest. */
687export const ClosePullRequestPayload = Schema.Struct({
688 /** The pull request that was closed. */
689 pullRequest: Schema.NullOr(PullRequestActionSummary)
690})
691export interface ClosePullRequestPayload extends Schema.Struct.Type<typeof ClosePullRequestPayload.fields> {}
692
693/** `mutation ClosePullRequest` */
694export const ClosePullRequest = GraphQL.mutation("ClosePullRequest", {
695 document: {
696 variables: [
697 { name: "pullRequestId", body: "ID!" }
698 ],
699 selections: [
700 { name: "closePullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
701 ],
702 fragments: [
703 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
704 ]
705 },
706 variables: {
707 pullRequestId: Shared.ID
708 },
709 result: Schema.Struct({
710 /** Close a pull request. */
711 closePullRequest: Schema.NullOr(ClosePullRequestPayload)
712 })
713})
714export declare namespace ClosePullRequest {
715 export type Variables = typeof ClosePullRequest.variables.Type
716 export type Result = typeof ClosePullRequest.result.Type
717}
718
719/** Autogenerated return type of ReopenPullRequest. */
720export const ReopenPullRequestPayload = Schema.Struct({
721 /** The pull request that was reopened. */
722 pullRequest: Schema.NullOr(PullRequestActionSummary)
723})
724export interface ReopenPullRequestPayload extends Schema.Struct.Type<typeof ReopenPullRequestPayload.fields> {}
725
726/** `mutation ReopenPullRequest` */
727export const ReopenPullRequest = GraphQL.mutation("ReopenPullRequest", {
728 document: {
729 variables: [
730 { name: "pullRequestId", body: "ID!" }
731 ],
732 selections: [
733 { name: "reopenPullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
734 ],
735 fragments: [
736 { name: "PullRequestActionSummary", body: ["on PullRequest{number title url headRefName baseRefName state isDraft updatedAt mergedAt closedAt headRefOid author{__typename login avatarUrl...on User{name}}autoMergeRequest{mergeMethod}}"] }
737 ]
738 },
739 variables: {
740 pullRequestId: Shared.ID
741 },
742 result: Schema.Struct({
743 /** Reopen a pull request. */
744 reopenPullRequest: Schema.NullOr(ReopenPullRequestPayload)
745 })
746})
747export declare namespace ReopenPullRequest {
748 export type Variables = typeof ReopenPullRequest.variables.Type
749 export type Result = typeof ReopenPullRequest.result.Type
750}
751
752/** Autogenerated return type of AddComment. */
753export const AddCommentPayload = Schema.Struct({
754 /** A unique identifier for the client performing the mutation. */
755 clientMutationId: Schema.NullOr(Schema.String)
756})
757export interface AddCommentPayload extends Schema.Struct.Type<typeof AddCommentPayload.fields> {}
758
759/** `mutation AddComment` */
760export const AddComment = GraphQL.mutation("AddComment", {
761 document: {
762 variables: [
763 { name: "subjectId", body: "ID!" },
764 { name: "body", body: "String!" }
765 ],
766 selections: [
767 { name: "addComment", body: ["(input:{subjectId:$", "subjectId", " body:$", "body", "}){clientMutationId}"] }
768 ],
769 fragments: []
770 },
771 variables: {
772 subjectId: Shared.ID,
773 body: Schema.String
774 },
775 result: Schema.Struct({
776 /** Adds a comment to an Issue or Pull Request. */
777 addComment: Schema.NullOr(AddCommentPayload)
778 })
779})
780export declare namespace AddComment {
781 export type Variables = typeof AddComment.variables.Type
782 export type Result = typeof AddComment.result.Type
783}
784
785/** Autogenerated return type of UpdateRefs. */
786export const UpdateRefsPayload = Schema.Struct({
787 /** A unique identifier for the client performing the mutation. */
788 clientMutationId: Schema.NullOr(Schema.String)
789})
790export interface UpdateRefsPayload extends Schema.Struct.Type<typeof UpdateRefsPayload.fields> {}
791
792/** `mutation DeletePullRequestBranch` */
793export const DeletePullRequestBranch = GraphQL.mutation("DeletePullRequestBranch", {
794 document: {
795 variables: [
796 { name: "input", body: "UpdateRefsInput!" }
797 ],
798 selections: [
799 { name: "updateRefs", body: ["(input:$", "input", "){clientMutationId}"] }
800 ],
801 fragments: []
802 },
803 variables: {
804 input: Shared.UpdateRefsInput
805 },
806 result: Schema.Struct({
807 /**
808 * Creates, updates and/or deletes multiple refs in a repository.
809 *
810 * This mutation takes a list of `RefUpdate`s and performs these updates
811 * on the repository. All updates are performed atomically, meaning that
812 * if one of them is rejected, no other ref will be modified.
813 *
814 * `RefUpdate.beforeOid` specifies that the given reference needs to point
815 * to the given value before performing any updates. A value of
816 * `0000000000000000000000000000000000000000` can be used to verify that
817 * the references should not exist.
818 *
819 * `RefUpdate.afterOid` specifies the value that the given reference
820 * will point to after performing all updates. A value of
821 * `0000000000000000000000000000000000000000` can be used to delete a
822 * reference.
823 *
824 * If `RefUpdate.force` is set to `true`, a non-fast-forward updates
825 * for the given reference will be allowed.
826 */
827 updateRefs: Schema.NullOr(UpdateRefsPayload)
828 })
829})
830export declare namespace DeletePullRequestBranch {
831 export type Variables = typeof DeletePullRequestBranch.variables.Type
832 export type Result = typeof DeletePullRequestBranch.result.Type
833}
834
835/** Every operation in pullRequestMutations.graphql. */
836export const PullRequestMutationsGraphQLGroup = GraphQLGroup.make(AddReviewThreadReply, AddReaction, RemoveReaction, ResolveReviewThread, UnresolveReviewThread, UpdatePullRequest, RevertPullRequest, UpdateIssueComment, UpdateReviewComment, SetFileViewed, MergePullRequest, EnablePullRequestAutoMerge, DisablePullRequestAutoMerge, DisableStackAutoMerge, UpdatePullRequestBranch, MarkPullRequestReadyForReview, ConvertPullRequestToDraft, ClosePullRequest, ReopenPullRequest, AddComment, DeletePullRequestBranch)