sailfork / t3code-github / packages/ source-control-github/ src/ server/ pullRequestMutations.graphql.ts

// Generated by @effect/graphql-generator from pullRequestMutations.graphql. Do not edit.
import { GraphQL, GraphQLGroup } from "effect/graphql"
import * as Schema from "effect/Schema"
import * as Shared from "../../schema/github.graphql.ts"

/** A user is an individual's account on GitHub that owns repositories and can make new content. */
export const User = Schema.Struct({
  __typename: Schema.Literal("User"),
  /** The username used to login. */
  login: Schema.String,
  /** A URL pointing to the user's public avatar. */
  avatarUrl: Shared.URI,
  /** The user's public profile name. */
  name: Schema.NullOr(Schema.String)
})
export interface User extends Schema.Struct.Type<typeof User.fields> {}

/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
export const ActorOther = Schema.Struct({
  __typename: GraphQL.otherTypename<Shared.Typename.Actor>()(["User"]),
  /** The username of the actor. */
  login: Schema.String,
  /** A URL pointing to the actor's public avatar. */
  avatarUrl: Shared.URI
})
export interface ActorOther extends Schema.Struct.Type<typeof ActorOther.fields> {}

/** Represents an auto-merge request for a pull request */
export const AutoMergeRequest = Schema.Struct({
  /**
   * The merge method of the auto-merge request. If a merge queue is required by
   * the base branch, this value will be set by the merge queue when merging.
   */
  mergeMethod: GraphQL.enumLiterals(Shared.PullRequestMergeMethod.literals)
})
export interface AutoMergeRequest extends Schema.Struct.Type<typeof AutoMergeRequest.fields> {}

/**
 * `fragment PullRequestActionSummary on PullRequest`
 *
 * A repository pull request.
 */
export const PullRequestActionSummary = Schema.Struct({
  /** Identifies the pull request number. */
  number: Shared.Int,
  /** Identifies the pull request title. */
  title: Schema.String,
  /** The HTTP URL for this pull request. */
  url: Shared.URI,
  /** Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. */
  headRefName: Schema.String,
  /** Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. */
  baseRefName: Schema.String,
  /** Identifies the state of the pull request. */
  state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
  /** Identifies if the pull request is a draft. */
  isDraft: Schema.Boolean,
  /** Identifies the date and time when the object was last updated. */
  updatedAt: Shared.DateTime,
  /** The date and time that the pull request was merged. */
  mergedAt: Schema.NullOr(Shared.DateTime),
  /** Identifies the date and time when the object was closed. */
  closedAt: Schema.NullOr(Shared.DateTime),
  /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
  headRefOid: Shared.GitObjectID,
  /** The actor who authored the comment. */
  author: Schema.NullOr(Schema.Union([
    User,
    ActorOther
  ])),
  /** Returns the auto-merge request object if one exists for this pull request. */
  autoMergeRequest: Schema.NullOr(AutoMergeRequest)
})
export interface PullRequestActionSummary extends Schema.Struct.Type<typeof PullRequestActionSummary.fields> {}

/** A review comment associated with a given repository pull request. */
export const PullRequestReviewComment = Schema.Struct({
  /** The Node ID of the PullRequestReviewComment object */
  id: Shared.ID
})
export interface PullRequestReviewComment extends Schema.Struct.Type<typeof PullRequestReviewComment.fields> {}

/** Autogenerated return type of AddPullRequestReviewThreadReply. */
export const AddPullRequestReviewThreadReplyPayload = Schema.Struct({
  /** The newly created reply. */
  comment: Schema.NullOr(PullRequestReviewComment)
})
export interface AddPullRequestReviewThreadReplyPayload extends Schema.Struct.Type<typeof AddPullRequestReviewThreadReplyPayload.fields> {}

