Github API - Test Config

mutation 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.

Arguments
input CreateCommitOnBranchInput

CreateCommitOnBranchInput [input]

Autogenerated input type of CreateCommitOnBranch

Attributes

The Ref to be updated. Must be a branch.

clientMutationId String

A unique identifier for the client performing the mutation.

expectedHeadOid GitObjectID

The git commit oid expected at the head of the branch prior to the commit

fileChanges FileChanges

A description of changes to files in this commit.

message CommitMessage

The commit message the be included with the commit.

API:
Github GraphQL API

Parameters for CreateCommitOnBranch

Returns
CreateCommitOnBranchPayload

CreateCommitOnBranchPayload [object]

Autogenerated return type of CreateCommitOnBranch

Attributes
clientMutationId String

A unique identifier for the client performing the mutation.

commit Commit

The new commit.

ref Ref

The ref which has been updated to point to the new commit.

API:
Github GraphQL API
API:
Github GraphQL API