class JGithubPackageDataCommits extends JGithubPackage

GitHub API Data Commits class for the Joomla Platform.

Methods

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

__get( string $name)

Magic method to lazily create API objects

object
get( string $owner, string $repo, string $sha)

Get a single commit.

object
create( string $owner, string $repo, string $message, string $tree, array $parents = array())

Method to create a commit.

Details

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

Parameters

Registry $options GitHub options object.
JGithubHttp $client The HTTP client object.

JGithubPackage __get( string $name)

Magic method to lazily create API objects

Parameters

string $name Name of property to retrieve

Return Value

JGithubPackage GitHub API package object.

Exceptions

RuntimeException

object get( string $owner, string $repo, string $sha)

Get a single commit.

Parameters

string $owner The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $sha The commit SHA.

Return Value

object

object create( string $owner, string $repo, string $message, string $tree, array $parents = array())

Method to create a commit.

Parameters

string $owner The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $message The commit message.
string $tree SHA of the tree object this commit points to.
array $parents Array of 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.

Return Value

object

Exceptions

DomainException