/** `mutation AddReviewThreadReply` */
export const AddReviewThreadReply = GraphQL.mutation("AddReviewThreadReply", {
  document: {
    variables: [
      { name: "threadId", body: "ID!" },
      { name: "body", body: "String!" }
    ],
    selections: [
      { name: "addPullRequestReviewThreadReply", body: ["(input:{pullRequestReviewThreadId:$", "threadId", " body:$", "body", "}){comment{id}}"] }
    ],
    fragments: []
  },
  variables: {
    threadId: Shared.ID,
    body: Schema.String
  },
  result: Schema.Struct({
    /** Adds a reply to an existing Pull Request Review Thread. */
    addPullRequestReviewThreadReply: Schema.NullOr(AddPullRequestReviewThreadReplyPayload)
  })
})
export declare namespace AddReviewThreadReply {
  export type Variables = typeof AddReviewThreadReply.variables.Type
  export type Result = typeof AddReviewThreadReply.result.Type
}

/** An emoji reaction to a particular piece of content. */
export const Reaction = Schema.Struct({
  /** Identifies the emoji reaction. */
  content: GraphQL.enumLiterals(Shared.ReactionContent.literals)
})
export interface Reaction extends Schema.Struct.Type<typeof Reaction.fields> {}

/** Autogenerated return type of AddReaction. */
export const AddReactionPayload = Schema.Struct({
  /** The reaction object. */
  reaction: Schema.NullOr(Reaction)
})
export interface AddReactionPayload extends Schema.Struct.Type<typeof AddReactionPayload.fields> {}

/** `mutation AddReaction` */
export const AddReaction = GraphQL.mutation("AddReaction", {
  document: {
    variables: [
      { name: "subjectId", body: "ID!" },
      { name: "content", body: "ReactionContent!" }
    ],
    selections: [
      { name: "addReaction", body: ["(input:{subjectId:$", "subjectId", " content:$", "content", "}){reaction{content}}"] }
    ],
    fragments: []
  },
  variables: {
    subjectId: Shared.ID,
    content: Shared.ReactionContent
  },
  result: Schema.Struct({
    /** Adds a reaction to a subject. */
    addReaction: Schema.NullOr(AddReactionPayload)
  })
})
export declare namespace AddReaction {
  export type Variables = typeof AddReaction.variables.Type
  export type Result = typeof AddReaction.result.Type
}

/** Autogenerated return type of RemoveReaction. */
export const RemoveReactionPayload = Schema.Struct({
  /** The reaction object. */
  reaction: Schema.NullOr(Reaction)
})
export interface RemoveReactionPayload extends Schema.Struct.Type<typeof RemoveReactionPayload.fields> {}

/** `mutation RemoveReaction` */
export const RemoveReaction = GraphQL.mutation("RemoveReaction", {
  document: {
    variables: [
      { name: "subjectId", body: "ID!" },
      { name: "content", body: "ReactionContent!" }
    ],
    selections: [
      { name: "removeReaction", body: ["(input:{subjectId:$", "subjectId", " content:$", "content", "}){reaction{content}}"] }
    ],
    fragments: []
  },
  variables: {
    subjectId: Shared.ID,
    content: Shared.ReactionContent
  },
  result: Schema.Struct({
    /** Removes a reaction from a subject. */
    removeReaction: Schema.NullOr(RemoveReactionPayload)
  })
})
export declare namespace RemoveReaction {
  export type Variables = typeof RemoveReaction.variables.Type
  export type Result = typeof RemoveReaction.result.Type
}

/** A threaded list of comments for a given pull request. */
export const PullRequestReviewThread = Schema.Struct({
  /** Whether this thread has been resolved */
  isResolved: Schema.Boolean
})
export interface PullRequestReviewThread extends Schema.Struct.Type<typeof PullRequestReviewThread.fields> {}

/** Autogenerated return type of ResolveReviewThread. */
export const ResolveReviewThreadPayload = Schema.Struct({
  /** The thread to resolve. */
  thread: Schema.NullOr(PullRequestReviewThread)
})
export interface ResolveReviewThreadPayload extends Schema.Struct.Type<typeof ResolveReviewThreadPayload.fields> {}

