Mutations
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.
Input fields for createCommitOnBranch
input(CreateCommitOnBranchInput!)
Return fields for createCommitOnBranch
| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
| The new commit. |
| The ref which has been updated to point to the new commit. |
Objects
Commit
Represents a Git commit.
Commit Implements
Fields for Commit
| Name | Description |
|---|---|
| An abbreviated version of the Git object ID. |
| The number of additions in this commit. |
| The merged Pull Request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open Pull Requests associated with the commit. Arguments for
|
| Authorship details of the commit. |
| Check if the committer and the author match. |
| The datetime when this commit was authored. |
| The list of authors for this commit based on the git author and the Co-authored-by message trailer. The git author will always be first. |
| Fetches Arguments for
|
| We recommend using the Warning
|
| The number of changed files in this commit. If GitHub is unable to calculate
the number of changed files (for example due to a timeout), this will return
|
| The check suites associated with a commit. Arguments for
|
| Comments made on the commit. |
| The HTTP path for this Git object. |
| The HTTP URL for this Git object. |
| The datetime when this commit was committed. |
| Check if committed via GitHub web UI. |
| Committer details of the commit. |
| The number of deletions in this commit. |
| The deployments associated with a commit. Arguments for
|
| The tree entry representing the file located at the given path. Arguments for
|
| The linear commit history starting from (and including) this commit, in the same order as Arguments for
|
| The Node ID of the Commit object. |
| The Git commit message. |
| The Git commit message body. |
| The commit message body rendered to HTML. |
| The Git commit message headline. |
| The commit message headline rendered to HTML. |
| The Git object ID. |
| The organization this commit was made on behalf of. |
| The parents of a commit. |
| The datetime when this commit was pushed. Warning
|
| The Repository this commit belongs to. |
| The HTTP path for this commit. |
| Commit signing information, if present. |
| Status information for this commit. |
| Check and Status rollup information for this commit. |
| Returns a list of all submodules in this repository as of this Commit parsed from the .gitmodules file. Arguments for
|
| Returns a URL to download a tarball archive for a repository. Note: For private repositories, these links are temporary and expire after five minutes. |
| Commit's root Tree. |
| The HTTP path for the tree of this commit. |
| The HTTP URL for the tree of this commit. |
| The HTTP URL for this commit. |
| Check if the viewer is able to change their subscription status for the repository. |
| Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. |
| Returns a URL to download a zipball archive for a repository. Note: For private repositories, these links are temporary and expire after five minutes. |
CommitAuthorEmailPatternParameters
Parameters to be used for the commit_author_email_pattern rule.
Fields for CommitAuthorEmailPatternParameters
| Name | Description |
|---|---|
| How this rule appears when configuring it. |
| If true, the rule will fail if the pattern matches. |
| The operator to use for matching. |
| The pattern to match with. |
CommitComment
Represents a comment on a given Commit.
CommitComment Implements
Fields for CommitComment
| Name | Description |
|---|---|
| The actor who authored the comment. |
| Author's association with the subject of the comment. |
| Identifies the comment body. |
| The body rendered to HTML. |
| The body rendered to text. |
| Identifies the commit associated with the comment, if the commit exists. |
| Identifies the date and time when the object was created. |
| Check if this comment was created via an email reply. |
| Identifies the primary key from the database. |
| The actor who edited the comment. |
| The Node ID of the CommitComment object. |
| Check if this comment was edited and includes an edit with the creation data. |
| Returns whether or not a comment has been minimized. |
| The moment the editor made the last edit. |
| Returns why the comment was minimized. One of |
| Identifies the file path associated with the comment. |
| Identifies the line position associated with the comment. |
| Identifies when the comment was published at. |
| A list of reactions grouped by content left on the subject. |
| A list of Reactions left on the Issue. Arguments for
|
| The repository associated with this node. |
| The HTTP path permalink for this commit comment. |
| Identifies the date and time when the object was last updated. |
| The HTTP URL permalink for this commit comment. |
| A list of edits to this content. Arguments for
|
| Check if the current viewer can delete this object. |
| Check if the current viewer can minimize this object. |
| Can user react to this subject. |
| Check if the current viewer can unminimize this object. |
| Check if the current viewer can update this object. |
| Reasons why the current viewer can not update this comment. |
| Did the viewer author this comment. |
CommitCommentConnection
The connection type for CommitComment.
Fields for CommitCommentConnection
| Name | Description |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
CommitCommentEdge
An edge in a connection.
Fields for CommitCommentEdge
| Name | Description |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
CommitCommentThread
A thread of comments on a commit.
CommitCommentThread Implements
Fields for CommitCommentThread
| Name | Description |
|---|---|
| The comments that exist in this thread. |
| The commit the comments were made on. |
| The Node ID of the CommitCommentThread object. |
| The file the comments were made on. |
| The position in the diff for the commit that the comment was made on. |
| The repository associated with this node. |
CommitConnection
The connection type for Commit.
Fields for CommitConnection
| Name | Description |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
CommitContributionsByRepository
This aggregates commits made by a user within one repository.
Fields for CommitContributionsByRepository
| Name | Description |
|---|---|
| The commit contributions, each representing a day. Arguments for
|
| The repository in which the commits were made. |
| The HTTP path for the user's commits to the repository in this time range. |
| The HTTP URL for the user's commits to the repository in this time range. |
CommitEdge
An edge in a connection.
Fields for CommitEdge
| Name | Description |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |