Skip to main content

Git

Reference documentation for GraphQL schema types in the Git category.

Mutations

createRef

Mutation

Create a new Git Ref.

Input fields for createRef

Return fields for createRef

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

ref (Ref)

The newly created ref.

deleteRef

Mutation

Delete a Git Ref.

Input fields for deleteRef

Return fields for deleteRef

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

updateRef

Mutation

Update a Git Ref.

Input fields for updateRef

Return fields for updateRef

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

ref (Ref)

The updated Ref.

updateRefs

Mutation

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.

Input fields for updateRefs

Return fields for updateRefs

NameDescription

clientMutationId (String)

A unique identifier for the client performing the mutation.

Objects

Blame

Object

Represents a Git blame.

Fields for Blame

NameDescription

ranges ([BlameRange!]!)

The list of ranges from a Git blame.

BlameRange

Object

Represents a range of information from a Git blame.

Fields for BlameRange

NameDescription

age (Int!)

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.

commit (Commit!)

Identifies the line author.

endingLine (Int!)

The ending line for the range.

startingLine (Int!)

The starting line for the range.

Blob

Object

Represents a Git blob.

Blob Implements

Fields for Blob

NameDescription

abbreviatedOid (String!)

An abbreviated version of the Git object ID.

byteSize (Int!)

Byte size of Blob object.

commitResourcePath (URI!)

The HTTP path for this Git object.

commitUrl (URI!)

The HTTP URL for this Git object.

id (ID!)

The Node ID of the Blob object.

isBinary (Boolean)

Indicates whether the Blob is binary or text. Returns null if unable to determine the encoding.

isTruncated (Boolean!)

Indicates whether the contents is truncated.

oid (GitObjectID!)

The Git object ID.

repository (Repository!)

The Repository the Git object belongs to.

text (String)

UTF8 text data or null if the Blob is binary.

GitActor

Object

Represents an actor in a Git commit (ie. an author or committer).

Fields for GitActor

NameDescription

avatarUrl (URI!)

A URL pointing to the author's public avatar.

Arguments for avatarUrl

  • size (Int)

    The size of the resulting square image.

date (GitTimestamp)

The timestamp of the Git action (authoring or committing).

email (String)

The email in the Git commit.

name (String)

The name in the Git commit.

user (User)

The GitHub user corresponding to the email field. Null if no such user exists.

GitActorConnection

Object

The connection type for GitActor.

Fields for GitActorConnection

NameDescription

edges ([GitActorEdge])

A list of edges.

nodes ([GitActor])

A list of nodes.

pageInfo (PageInfo!)

Information to aid in pagination.

totalCount (Int!)

Identifies the total count of items in the connection.

GitActorEdge

Object

An edge in a connection.

Fields for GitActorEdge

NameDescription

cursor (String!)

A cursor for use in pagination.

node (GitActor)

The item at the end of the edge.

GpgSignature

Object

Represents a GPG signature on a Commit or Tag.

GpgSignature Implements

Fields for GpgSignature

NameDescription

email (String!)

Email used to sign this object.

isValid (Boolean!)

True if the signature is valid and verified by GitHub.

keyId (String)

Hex-encoded ID of the key that signed this object.

payload (String!)

Payload for GPG signing object. Raw ODB object without the signature header.

signature (String!)

ASCII-armored signature header from object.

signer (User)

GitHub user corresponding to the email signing this commit.

state (GitSignatureState!)

The state of this signature. VALID if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.

verifiedAt (