/** `mutation ResolveReviewThread` */
export const ResolveReviewThread = GraphQL.mutation("ResolveReviewThread", {
  document: {
    variables: [
      { name: "threadId", body: "ID!" }
    ],
    selections: [
      { name: "resolveReviewThread", body: ["(input:{threadId:$", "threadId", "}){thread{isResolved}}"] }
    ],
    fragments: []
  },
  variables: {
    threadId: Shared.ID
  },
  result: Schema.Struct({
    /** Marks a review thread as resolved. */
    resolveReviewThread: Schema.NullOr(ResolveReviewThreadPayload)
  })
})
export declare namespace ResolveReviewThread {
  export type Variables = typeof ResolveReviewThread.variables.Type
  export type Result = typeof ResolveReviewThread.result.Type
}

/** Autogenerated return type of UnresolveReviewThread. */
export const UnresolveReviewThreadPayload = Schema.Struct({
  /** The thread to resolve. */
  thread: Schema.NullOr(PullRequestReviewThread)
})
export interface UnresolveReviewThreadPayload extends Schema.Struct.Type<typeof UnresolveReviewThreadPayload.fields> {}

/** `mutation UnresolveReviewThread` */
export const UnresolveReviewThread = GraphQL.mutation("UnresolveReviewThread", {
  document: {
    variables: [
      { name: "threadId", body: "ID!" }
    ],
    selections: [
      { name: "unresolveReviewThread", body: ["(input:{threadId:$", "threadId", "}){thread{isResolved}}"] }
    ],
    fragments: []
  },
  variables: {
    threadId: Shared.ID
  },
  result: Schema.Struct({
    /** Marks a review thread as unresolved. */
    unresolveReviewThread: Schema.NullOr(UnresolveReviewThreadPayload)
  })
})
export declare namespace UnresolveReviewThread {
  export type Variables = typeof UnresolveReviewThread.variables.Type
  export type Result = typeof UnresolveReviewThread.result.Type
}

/** A repository pull request. */
export const PullRequest = Schema.Struct({
  /** The Node ID of the PullRequest object */
  id: Shared.ID
})
export interface PullRequest extends Schema.Struct.Type<typeof PullRequest.fields> {}

/** Autogenerated return type of UpdatePullRequest. */
export const UpdatePullRequestPayload = Schema.Struct({
  /** The updated pull request. */
  pullRequest: Schema.NullOr(PullRequest)
})
export interface UpdatePullRequestPayload extends Schema.Struct.Type<typeof UpdatePullRequestPayload.fields> {}

/** `mutation UpdatePullRequest` */
export const UpdatePullRequest = GraphQL.mutation("UpdatePullRequest", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" },
      { name: "title", body: "String" },
      { name: "body", body: "String" },
      { name: "maintainerCanModify", body: "Boolean" }
    ],
    selections: [
      { name: "updatePullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", " title:$", "title", " body:$", "body", " maintainerCanModify:$", "maintainerCanModify", "}){pullRequest{id}}"] }
    ],
    fragments: []
  },
  variables: {
    pullRequestId: Shared.ID,
    title: Schema.optional(Schema.NullOr(Schema.String)),
    body: Schema.optional(Schema.NullOr(Schema.String)),
    maintainerCanModify: Schema.optional(Schema.NullOr(Schema.Boolean))
  },
  result: Schema.Struct({
    /** Update a pull request */
    updatePullRequest: Schema.NullOr(UpdatePullRequestPayload)
  })
})
export declare namespace UpdatePullRequest {
  export type Variables = typeof UpdatePullRequest.variables.Type
  export type Result = typeof UpdatePullRequest.result.Type
}

