Skip to main content

Pull requests

Reference documentation for GraphQL schema types in the Pull requests category.

In this article

Mutations

addPullRequestCreationCapBypassUsers

Mutation

Add users to the pull request creation cap bypass list. Bypassed users can create pull requests regardless of the configured cap. Only repository admins can manage the bypass list. You can add a maximum of 100 users per request. The bypass list can only hold a maximum of 100 users.

Input fields for addPullRequestCreationCapBypassUsers

Return fields for addPullRequestCreationCapBypassUsers

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

repository (Repository)

The repository with the updated bypass list.

addPullRequestReview

Mutation

Adds a review to a Pull Request.

Input fields for addPullRequestReview

Return fields for addPullRequestReview

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequestReview (PullRequestReview)

The newly created pull request review.

reviewEdge (PullRequestReviewEdge)

The edge from the pull request's review connection.

addPullRequestReviewComment

Mutation

Adds a comment to a review.

Input fields for addPullRequestReviewComment

Return fields for addPullRequestReviewComment

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

comment (PullRequestReviewComment)

The newly created comment.

commentEdge (PullRequestReviewCommentEdge)

The edge from the review's comment connection.

addPullRequestReviewThread

Mutation

Adds a new thread to a pending Pull Request Review.

Input fields for addPullRequestReviewThread

Return fields for addPullRequestReviewThread

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

thread (PullRequestReviewThread)

The newly created thread.

addPullRequestReviewThreadReply

Mutation

Adds a reply to an existing Pull Request Review Thread.

Input fields for addPullRequestReviewThreadReply

Return fields for addPullRequestReviewThreadReply

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

comment (PullRequestReviewComment)

The newly created reply.

archivePullRequest

Mutation

Archive a pull request. Closes, locks, and marks the pull request as archived. Only repository admins can archive pull requests.

Input fields for archivePullRequest

Return fields for archivePullRequest

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that was archived.

closePullRequest

Mutation

Close a pull request.

Input fields for closePullRequest

Return fields for closePullRequest

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that was closed.

convertPullRequestToDraft

Mutation

Converts a pull request to draft.

Input fields for convertPullRequestToDraft

Return fields for convertPullRequestToDraft

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that is now a draft.

createPullRequest

Mutation

Create a new pull request.

Input fields for createPullRequest

Return fields for createPullRequest

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The new pull request.

deletePullRequestReview

Mutation

Deletes a pull request review.

Input fields for deletePullRequestReview

Return fields for deletePullRequestReview

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequestReview (PullRequestReview)

The deleted pull request review.

deletePullRequestReviewComment

Mutation

Deletes a pull request review comment.

Input fields for deletePullRequestReviewComment

Return fields for deletePullRequestReviewComment

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequestReview (PullRequestReview)

The pull request review the deleted comment belonged to.

pullRequestReviewComment (PullRequestReviewComment)

The deleted pull request review comment.

dequeuePullRequest

Mutation

Remove a pull request from the merge queue.

Input fields for dequeuePullRequest

Return fields for dequeuePullRequest

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

mergeQueueEntry (MergeQueueEntry)

The merge queue entry of the dequeued pull request.

disablePullRequestAutoMerge

Mutation

Disable auto merge on the given pull request.

Input fields for disablePullRequestAutoMerge

Return fields for disablePullRequestAutoMerge

NameDescription

actor (Actor)

Identifies the actor who performed the event.

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request auto merge was disabled on.

dismissPullRequestReview

Mutation

Dismisses an approved or rejected pull request review.

Input fields for dismissPullRequestReview

Return fields for dismissPullRequestReview

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequestReview (PullRequestReview)

The dismissed pull request review.

enablePullRequestAutoMerge

Mutation

Enable the default auto-merge on a pull request.

Input fields for enablePullRequestAutoMerge

Return fields for enablePullRequestAutoMerge

NameDescription

actor (Actor)

Identifies the actor who performed the event.

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request auto-merge was enabled on.

enqueuePullRequest

Mutation

Add a pull request to the merge queue.

Input fields for enqueuePullRequest

Return fields for enqueuePullRequest

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

mergeQueueEntry (MergeQueueEntry)

The merge queue entry for the enqueued pull request.

markFileAsViewed

Mutation

Mark a pull request file as viewed.

Input fields for markFileAsViewed

Return fields for markFileAsViewed

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The updated pull request.

markPullRequestReadyForReview

Mutation

Marks a pull request ready for review.

Input fields for markPullRequestReadyForReview

Return fields for markPullRequestReadyForReview

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that is ready for review.

mergePullRequest

Mutation

Merge a pull request.

Input fields for mergePullRequest

Return fields for mergePullRequest

NameDescription

actor (Actor)

Identifies the actor who performed the event.

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that was merged.

removePullRequestCreationCapBypassUsers

Mutation

Remove users from the pull request creation cap bypass list. Only repository admins can manage the bypass list.

Input fields for removePullRequestCreationCapBypassUsers

Return fields for removePullRequestCreationCapBypassUsers

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

repository (Repository)

The repository with the updated bypass list.

reopenPullRequest

Mutation

Reopen a pull request.

Input fields for reopenPullRequest

Return fields for reopenPullRequest

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that was reopened.

requestReviews

Mutation

Set review requests on a pull request.

Input fields for requestReviews

Return fields for requestReviews

NameDescription

actor (Actor)

Identifies the actor who performed the event.

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that is getting requests.

requestedReviewersEdge (UserEdge)

The edge from the pull request to the requested reviewers.

requestReviewsByLogin

Mutation

Set review requests on a pull request using login strings instead of IDs.

Input fields for requestReviewsByLogin

Return fields for requestReviewsByLogin

NameDescription

actor (Actor)

Identifies the actor who performed the event.

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that is getting requests.

requestedReviewersEdge (UserEdge)

The edge from the pull request to the requested reviewers.

resolveReviewThread

Mutation

Marks a review thread as resolved.

Input fields for resolveReviewThread

Return fields for resolveReviewThread

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

thread (PullRequestReviewThread)

The thread to resolve.

revertPullRequest

Mutation

Create a pull request that reverts the changes from a merged pull request.

Input fields for revertPullRequest

Return fields for revertPullRequest

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that was reverted.

revertPullRequest (PullRequest)

The new pull request that reverts the input pull request.

submitPullRequestReview

Mutation

Submits a pending pull request review.

Input fields for submitPullRequestReview

Return fields for submitPullRequestReview

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequestReview (PullRequestReview)

The submitted pull request review.

unarchivePullRequest

Mutation

Unarchive a pull request. Removes the archived flag from the pull request. Does not automatically reopen or unlock the pull request. Only repository admins can unarchive pull requests.

Input fields for unarchivePullRequest

Return fields for unarchivePullRequest

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The pull request that was unarchived.

unmarkFileAsViewed

Mutation

Unmark a pull request file as viewed.

Input fields for unmarkFileAsViewed

Return fields for unmarkFileAsViewed

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

pullRequest (PullRequest)

The updated pull request.

unresolveReviewThread

Mutation

Marks a review thread as unresolved.

Input fields for unresolveReviewThread

Return fields for unresolveReviewThread

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

thread (PullRequestReviewThread)

The thread to resolve.

updatePullRequest

Mutation

Update a pull request.

Input fields for updatePullRequest

  • input (