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.
Champs d’entrée pour createCommitOnBranch
input(CreateCommitOnBranchInput!)
Champs de retour pour createCommitOnBranch
| Nom | 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 Met en œuvre
Champs pour Commit
| Nom | 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 pour
|
| 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 pour
|
| We recommend using the Avertissement
|
| 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 pour
|
| 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 pour
|
| The tree entry representing the file located at the given path. Arguments pour
|
| The linear commit history starting from (and including) this commit, in the same order as Arguments pour
|
| 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. Avertissement
|
| 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 pour
|
| 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.
Champs pour CommitAuthorEmailPatternParameters
| Nom | 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 Met en œuvre
Champs pour CommitComment
| Nom | 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 pour
|
| 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 pour
|
| 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.
Champs pour CommitCommentConnection
| Nom | 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.
Champs pour CommitCommentEdge
| Nom | Description |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
CommitCommentThread
A thread of comments on a commit.
CommitCommentThread Met en œuvre
Champs pour CommitCommentThread
| Nom | 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.
Champs pour CommitConnection
| Nom | 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.
Champs pour CommitContributionsByRepository
| Nom | Description |
|---|---|
| The commit contributions, each representing a day. Arguments pour
|
| 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.
Champs pour CommitEdge
| Nom | Description |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
CommitHistoryConnection
The connection type for Commit.
Champs pour CommitHistoryConnection
| Nom | Description |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
CommitMessagePatternParameters
Parameters to be used for the commit_message_pattern rule.
Champs pour CommitMessagePatternParameters
| Nom | 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. |
CommitterEmailPatternParameters
Parameters to be used for the committer_email_pattern rule.
Champs pour CommitterEmailPatternParameters
| Nom | 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. |
Comparison
Represents a comparison between two commit revisions.
Comparison Met en œuvre
Champs pour Comparison
| Nom | Description |
|---|---|
| The number of commits ahead of the base branch. |
| The base revision of this comparison. |
| The number of commits behind the base branch. |
| The commits which compose this comparison. |
| The head revision of this comparison. |
| The Node ID of the Comparison object. |
| The status of this comparison. |
ComparisonCommitConnection
The connection type for Commit.
Champs pour ComparisonCommitConnection
| Nom | Description |
|---|---|
| The total count of authors and co-authors across all commits. |
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
Status
Represents a commit status.
Status Met en œuvre
Champs pour Status
| Nom | Description |
|---|---|
| A list of status contexts and check runs for this commit. Arguments pour
|
| The commit this status is attached to. |
| Looks up an individual status context by context name. Arguments pour
|
| The individual status contexts for this commit. |
| The Node ID of the Status object. |
| The combined commit status. |
StatusCheckConfiguration
Required status check.
Champs pour StatusCheckConfiguration
| Nom | Description |
|---|---|
| The status check context name that must be present on the commit. |
| The optional integration ID that this status check must originate from. |
StatusCheckRollup
Represents the rollup for both the check runs and status for a commit.
StatusCheckRollup Met en œuvre
Champs pour StatusCheckRollup
| Nom | Description |
|---|---|
| The commit the status and check runs are attached to. |
| A list of status contexts and check runs for this commit. |
| The Node ID of the StatusCheckRollup object. |
| The combined status for the commit. |
StatusCheckRollupContextConnection
The connection type for StatusCheckRollupContext.
Champs pour StatusCheckRollupContextConnection
| Nom | Description |
|---|---|
| The number of check runs in this rollup. |
| Counts of check runs by state. |
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| The number of status contexts in this rollup. |
| Counts of status contexts by state. |
| Identifies the total count of items in the connection. |
StatusCheckRollupContextEdge
An edge in a connection.
Champs pour StatusCheckRollupContextEdge
| Nom | Description |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
StatusContext
Represents an individual commit status context.
StatusContext Met en œuvre
Champs pour StatusContext
| Nom | Description |
|---|---|
| The avatar of the OAuth application or the user that created the status. Arguments pour
|
| This commit this status context is attached to. |
| The name of this status context. |
| Identifies the date and time when the object was created. |
| The actor who created this status context. |
| The description for this status context. |
| The Node ID of the StatusContext object. |
| Whether this is required to pass before merging for a specific pull request. |
| The state of this status context. |
| The URL for this status context. |
StatusContextStateCount
Represents a count of the state of a status context.
Champs pour StatusContextStateCount
| Nom | Description |
|---|---|
| The number of statuses with this state. |
| The state of a status context. |
Enums
CommitContributionOrderField
Properties by which commit contribution connections can be ordered.
Valeurs pour CommitContributionOrderField.
| Nom | Description |
|---|---|
COMMIT_COUNT | Order commit contributions by how many commits they represent. |
OCCURRED_AT | Order commit contributions by when they were made. |
ComparisonStatus
The status of a git comparison between two refs.
Valeurs pour ComparisonStatus.
| Nom | Description |
|---|---|
AHEAD | The head ref is ahead of the base ref. |
BEHIND | The head ref is behind the base ref. |
DIVERGED | The head ref is both ahead and behind of the base ref, indicating git history has diverged. |
IDENTICAL | The head ref and base ref are identical. |
StatusState
The possible commit status states.
Valeurs pour StatusState.
| Nom | Description |
|---|---|
ERROR | Status is errored. |
EXPECTED | Status is expected. |
FAILURE | Status is failing. |
PENDING | Status is pending. |
SUCCESS | Status is successful. |
Unions
StatusCheckRollupContext
Types that can be inside a StatusCheckRollup context.
Types possibles pour StatusCheckRollupContext
Input objects
CommitAuthor
Specifies an author for filtering Git commits.
Champs d’entrée pour CommitAuthor
| Nom | Description |
|---|---|
| Email addresses to filter by. Commits authored by any of the specified email addresses will be returned. |
| ID of a User to filter by. If non-null, only commits authored by this user will be returned. This field takes precedence over emails. |
CommitAuthorEmailPatternParametersInput
Parameters to be used for the commit_author_email_pattern rule.
Champs d’entrée pour CommitAuthorEmailPatternParametersInput
| Nom | 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. |
CommitContributionOrder
Ordering options for commit contribution connections.
Champs d’entrée pour CommitContributionOrder
| Nom | Description |
|---|---|
| The ordering direction. |
| The field by which to order commit contributions. |
CommitMessage
A message to include with a new commit.
Champs d’entrée pour CommitMessage
| Nom | Description |
|---|---|
| The body of the message. |
| The headline of the message. |
CommitMessagePatternParametersInput
Parameters to be used for the commit_message_pattern rule.
Champs d’entrée pour CommitMessagePatternParametersInput
| Nom | 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. |
CommitterEmailPatternParametersInput
Parameters to be used for the committer_email_pattern rule.
Champs d’entrée pour CommitterEmailPatternParametersInput
| Nom | 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. |
CreateCommitOnBranchInput
Autogenerated input type of CreateCommitOnBranch.
Champs d’entrée pour CreateCommitOnBranchInput
| Nom | Description |
|---|---|
| The Ref to be updated. Must be a branch. |
| A unique identifier for the client performing the mutation. |
| The git commit oid expected at the head of the branch prior to the commit. |
| A description of changes to files in this commit. |
| The commit message the be included with the commit. |
StatusCheckConfigurationInput
Required status check.
Champs d’entrée pour StatusCheckConfigurationInput
| Nom | Description |
|---|---|
| The status check context name that must be present on the commit. |
| The optional integration ID that this status check must originate from. |