/** Autogenerated return type of RevertPullRequest. */
export const RevertPullRequestPayload = Schema.Struct({
  /** The new pull request that reverts the input pull request. */
  revertPullRequest: Schema.NullOr(PullRequest)
})
export interface RevertPullRequestPayload extends Schema.Struct.Type<typeof RevertPullRequestPayload.fields> {}

/** `mutation RevertPullRequest` */
export const RevertPullRequest = GraphQL.mutation("RevertPullRequest", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" }
    ],
    selections: [
      { name: "revertPullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", "}){revertPullRequest{id}}"] }
    ],
    fragments: []
  },
  variables: {
    pullRequestId: Shared.ID
  },
  result: Schema.Struct({
    /** Create a pull request that reverts the changes from a merged pull request. */
    revertPullRequest: Schema.NullOr(RevertPullRequestPayload)
  })
})
export declare namespace RevertPullRequest {
  export type Variables = typeof RevertPullRequest.variables.Type
  export type Result = typeof RevertPullRequest.result.Type
}

/** Represents a comment on an Issue. */
export const IssueComment = Schema.Struct({
  /** The Node ID of the IssueComment object */
  id: Shared.ID
})
export interface IssueComment extends Schema.Struct.Type<typeof IssueComment.fields> {}

/** Autogenerated return type of UpdateIssueComment. */
export const UpdateIssueCommentPayload = Schema.Struct({
  /** The updated comment. */
  issueComment: Schema.NullOr(IssueComment)
})
export interface UpdateIssueCommentPayload extends Schema.Struct.Type<typeof UpdateIssueCommentPayload.fields> {}

/** `mutation UpdateIssueComment` */
export const UpdateIssueComment = GraphQL.mutation("UpdateIssueComment", {
  document: {
    variables: [
      { name: "commentId", body: "ID!" },
      { name: "body", body: "String!" }
    ],
    selections: [
      { name: "updateIssueComment", body: ["(input:{id:$", "commentId", " body:$", "body", "}){issueComment{id}}"] }
    ],
    fragments: []
  },
  variables: {
    commentId: Shared.ID,
    body: Schema.String
  },
  result: Schema.Struct({
    /** Updates an IssueComment object. */
    updateIssueComment: Schema.NullOr(UpdateIssueCommentPayload)
  })
})
export declare namespace UpdateIssueComment {
  export type Variables = typeof UpdateIssueComment.variables.Type
  export type Result = typeof UpdateIssueComment.result.Type
}

/** Autogenerated return type of UpdatePullRequestReviewComment. */
export const UpdatePullRequestReviewCommentPayload = Schema.Struct({
  /** The updated comment. */
  pullRequestReviewComment: Schema.NullOr(PullRequestReviewComment)
})
export interface UpdatePullRequestReviewCommentPayload extends Schema.Struct.Type<typeof UpdatePullRequestReviewCommentPayload.fields> {}

/** `mutation UpdateReviewComment` */
export const UpdateReviewComment = GraphQL.mutation("UpdateReviewComment", {
  document: {
    variables: [
      { name: "commentId", body: "ID!" },
      { name: "body", body: "String!" }
    ],
    selections: [
      { name: "updatePullRequestReviewComment", body: ["(input:{pullRequestReviewCommentId:$", "commentId", " body:$", "body", "}){pullRequestReviewComment{id}}"] }
    ],
    fragments: []
  },
  variables: {
    commentId: Shared.ID,
    body: Schema.String
  },
  result: Schema.Struct({
    /** Updates a pull request review comment. */
    updatePullRequestReviewComment: Schema.NullOr(UpdatePullRequestReviewCommentPayload)
  })
})
export declare namespace UpdateReviewComment {
  export type Variables = typeof UpdateReviewComment.variables.Type
  export type Result = typeof UpdateReviewComment.result.Type
}

/** Autogenerated return type of MarkFileAsViewed. */
export const MarkFileAsViewedPayload = Schema.Struct({
  /** A unique identifier for the client performing the mutation. */
  clientMutationId: Schema.NullOr(Schema.String)
})
export interface MarkFileAsViewedPayload extends Schema.Struct.Type<typeof MarkFileAsViewedPayload.fields> {}

