Magidoc

Mutation
Object

The root query for implementing GraphQL mutations.

Fields

#

abortQueuedMigrations

Clear all of a customer's queued migrations

abortRepositoryMigration

Abort a repository migration queued or in progress.

acceptEnterpriseAdministratorInvitation

Accepts a pending invitation for a user to become an administrator of an enterprise.

acceptEnterpriseMemberInvitation

Accepts a pending invitation for a user to become an unaffiliated member of an enterprise.

acceptTopicSuggestion

Applies a suggested topic to the repository.

addAssigneesToAssignable

Adds assignees to an assignable object.

addComment

Adds a comment to an Issue or Pull Request.

addDiscussionComment

Adds a comment to a Discussion, possibly as a reply to another comment.

addDiscussionPollVote

Vote for an option in a discussion poll.

addEnterpriseOrganizationMember

Adds enterprise members to an organization within the enterprise.

addEnterpriseSupportEntitlement

Adds a support entitlement to an enterprise member.

addLabelsToLabelable

Adds labels to a labelable object.

addProjectCard

Adds a card to a ProjectColumn. Either contentId or note must be provided but not both.

addProjectColumn

Adds a column to a Project.

addProjectV2DraftIssue

Creates a new draft issue and add it to a Project.

addProjectV2ItemById

Links an existing content instance to a Project.

addPullRequestReview

Adds a review to a Pull Request.

addPullRequestReviewComment

Adds a comment to a review.

addPullRequestReviewThread

Adds a new thread to a pending Pull Request Review.

addPullRequestReviewThreadReply

Adds a reply to an existing Pull Request Review Thread.

addReaction

Adds a reaction to a subject.

addStar

Adds a star to a Starrable.

addUpvote

Add an upvote to a discussion or discussion comment.

addVerifiableDomain

Adds a verifiable domain to an owning account.

approveDeployments

Approve all pending deployments under one or more environments

approveVerifiableDomain

Approve a verifiable domain for notification delivery.

archiveProjectV2Item

Archives a ProjectV2Item

archiveRepository

Marks a repository as archived.

cancelEnterpriseAdminInvitation

Cancels a pending invitation for an administrator to join an enterprise.

cancelEnterpriseMemberInvitation

Cancels a pending invitation for an unaffiliated member to join an enterprise.

cancelSponsorship

Cancel an active sponsorship.

changeUserStatus

Update your status on GitHub.

clearLabelsFromLabelable

Clears all labels from a labelable object.

clearProjectV2ItemFieldValue

This mutation clears the value of a field for an item in a Project. Currently only text, number, date, assignees, labels, single-select, iteration and milestone fields are supported.

cloneProject

Creates a new project by cloning configuration from an existing project.

cloneTemplateRepository

Create a new repository with the same files and directory structure as a template repository.

closeDiscussion

Close a discussion.

closeIssue

Close an issue.

closePullRequest

Close a pull request.

convertProjectCardNoteToIssue

Convert a project note card to one associated with a newly created issue.

convertProjectV2DraftIssueItemToIssue

Converts a projectV2 draft issue item to an issue.

convertPullRequestToDraft

Converts a pull request to draft

copyProjectV2

Copy a project.

createAttributionInvitation

Invites a user to claim reattributable data

createBranchProtectionRule

Create a new branch protection rule

createCheckRun

Create a check run.

createCheckSuite

Create a check suite

createCommitOnBranch

Appends a commit to the given branch as the authenticated user.

This mutation creates a commit whose parent is the HEAD of the provided branch and also updates that branch to point to the new commit. It can be thought of as similar to git commit .

Locating a Branch

#

