GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing docs.github.com — Git - GitHub Docs GitReference documentation for GraphQL schema types in the Git category. In this articleMutationscreateRefMutation Create a new Git Ref. Input fields for |
| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
| The newly created ref. |
Delete a Git Ref.
deleteRefinput (DeleteRefInput!)deleteRef| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
Update a Git Ref.
updateRefinput (UpdateRefInput!)updateRef| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
| The updated Ref. |
Creates, updates and/or deletes multiple refs in a repository.
This mutation takes a list of RefUpdates 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.
updateRefsinput (UpdateRefsInput!)updateRefs| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
Represents a Git blame.
Blame| Name | Description |
|---|---|
| The list of ranges from a Git blame. |
Represents a range of information from a Git blame.
BlameRange| Name | Description |
|---|---|
| Identifies the recency of the change, from 1 (new) to 10 (old). This is calculated as a 2-quantile and determines the length of distance between the median age of all the changes in the file and the recency of the current range's change. |
| Identifies the line author. |
| The ending line for the range. |
| The starting line for the range. |
Represents a Git blob.
Blob ImplementsBlob| Name | Description |
|---|---|
| An abbreviated version of the Git object ID. |
| Byte size of Blob object. |
| The HTTP path for this Git object. |
| The HTTP URL for this Git object. |
| The Node ID of the Blob object. |
| Indicates whether the Blob is binary or text. Returns null if unable to determine the encoding. |
| Indicates whether the contents is truncated. |
| The Git object ID. |
| The Repository the Git object belongs to. |
| UTF8 text data or null if the Blob is binary. |
Represents an actor in a Git commit (ie. an author or committer).
GitActor| Name | Description |
|---|---|
| A URL pointing to the author's public avatar. Arguments for
|
| The timestamp of the Git action (authoring or committing). |
| The email in the Git commit. |
| The name in the Git commit. |
| The GitHub user corresponding to the email field. Null if no such user exists. |
The connection type for GitActor.
GitActorConnection| Name | Description |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
An edge in a connection.
GitActorEdge| Name | Description |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
Represents a GPG signature on a Commit or Tag.
GpgSignature ImplementsGpgSignature| Name | Description |
|---|---|
| Email used to sign this object. |
| True if the signature is valid and verified by GitHub. |
| Hex-encoded ID of the key that signed this object. |
| Payload for GPG signing object. Raw ODB object without the signature header. |
| ASCII-armored signature header from object. |
| GitHub user corresponding to the email signing this commit. |
| The state of this signature. |
| The date the signature was verified, if valid. |
| True if the signature was made with GitHub's signing key. |
A Git push.
Push ImplementsPush| Name | Description |
|---|---|
| The Node ID of the Push object. |
| The SHA after the push. |
| The permalink for this push. |
| The SHA before the push. |
| The actor who pushed. |
| The repository that was pushed to. |
Represents a Git reference.
Ref ImplementsRef| Name | Description |
|---|---|
| A list of pull requests with this ref as the head ref. Arguments for
|
| Branch protection rules for this ref. |
| Compares the current ref as a base ref to another head ref, if the comparison can be made. Arguments for
|
| The Node ID of the Ref object. |
| The ref name. |
| The ref's prefix, such as |
| Branch protection rules that are viewable by non-admins. |
| The repository the ref belongs to. |
| A list of rules from active Repository and Organization rulesets that apply to this ref. Arguments for
|
| The object the ref points to. Returns null when object does not exist. |
The connection type for Ref.
RefConnection| Name | Description |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
An edge in a connection.
RefEdge| Name | Description |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
Branch protection rules that are enforced on the viewer.
RefUpdateRule| Name | Description |
|---|---|
| Can this branch be deleted. |
| Are force pushes allowed on this branch. |
| Can matching branches be created. |
| Identifies the protection rule pattern. |
| Number of approving reviews required to update matching branches. |
| List of required status check contexts that must pass for commits to be accepted to matching branches. |
| Are reviews from code owners required to update matching branches. |
| Are conversations required to be resolved before merging. |
| Are merge commits prohibited from being pushed to this branch. |
| Are commits required to be signed. |
| Is the viewer allowed to dismiss reviews. |
| Can the viewer push to the branch. |
Represents an S/MIME signature on a Commit or Tag.
SmimeSignature ImplementsSmimeSignature| Name | Description |
|---|---|
| Email used to sign this object. |
| True if the signature is valid and verified by GitHub. |
| Payload for GPG signing object. Raw ODB object without the signature header. |
| ASCII-armored signature header from object. |
| GitHub user corresponding to the email signing this commit. |
| The state of this signature. |
| The date the signature was verified, if valid. |
| True if the signature was made with GitHub's signing key. |
Represents an SSH signature on a Commit or Tag.
SshSignature ImplementsSshSignature| Name | Description |
|---|---|
| Email used to sign this object. |
| True if the signature is valid and verified by GitHub. |
| Hex-encoded fingerprint of the key that signed this object. |
| Payload for GPG signing object. Raw ODB object without the signature header. |
| ASCII-armored signature header from object. |
| GitHub user corresponding to the email signing this commit. |
| The state of this signature. |
| The date the signature was verified, if valid. |
| True if the signature was made with GitHub's signing key. |
A pointer to a repository at a specific revision embedded inside another repository.
Submodule| Name | Description |
|---|---|
| The branch of the upstream submodule for tracking updates. |
| The git URL of the submodule repository. |
| The name of the submodule in .gitmodules. |
| The name of the submodule in .gitmodules (Base64-encoded). |
| The path in the superproject that this submodule is located in. |
| The path in the superproject that this submodule is located in (Base64-encoded). |
| The commit revision of the subproject repository being tracked by the submodule. |
The connection type for Submodule.
SubmoduleConnection| Name | Description |
|---|---|
| A list of edges. |
| A list of nodes. |
| Information to aid in pagination. |
| Identifies the total count of items in the connection. |
An edge in a connection.
SubmoduleEdge| Name | Description |
|---|---|
| A cursor for use in pagination. |
| The item at the end of the edge. |
Represents a Git tag.
Tag ImplementsTag| Name | Description |
|---|---|
| An abbreviated version of the Git object ID. |
| The HTTP path for this Git object. |
| The HTTP URL for this Git object. |
| The Node ID of the Tag object. |
| The Git tag message. |
| The Git tag name. |
| The Git object ID. |
| The Repository the Git object belongs to. |
| Details about the tag author. |
| The Git object the tag points to. |
Represents a Git tree.
Tree ImplementsTree| Name | Description |
|---|---|
| An abbreviated version of the Git object ID. |
| The HTTP path for this Git object. |
| The HTTP URL for this Git object. |
| A list of tree entries. |
| The Node ID of the Tree object. |
| The Git object ID. |
| The Repository the Git object belongs to. |
Represents a Git tree entry.
TreeEntry| Name | Description |
|---|---|
| The extension of the file. |
| Whether or not this tree entry is generated. |
| The programming language this file is written in. |
| Number of lines in the file. |
| Entry file mode. |
| Entry file name. |
| Entry file name. (Base64-encoded). |
| Entry file object. |
| Entry file Git object ID. |
| The full path of the file. |
| The full path of the file. (Base64-encoded). |
| The Repository the tree entry belongs to. |
| Entry byte size. |
| If the TreeEntry is for a directory occupied by a submodule project, this returns the corresponding submodule. |
| Entry file type. |
Represents an unknown signature on a Commit or Tag.
UnknownSignature ImplementsUnknownSignature| Name | Description |
|---|---|
| Email used to sign this object. |
| True if the signature is valid and verified by GitHub. |
| Payload for GPG signing object. Raw ODB object without the signature header. |
| ASCII-armored signature header from object. |
| GitHub user corresponding to the email signing this commit. |
| The state of this signature. |
| The date the signature was verified, if valid. |
| True if the signature was made with GitHub's signing key. |
Represents a Git object.
GitObject is implemented by
GitObject| Name | Description |
|---|---|
| An abbreviated version of the Git object ID. |
| The HTTP path for this Git object. |
| The HTTP URL for this Git object. |
| The Node ID of the GitObject object. |
| The Git object ID. |
| The Repository the Git object belongs to. |
Information about a signature (GPG or S/MIME) on a Commit or Tag.
GitSignature is implemented by
GitSignature| Name | Description |
|---|---|
| Email used to sign this object. |
| True if the signature is valid and verified by GitHub. |
| Payload for GPG signing object. Raw ODB object without the signature header. |
| ASCII-armored signature header from object. |
| GitHub user corresponding to the email signing this commit. |
| The state of this signature. |
| The date the signature was verified, if valid. |
| True if the signature was made with GitHub's signing key. |
The state of a Git signature.
GitSignatureState| Name | Description |
|---|---|
BAD_CERT | The signing certificate or its chain could not be verified. |
BAD_EMAIL | Invalid email used for signing. |
EXPIRED_KEY | Signing key expired. |
GPGVERIFY_ERROR | Internal error - the GPG verification service misbehaved. |
GPGVERIFY_UNAVAILABLE | Internal error - the GPG verification service is unavailable at the moment. |
INVALID | Invalid signature. |
MALFORMED_SIG | Malformed signature. |
NOT_SIGNING_KEY | The usage flags for the key that signed this don't allow signing. |
NO_USER | Email used for signing not known to GitHub. |
OCSP_ERROR | Valid signature, though certificate revocation check failed. |
OCSP_PENDING | Valid signature, pending certificate revocation checking. |
OCSP_REVOKED | One or more certificates in chain has been revoked. |
UNKNOWN_KEY | Key used for signing not known to GitHub. |
UNKNOWN_SIG_TYPE | Unknown signature type. |
UNSIGNED | Unsigned. |
UNVERIFIED_EMAIL | Email used for signing unverified on GitHub. |
VALID | Valid signature and verified by GitHub. |
Properties by which ref connections can be ordered.
RefOrderField| Name | Description |
|---|---|
ALPHABETICAL | Order refs by their alphanumeric name. |
TAG_COMMIT_DATE | Order refs by underlying commit date if the ref prefix is refs/tags/. |
A git ref for a commit to be appended to.
The ref must be a branch, i.e. its fully qualified name must start
with refs/heads/ (although the input is not required to be fully
qualified).
The Ref may be specified by its global node ID or by the
repositoryNameWithOwner and branchName.
Specify a branch using a global node ID:
{ "id": "MDM6UmVmMTpyZWZzL2hlYWRzL21haW4=" }
Specify a branch using repositoryNameWithOwner and branchName:
{
"repositoryNameWithOwner": "github/graphql-client",
"branchName": "main"
}.
CommittableBranch| Name | Description |
|---|---|
| The unqualified name of the branch to append the commit to. |
| The Node ID of the Ref to be updated. |
| The nameWithOwner of the repository to commit to. |
Autogenerated input type of CreateRef.
CreateRefInput| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
| The fully qualified name of the new Ref (ie: |
| The GitObjectID that the new Ref shall target. Must point to a commit. |
| The Node ID of the Repository to create the Ref in. |
Autogenerated input type of DeleteRef.
DeleteRefInput| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
| The Node ID of the Ref to be deleted. |
A command to add a file at the given path with the given contents as part of a commit. Any existing file at that that path will be replaced.
FileAddition| Name | Description |
|---|---|
| The base64 encoded contents of the file. |
| The path in the repository where the file will be located. |
A description of a set of changes to a file tree to be made as part of
a git commit, modeled as zero or more file additions and zero or more
file deletions.
Both fields are optional; omitting both will produce a commit with no file changes.
deletions and additions describe changes to files identified
by their path in the git tree using unix-style path separators, i.e.
/. The root of a git tree is an empty string, so paths are not
slash-prefixed.
path values must be unique across all additions and deletions
provided. Any duplication will result in a validation error.
File contents must be provided in full for each FileAddition.
The contents of a FileAddition must be encoded using RFC 4648
compliant base64, i.e. correct padding is required and no characters
outside the standard alphabet may be used. Invalid base64
encoding will be rejected with a validation error.
The encoded contents may be binary.
For text files, no assumptions are made about the character encoding of
the file contents (after base64 decoding). No charset transcoding or
line-ending normalization will be performed; it is the client's
responsibility to manage the character encoding of files they provide.
However, for maximum compatibility we recommend using UTF-8 encoding
and ensuring that all files in a repository use a consistent
line-ending convention (\n or \r\n), and that all files end
with a newline.
Each of the the five types of conceptual changes that can be made in a
git commit can be described using the FileChanges type as follows:
New file addition: create file hello world\n at path docs/README.txt:
{
"additions" [
{
"path": "docs/README.txt",
"contents": base64encode("hello world\n")
}
]
}
Existing file modification: change existing docs/README.txt to have new
content new content here\n:
{
"additions" [
{
"path": "docs/README.txt",
"contents": base64encode("new content here\n")
}
]
}
Existing file deletion: remove existing file docs/README.txt.
Note that the path is required to exist -- specifying a
path that does not exist on the given branch will abort the
commit and return an error.
{
"deletions" [
{
"path": "docs/README.txt"
}
]
}
File rename with no changes: rename docs/README.txt with
previous content hello world\n to the same content at
newdocs/README.txt:
{
"deletions" [
{
"path": "docs/README.txt",
}
],
"additions" [
{
"path": "newdocs/README.txt",
"contents": base64encode("hello world\n")
}
]
}
File rename with changes: rename docs/README.txt with
previous content hello world\n to a file at path
newdocs/README.txt with content new contents\n:
{
"deletions" [
{
"path": "docs/README.txt",
}
],
"additions" [
{
"path": "newdocs/README.txt",
"contents": base64encode("new contents\n")
}
]
}.
FileChanges| Name | Description |
|---|---|
| File to add or change. |
| Files to delete. |
A command to delete the file at the given path as part of a commit.
FileDeletion| Name | Description |
|---|---|
| The path to delete. |
Ways in which lists of git refs can be ordered upon return.
RefOrder| Name | Description |
|---|---|
| The direction in which to order refs by the specified field. |
| The field in which to order refs by. |
A ref update.
RefUpdate| Name | Description |
|---|---|
| The value this ref should be updated to. |
| The value this ref needs to point to before the update. |
| Force a non fast-forward update. |
| The fully qualified name of the ref to be update. For example |
Autogenerated input type of UpdateRef.
UpdateRefInput| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
| Permit updates of branch Refs that are not fast-forwards?. |
| The GitObjectID that the Ref shall be updated to target. |
| The Node ID of the Ref to be updated. |
Autogenerated input type of UpdateRefs.
UpdateRefsInput| Name | Description |
|---|---|
| A unique identifier for the client performing the mutation. |
| A list of ref updates. |
| The Node ID of the repository. |