/** Autogenerated return type of UnmarkFileAsViewed. */
export const UnmarkFileAsViewedPayload = Schema.Struct({
  /** A unique identifier for the client performing the mutation. */
  clientMutationId: Schema.NullOr(Schema.String)
})
export interface UnmarkFileAsViewedPayload extends Schema.Struct.Type<typeof UnmarkFileAsViewedPayload.fields> {}

/** `mutation SetFileViewed` */
export const SetFileViewed = GraphQL.mutation("SetFileViewed", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" },
      { name: "path", body: "String!" },
      { name: "viewed", body: "Boolean!" }
    ],
    selections: [
      { name: "markFileAsViewed", body: ["(input:{pullRequestId:$", "pullRequestId", " path:$", "path", "})@include(if:$", "viewed", "){clientMutationId}"] },
      { name: "unmarkFileAsViewed", body: ["(input:{pullRequestId:$", "pullRequestId", " path:$", "path", "})@skip(if:$", "viewed", "){clientMutationId}"] }
    ],
    fragments: []
  },
  variables: {
    pullRequestId: Shared.ID,
    path: Schema.String,
    viewed: Schema.Boolean
  },
  result: Schema.Struct({
    /** Mark a pull request file as viewed */
    markFileAsViewed: Schema.optionalKey(Schema.NullOr(MarkFileAsViewedPayload)),
    /** Unmark a pull request file as viewed */
    unmarkFileAsViewed: Schema.optionalKey(Schema.NullOr(UnmarkFileAsViewedPayload))
  })
})
export declare namespace SetFileViewed {
  export type Variables = typeof SetFileViewed.variables.Type
  export type Result = typeof SetFileViewed.result.Type
}

/** Autogenerated return type of MergePullRequest. */
export const MergePullRequestPayload = Schema.Struct({
  /** The pull request that was merged. */
  pullRequest: Schema.NullOr(PullRequestActionSummary)
})
export interface MergePullRequestPayload extends Schema.Struct.Type<typeof MergePullRequestPayload.fields> {}

/** `mutation MergePullRequest` */
export const MergePullRequest = GraphQL.mutation("MergePullRequest", {
  document: {
    variables: [
      { name: "input", body: "MergePullRequestInput!" }
    ],
    selections: [
      { name: "mergePullRequest", body: ["(input:$", "input", "){pullRequest{...PullRequestActionSummary}}"] }
    ],
    fragments: [
      { 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}}"] }
    ]
  },
  variables: {
    input: Shared.MergePullRequestInput
  },
  result: Schema.Struct({
    /**
     * Merge a pull request.
     *
     * > [!NOTE]
     * > We recommend using the [asynchronous merge REST
     * API](${externalDocsUrl}/rest/pulls/pulls#merge-a-pull-request-asynchronously) instead.
     * > This mutation does not support stacked pull requests.
     */
    mergePullRequest: Schema.NullOr(MergePullRequestPayload)
  })
})
export declare namespace MergePullRequest {
  export type Variables = typeof MergePullRequest.variables.Type
  export type Result = typeof MergePullRequest.result.Type
}

/** Autogenerated return type of EnablePullRequestAutoMerge. */
export const EnablePullRequestAutoMergePayload = Schema.Struct({
  /** The pull request auto-merge was enabled on. */
  pullRequest: Schema.NullOr(PullRequestActionSummary)
})
export interface EnablePullRequestAutoMergePayload extends Schema.Struct.Type<typeof EnablePullRequestAutoMergePayload.fields> {}

