Get a Commit by sha
Get a Commit by sha
to identify the authenticated user
optional user headers to include in the request
of the repo
name of the repo
the sha of the commit
a GHResponse with the Commit
Create a new Blob
Create a new Blob
to identify the authenticated user
optional user headers to include in the request
of the repo
name of the repo
the new blob's content.
the encoding used for content. Currently, "utf-8" and "base64" are supported. Default: "utf-8".
a GHResponse with RefObject
Create a new Commit
Create a new Commit
to identify the authenticated user
optional user headers to include in the request
of the repo
name of the repo
the new commit's message.
the SHA of the tree object this commit points to
the SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided.
object containing information about the author.
a GHResponse with RefCommit
Create a Reference
Create a Reference
The ref in the URL must be formatted as heads/branch
, not just branch.
For example, the call to get the data for master
branch will be heads/master
.
to identify the authenticated user
optional user headers to include in the request
of the repo
name of the repo
The name of the fully qualified reference (ie: refs/heads/master). If it doesn't start with 'refs' and have at least two slashes, it will be rejected.
the SHA1 value to set this reference to
a GHResponse with the Ref
Create a Tag
Create a Tag
to identify the authenticated user
optional user headers to include in the request
of the repo
name of the repo
the tag.
the new tag message.
the SHA of the git object this is tagging
the type of the object we're tagging.
Normally this is a commit
but it can also be a tree
or a blob
.
object containing information about the individual creating the tag.
a GHResponse with Tag
Create a new Tree
Create a new Tree
The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out.
IMPORTANT: If you don't set the baseTree, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted.
to identify the authenticated user
optional user headers to include in the request
of the repo
name of the repo
the SHA1 of the tree you want to update with new data.
list (of path, mode, type, and sha/blob) specifying a tree structure:
a GHResponse with TreeResult
Get a Reference by name
Get a Reference by name
The ref in the URL must be formatted as heads/branch
, not just branch.
For example, the call to get the data for master
branch will be heads/master
.
If the ref
doesn't exist in the repository, but existing refs
start with ref
they will be
returned as an array. For example, a call to get the data for a branch named feature
,
which doesn't exist, would return head refs including featureA
and featureB
which do.
to identify the authenticated user
optional user headers to include in the request
of the repo
name of the repo
ref formatted as heads/branch
a GHResponse with the Ref list
Update a Reference
Update a Reference
to identify the authenticated user
optional user headers to include in the request
of the repo
name of the repo
ref formatted as heads/branch
the SHA1 value to set this reference to
Indicates whether to force the update or to make sure the update is a fast-forward update.
Leaving this out or setting it to false
will make sure you're not overwriting work. Default: false
a GHResponse with the Ref
Factory that encapsulates all the Git Database API calls