Commits are appended to a branch of type Ref . This must refer to a git branch (i.e. the fully qualified path must begin with refs/heads/ , although including this prefix is optional.

Callers may specify the branch to commit to either by its global node ID or by passing both of repositoryNameWithOwner and refName . For more details see the documentation for CommittableBranch .

Describing Changes

#

fileChanges are specified as a FilesChanges object describing FileAdditions and FileDeletions .

Please see the documentation for FileChanges for more information on how to use this argument to describe any set of file changes.

Authorship

#

Similar to the web commit interface, this mutation does not support specifying the author or committer of the commit and will not add support for this in the future.

A commit created by a successful execution of this mutation will be authored by the owner of the credential which authenticates the API request. The committer will be identical to that of commits authored using the web interface.

If you need full control over author and committer information, please use the Git Database REST API instead.

Commit Signing

#

Commits made using this mutation are automatically signed by GitHub if supported and will be marked as verified in the user interface.

createDeployment

Creates a new deployment event.

createDeploymentStatus

Create a deployment status.

createDiscussion

Create a discussion.

createEnterpriseOrganization

Creates an organization as part of an enterprise account. A personal access token used to create an organization is implicitly permitted to update the organization it created, if the organization is part of an enterprise that has SAML enabled or uses Enterprise Managed Users. If the organization is not part of such an enterprise, and instead has SAML enabled for it individually, the token will then require SAML authorization to continue working against that organization.

createEnvironment

Creates an environment or simply returns it if already exists.

createIpAllowListEntry

Creates a new IP allow list entry.

createIssue

Creates a new issue.

createLabel

Creates a new label.

createLinkedBranch

Create a branch linked to an issue.

createMigrationSource

Creates a GitHub Enterprise Importer (GEI) migration source.

createProject

Creates a new project.

createProjectV2

Creates a new project.

createProjectV2Field

Create a new project field.

createProjectV2StatusUpdate

Creates a status update within a Project.

createPullRequest

Create a new pull request

createRef

Create a new Git Ref.

createRepository

Create a new repository.

createRepositoryRuleset

Create a repository ruleset

createSponsorsListing

Create a GitHub Sponsors profile to allow others to sponsor you or your organization.

createSponsorsTier

Create a new payment tier for your GitHub Sponsors profile.

createSponsorship

Start a new sponsorship of a maintainer in GitHub Sponsors, or reactivate a past sponsorship.

createSponsorships

Make many sponsorships for different sponsorable users or organizations at once. Can only sponsor those who have a public GitHub Sponsors profile.

createTeamDiscussion

Creates a new team discussion.

createTeamDiscussionComment

Creates a new team discussion comment.

createUserList

Creates a new user list.

declineTopicSuggestion

Rejects a suggested topic for the repository.

deleteBranchProtectionRule

Delete a branch protection rule

deleteDeployment

Deletes a deployment.

deleteDiscussion

Delete a discussion and all of its replies.

deleteDiscussionComment

Delete a discussion comment. If it has replies, wipe it instead.

deleteEnvironment

Deletes an environment

deleteIpAllowListEntry

Deletes an IP allow list entry.

deleteIssue

Deletes an Issue object.

deleteIssueComment

Deletes an IssueComment object.

deleteLabel

Deletes a label.

deleteLinkedBranch

Unlink a branch from an issue.

deletePackageVersion

Delete a package version.

deleteProject

Deletes a project.

deleteProjectCard

Deletes a project card.

deleteProjectColumn

Deletes a project column.

deleteProjectV2

Delete a project.

deleteProjectV2Field

Delete a project field.

deleteProjectV2Item

Deletes an item from a Project.

deleteProjectV2StatusUpdate

Deletes a project status update.

deleteProjectV2Workflow

Deletes a project workflow.

deletePullRequestReview

Deletes a pull request review.

deletePullRequestReviewComment

Deletes a pull request review comment.

deleteRef

Delete a Git Ref.

deleteRepositoryRuleset

Delete a repository ruleset

deleteTeamDiscussion

Deletes a team discussion.

deleteTeamDiscussionComment

Deletes a team discussion comment.

deleteUserList

Deletes a user list.

deleteVerifiableDomain

Deletes a verifiable domain.

dequeuePullRequest

Remove a pull request from the merge queue.

disablePullRequestAutoMerge

Disable auto merge on the given pull request

dismissPullRequestReview

Dismisses an approved or rejected pull request review.

dismissRepositoryVulnerabilityAlert

Dismisses the Dependabot alert.

enablePullRequestAutoMerge

Enable the default auto-merge on a pull request.

enqueuePullRequest

Add a pull request to the merge queue.

followOrganization

Follow an organization.

followUser

Follow a user.

grantEnterpriseOrganizationsMigratorRole

Grant the migrator role to a user for all organizations under an enterprise account.

grantMigratorRole

Grant the migrator role to a user or a team.

importProject

Creates a new project by importing columns and a list of issues/PRs.

inviteEnterpriseAdmin

Invite someone to become an administrator of the enterprise.

inviteEnterpriseMember

Invite someone to become an unaffiliated member of the enterprise.

linkProjectV2ToRepository

Links a project to a repository.

linkProjectV2ToTeam

Links a project to a team.

linkRepositoryToProject

Creates a repository link for a project.

lockLockable

Lock a lockable object

markDiscussionCommentAsAnswer

Mark a discussion comment as the chosen answer for discussions in an answerable category.

markFileAsViewed

Mark a pull request file as viewed

markNotificationAsDone

Marks a notification as done

markProjectV2AsTemplate

Mark a project as a template. Note that only projects which are owned by an Organization can be marked as a template.

markPullRequestReadyForReview

Marks a pull request ready for review.

mergeBranch

Merge a head into a branch.

mergePullRequest

Merge a pull request.

minimizeComment

Minimizes a comment on an Issue, Commit, Pull Request, or Gist

moveProjectCard

Moves a project card to another place.

moveProjectColumn

Moves a project column to another place.

pinEnvironment

Pin an environment to a repository

pinIssue

Pin an issue to a repository

publishSponsorsTier

Publish an existing sponsorship tier that is currently still a draft to a GitHub Sponsors profile.

regenerateEnterpriseIdentityProviderRecoveryCodes

Regenerates the identity provider recovery codes for an enterprise

regenerateVerifiableDomainToken

Regenerates a verifiable domain's verification token.

rejectDeployments

Reject all pending deployments under one or more environments

removeAssigneesFromAssignable

Removes assignees from an assignable object.

removeEnterpriseAdmin

Removes an administrator from the enterprise.

removeEnterpriseIdentityProvider

Removes the identity provider from an enterprise. Owners of enterprises both with and without Enterprise Managed Users may use this mutation.

removeEnterpriseMember

Removes a user from all organizations within the enterprise

removeEnterpriseOrganization

Removes an organization from the enterprise

removeEnterpriseSupportEntitlement

Removes a support entitlement from an enterprise member.

removeLabelsFromLabelable

Removes labels from a Labelable object.

removeOutsideCollaborator

Removes outside collaborator from all repositories in an organization.

removeReaction

Removes a reaction from a subject.

removeStar

Removes a star from a Starrable.

removeUpvote

Remove an upvote to a discussion or discussion comment.

reopenDiscussion

Reopen a discussion.

reopenIssue

Reopen a issue.

reopenPullRequest

Reopen a pull request.

reorderEnvironment

Reorder a pinned repository environment

requestReviews

Set review requests on a pull request.

rerequestCheckSuite

Rerequests an existing check suite.

resolveReviewThread

Marks a review thread as resolved.

retireSponsorsTier

Retire a published payment tier from your GitHub Sponsors profile so it cannot be used to start new sponsorships.

revertPullRequest

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

revokeEnterpriseOrganizationsMigratorRole

Revoke the migrator role to a user for all organizations under an enterprise account.

revokeMigratorRole

Revoke the migrator role from a user or a team.

setEnterpriseIdentityProvider

Creates or updates the identity provider for an enterprise.

setOrganizationInteractionLimit

Set an organization level interaction limit for an organization's public repositories.

setRepositoryInteractionLimit

Sets an interaction limit setting for a repository.

setUserInteractionLimit

Set a user level interaction limit for an user's public repositories.

startOrganizationMigration

Starts a GitHub Enterprise Importer organization migration.

startRepositoryMigration

Starts a GitHub Enterprise Importer (GEI) repository migration.

submitPullRequestReview

Submits a pending pull request review.

transferEnterpriseOrganization

Transfer an organization from one enterprise to another enterprise.

transferIssue

Transfer an issue to a different repository

unarchiveProjectV2Item

Unarchives a ProjectV2Item

unarchiveRepository

Unarchives a repository.

unfollowOrganization

Unfollow an organization.

unfollowUser

Unfollow a user.

unlinkProjectV2FromRepository

Unlinks a project from a repository.

unlinkProjectV2FromTeam

Unlinks a project to a team.

unlinkRepositoryFromProject

Deletes a repository link from a project.

unlockLockable

Unlock a lockable object

unmarkDiscussionCommentAsAnswer

Unmark a discussion comment as the chosen answer for discussions in an answerable category.

unmarkFileAsViewed

Unmark a pull request file as viewed

unmarkIssueAsDuplicate

Unmark an issue as a duplicate of another issue.

unmarkProjectV2AsTemplate

Unmark a project as a template.

unminimizeComment

Unminimizes a comment on an Issue, Commit, Pull Request, or Gist

unpinIssue

Unpin a pinned issue from a repository

unresolveReviewThread

Marks a review thread as unresolved.

unsubscribeFromNotifications

Unsubscribes from notifications

updateBranchProtectionRule

Update a branch protection rule

updateCheckRun

Update a check run

updateCheckSuitePreferences

Modifies the settings of an existing check suite

updateDiscussion

Update a discussion

updateDiscussionComment

Update the contents of a comment on a Discussion

updateEnterpriseAdministratorRole

Updates the role of an enterprise administrator.

updateEnterpriseAllowPrivateRepositoryForkingSetting

Sets whether private repository forks are enabled for an enterprise.

updateEnterpriseDefaultRepositoryPermissionSetting

Sets the base repository permission for organizations in an enterprise.

updateEnterpriseMembersCanChangeRepositoryVisibilitySetting

Sets whether organization members with admin permissions on a repository can change repository visibility.

updateEnterpriseMembersCanCreateRepositoriesSetting

Sets the members can create repositories setting for an enterprise.

updateEnterpriseMembersCanDeleteIssuesSetting

Sets the members can delete issues setting for an enterprise.

updateEnterpriseMembersCanDeleteRepositoriesSetting

Sets the members can delete repositories setting for an enterprise.

updateEnterpriseMembersCanInviteCollaboratorsSetting

Sets whether members can invite collaborators are enabled for an enterprise.

updateEnterpriseMembersCanMakePurchasesSetting

Sets whether or not an organization owner can make purchases.

updateEnterpriseMembersCanUpdateProtectedBranchesSetting

Sets the members can update protected branches setting for an enterprise.

updateEnterpriseMembersCanViewDependencyInsightsSetting

Sets the members can view dependency insights for an enterprise.

updateEnterpriseOrganizationProjectsSetting

Sets whether organization projects are enabled for an enterprise.

updateEnterpriseOwnerOrganizationRole

Updates the role of an enterprise owner with an organization.

updateEnterpriseProfile

Updates an enterprise's profile.

updateEnterpriseRepositoryProjectsSetting

Sets whether repository projects are enabled for a enterprise.

updateEnterpriseTeamDiscussionsSetting

Sets whether team discussions are enabled for an enterprise.

updateEnterpriseTwoFactorAuthenticationRequiredSetting

Sets whether two factor authentication is required for all users in an enterprise.

updateEnvironment

Updates an environment.

updateIpAllowListEnabledSetting

Sets whether an IP allow list is enabled on an owner.

updateIpAllowListEntry

Updates an IP allow list entry.

updateIpAllowListForInstalledAppsEnabledSetting

Sets whether IP allow list configuration for installed GitHub Apps is enabled on an owner.

updateIssue

Updates an Issue.

updateIssueComment

Updates an IssueComment object.

updateLabel

Updates an existing label.

updateNotificationRestrictionSetting

Update the setting to restrict notifications to only verified or approved domains available to an owner.

updateOrganizationAllowPrivateRepositoryForkingSetting

Sets whether private repository forks are enabled for an organization.

updateOrganizationWebCommitSignoffSetting

Sets whether contributors are required to sign off on web-based commits for repositories in an organization.

updatePatreonSponsorability

Toggle the setting for your GitHub Sponsors profile that allows other GitHub accounts to sponsor you on GitHub while paying for the sponsorship on Patreon. Only applicable when you have a GitHub Sponsors profile and have connected your GitHub account with Patreon.

updateProject

Updates an existing project.

updateProjectCard

Updates an existing project card.

updateProjectColumn

Updates an existing project column.

updateProjectV2

Updates an existing project.

updateProjectV2Collaborators

Update the collaborators on a team or a project

updateProjectV2DraftIssue

Updates a draft issue within a Project.

updateProjectV2ItemFieldValue

This mutation updates the value of a field for an item in a Project. Currently only single-select, text, number, date, and iteration fields are supported.

updateProjectV2ItemPosition

This mutation updates the position of the item in the project, where the position represents the priority of an item.

updateProjectV2StatusUpdate

Updates a status update within a Project.

updatePullRequest

Update a pull request

updatePullRequestBranch

Merge or Rebase HEAD from upstream branch into pull request branch

updatePullRequestReview

Updates the body of a pull request review.

updatePullRequestReviewComment

Updates a pull request review comment.

updateRef

Update a Git Ref.

updateRefs

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.

updateRepository

Update information about a repository.

updateRepositoryRuleset

Update a repository ruleset

updateRepositoryWebCommitSignoffSetting

Sets whether contributors are required to sign off on web-based commits for a repository.

updateSponsorshipPreferences

Change visibility of your sponsorship and opt in or out of email updates from the maintainer.

updateSubscription

Updates the state for subscribable subjects.

updateTeamDiscussion

Updates a team discussion.

updateTeamDiscussionComment

Updates a discussion comment.

updateTeamReviewAssignment

Updates team review assignment.

updateTeamsRepository

Update team repository.

updateTopics

Replaces the repository's topics with the given topics.

updateUserList

Updates an existing user list.

updateUserListsForItem

Updates which of the viewer's lists an item belongs to

verifyVerifiableDomain

Verify that a verifiable domain has the expected DNS record.