/** `mutation EnablePullRequestAutoMerge` */
export const EnablePullRequestAutoMerge = GraphQL.mutation("EnablePullRequestAutoMerge", {
  document: {
    variables: [
      { name: "input", body: "EnablePullRequestAutoMergeInput!" }
    ],
    selections: [
      { name: "enablePullRequestAutoMerge", body: ["(input:$", "input", "){pullRequest{...PullRequestActionSummary}}"] }
    ],
    fragments: [
      { 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}}"] }
    ]
  },
  variables: {
    input: Shared.EnablePullRequestAutoMergeInput
  },
  result: Schema.Struct({
    /** Enable the default auto-merge on a pull request. */
    enablePullRequestAutoMerge: Schema.NullOr(EnablePullRequestAutoMergePayload)
  })
})
export declare namespace EnablePullRequestAutoMerge {
  export type Variables = typeof EnablePullRequestAutoMerge.variables.Type
  export type Result = typeof EnablePullRequestAutoMerge.result.Type
}

/** Autogenerated return type of DisablePullRequestAutoMerge. */
export const DisablePullRequestAutoMergePayload = Schema.Struct({
  /** The pull request auto merge was disabled on. */
  pullRequest: Schema.NullOr(PullRequestActionSummary)
})
export interface DisablePullRequestAutoMergePayload extends Schema.Struct.Type<typeof DisablePullRequestAutoMergePayload.fields> {}

/** `mutation DisablePullRequestAutoMerge` */
export const DisablePullRequestAutoMerge = GraphQL.mutation("DisablePullRequestAutoMerge", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" }
    ],
    selections: [
      { name: "disablePullRequestAutoMerge", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
    ],
    fragments: [
      { 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}}"] }
    ]
  },
  variables: {
    pullRequestId: Shared.ID
  },
  result: Schema.Struct({
    /** Disable auto merge on the given pull request */
    disablePullRequestAutoMerge: Schema.NullOr(DisablePullRequestAutoMergePayload)
  })
})
export declare namespace DisablePullRequestAutoMerge {
  export type Variables = typeof DisablePullRequestAutoMerge.variables.Type
  export type Result = typeof DisablePullRequestAutoMerge.result.Type
}

/** Autogenerated return type of UpdatePullRequestBranch. */
export const UpdatePullRequestBranchPayload = Schema.Struct({
  /** The updated pull request. */
  pullRequest: Schema.NullOr(PullRequestActionSummary)
})
export interface UpdatePullRequestBranchPayload extends Schema.Struct.Type<typeof UpdatePullRequestBranchPayload.fields> {}

/** `mutation UpdatePullRequestBranch` */
export const UpdatePullRequestBranch = GraphQL.mutation("UpdatePullRequestBranch", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" },
      { name: "expectedHeadOid", body: "GitObjectID!" },
      { name: "updateMethod", body: "PullRequestBranchUpdateMethod!" }
    ],
    selections: [
      { name: "updatePullRequestBranch", body: ["(input:{pullRequestId:$", "pullRequestId", " expectedHeadOid:$", "expectedHeadOid", " updateMethod:$", "updateMethod", "}){pullRequest{...PullRequestActionSummary}}"] }
    ],
    fragments: [
      { 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}}"] }
    ]
  },
  variables: {
    pullRequestId: Shared.ID,
    expectedHeadOid: Shared.GitObjectID,
    updateMethod: Shared.PullRequestBranchUpdateMethod
  },
  result: Schema.Struct({
    /** Merge or Rebase HEAD from upstream branch into pull request branch */
    updatePullRequestBranch: Schema.NullOr(UpdatePullRequestBranchPayload)
  })
})
export declare namespace UpdatePullRequestBranch {
  export type Variables = typeof UpdatePullRequestBranch.variables.Type
  export type Result = typeof UpdatePullRequestBranch.result.Type
}

/** Autogenerated return type of MarkPullRequestReadyForReview. */
export const MarkPullRequestReadyForReviewPayload = Schema.Struct({
  /** The pull request that is ready for review. */
  pullRequest: Schema.NullOr(PullRequestActionSummary)
})
export interface MarkPullRequestReadyForReviewPayload extends Schema.Struct.Type<typeof MarkPullRequestReadyForReviewPayload.fields> {}

/** `mutation MarkPullRequestReadyForReview` */
export const MarkPullRequestReadyForReview = GraphQL.mutation("MarkPullRequestReadyForReview", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" }
    ],
    selections: [
      { name: "markPullRequestReadyForReview", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
    ],
    fragments: [
      { 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}}"] }
    ]
  },
  variables: {
    pullRequestId: Shared.ID
  },
  result: Schema.Struct({
    /** Marks a pull request ready for review. */
    markPullRequestReadyForReview: Schema.NullOr(MarkPullRequestReadyForReviewPayload)
  })
})
export declare namespace MarkPullRequestReadyForReview {
  export type Variables = typeof MarkPullRequestReadyForReview.variables.Type
  export type Result = typeof MarkPullRequestReadyForReview.result.Type
}

/** Autogenerated return type of ConvertPullRequestToDraft. */
export const ConvertPullRequestToDraftPayload = Schema.Struct({
  /** The pull request that is now a draft. */
  pullRequest: Schema.NullOr(PullRequestActionSummary)
})
export interface ConvertPullRequestToDraftPayload extends Schema.Struct.Type<typeof ConvertPullRequestToDraftPayload.fields> {}

/** `mutation ConvertPullRequestToDraft` */
export const ConvertPullRequestToDraft = GraphQL.mutation("ConvertPullRequestToDraft", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" }
    ],
    selections: [
      { name: "convertPullRequestToDraft", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
    ],
    fragments: [
      { 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}}"] }
    ]
  },
  variables: {
    pullRequestId: Shared.ID
  },
  result: Schema.Struct({
    /** Converts a pull request to draft */
    convertPullRequestToDraft: Schema.NullOr(ConvertPullRequestToDraftPayload)
  })
})
export declare namespace ConvertPullRequestToDraft {
  export type Variables = typeof ConvertPullRequestToDraft.variables.Type
  export type Result = typeof ConvertPullRequestToDraft.result.Type
}

/** Autogenerated return type of ClosePullRequest. */
export const ClosePullRequestPayload = Schema.Struct({
  /** The pull request that was closed. */
  pullRequest: Schema.NullOr(PullRequestActionSummary)
})
export interface ClosePullRequestPayload extends Schema.Struct.Type<typeof ClosePullRequestPayload.fields> {}

/** `mutation ClosePullRequest` */
export const ClosePullRequest = GraphQL.mutation("ClosePullRequest", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" }
    ],
    selections: [
      { name: "closePullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
    ],
    fragments: [
      { 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}}"] }
    ]
  },
  variables: {
    pullRequestId: Shared.ID
  },
  result: Schema.Struct({
    /** Close a pull request. */
    closePullRequest: Schema.NullOr(ClosePullRequestPayload)
  })
})
export declare namespace ClosePullRequest {
  export type Variables = typeof ClosePullRequest.variables.Type
  export type Result = typeof ClosePullRequest.result.Type
}

/** Autogenerated return type of ReopenPullRequest. */
export const ReopenPullRequestPayload = Schema.Struct({
  /** The pull request that was reopened. */
  pullRequest: Schema.NullOr(PullRequestActionSummary)
})
export interface ReopenPullRequestPayload extends Schema.Struct.Type<typeof ReopenPullRequestPayload.fields> {}

/** `mutation ReopenPullRequest` */
export const ReopenPullRequest = GraphQL.mutation("ReopenPullRequest", {
  document: {
    variables: [
      { name: "pullRequestId", body: "ID!" }
    ],
    selections: [
      { name: "reopenPullRequest", body: ["(input:{pullRequestId:$", "pullRequestId", "}){pullRequest{...PullRequestActionSummary}}"] }
    ],
    fragments: [
      { 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}}"] }
    ]
  },
  variables: {
    pullRequestId: Shared.ID
  },
  result: Schema.Struct({
    /** Reopen a pull request. */
    reopenPullRequest: Schema.NullOr(ReopenPullRequestPayload)
  })
})
export declare namespace ReopenPullRequest {
  export type Variables = typeof ReopenPullRequest.variables.Type
  export type Result = typeof ReopenPullRequest.result.Type
}

/** Autogenerated return type of AddComment. */
export const AddCommentPayload = Schema.Struct({
  /** A unique identifier for the client performing the mutation. */
  clientMutationId: Schema.NullOr(Schema.String)
})
export interface AddCommentPayload extends Schema.Struct.Type<typeof AddCommentPayload.fields> {}

/** `mutation AddComment` */
export const AddComment = GraphQL.mutation("AddComment", {
  document: {
    variables: [
      { name: "subjectId", body: "ID!" },
      { name: "body", body: "String!" }
    ],
    selections: [
      { name: "addComment", body: ["(input:{subjectId:$", "subjectId", " body:$", "body", "}){clientMutationId}"] }
    ],
    fragments: []
  },
  variables: {
    subjectId: Shared.ID,
    body: Schema.String
  },
  result: Schema.Struct({
    /** Adds a comment to an Issue or Pull Request. */
    addComment: Schema.NullOr(AddCommentPayload)
  })
})
export declare namespace AddComment {
  export type Variables = typeof AddComment.variables.Type
  export type Result = typeof AddComment.result.Type
}

/** Autogenerated return type of UpdateRefs. */
export const UpdateRefsPayload = Schema.Struct({
  /** A unique identifier for the client performing the mutation. */
  clientMutationId: Schema.NullOr(Schema.String)
})
export interface UpdateRefsPayload extends Schema.Struct.Type<typeof UpdateRefsPayload.fields> {}

/** `mutation DeletePullRequestBranch` */
export const DeletePullRequestBranch = GraphQL.mutation("DeletePullRequestBranch", {
  document: {
    variables: [
      { name: "input", body: "UpdateRefsInput!" }
    ],
    selections: [
      { name: "updateRefs", body: ["(input:$", "input", "){clientMutationId}"] }
    ],
    fragments: []
  },
  variables: {
    input: Shared.UpdateRefsInput
  },
  result: Schema.Struct({
    /**
     * Creates, updates and/or deletes multiple refs in a repository.
     *
     * This mutation takes a list of `RefUpdate`s and performs these updates
     * on the repository. All updates are performed atomically, meaning that
     * if one of them is rejected, no other ref will be modified.
     *
     * `RefUpdate.beforeOid` specifies that the given reference needs to point
     * to the given value before performing any updates. A value of
     * `0000000000000000000000000000000000000000` can be used to verify that
     * the references should not exist.
     *
     * `RefUpdate.afterOid` specifies the value that the given reference
     * will point to after performing all updates. A value of
     * `0000000000000000000000000000000000000000` can be used to delete a
     * reference.
     *
     * If `RefUpdate.force` is set to `true`, a non-fast-forward updates
     * for the given reference will be allowed.
     */
    updateRefs: Schema.NullOr(UpdateRefsPayload)
  })
})
export declare namespace DeletePullRequestBranch {
  export type Variables = typeof DeletePullRequestBranch.variables.Type
  export type Result = typeof DeletePullRequestBranch.result.Type
}

/** Every operation in pullRequestMutations.graphql. */
export const PullRequestMutationsGraphQLGroup = GraphQLGroup.make(AddReviewThreadReply, AddReaction, RemoveReaction, ResolveReviewThread, UnresolveReviewThread, UpdatePullRequest, RevertPullRequest, UpdateIssueComment, UpdateReviewComment, SetFileViewed, MergePullRequest, EnablePullRequestAutoMerge, DisablePullRequestAutoMerge, UpdatePullRequestBranch, MarkPullRequestReadyForReview, ConvertPullRequestToDraft, ClosePullRequest, ReopenPullRequest, AddComment, DeletePullRequestBranch)