Class JGithubCommits

Description

GitHub API Commits class for the Joomla Platform.

  • since: 12.1

Located in /libraries/joomla/github/commits.php (line 19)

JGithubObject
   |
   --JGithubCommits
Method Summary
 object create (string $user, string $repo, string $message, string $tree, [array $parents = array()])
 object createCommitComment (string $user, string $repo, string $sha, string $comment, integer $line, string $filepath, integer $position)
 object deleteCommitComment (string $user, string $repo, string $id)
 object editCommitComment (string $user, string $repo, string $id, string $comment)
 array getCommit (string $user, string $repo, string $sha, [integer $page = 0], [integer $limit = 0])
 array getCommitComment (string $user, string $repo, integer $id)
 array getCommitComments (string $user, string $repo, string $sha, [integer $page = 0], [integer $limit = 0])
 array getDiff (string $user, string $repo, string $base, string $head)
 array getList (string $user, string $repo, [integer $page = 0], [integer $limit = 0])
 array getListComments (string $user, string $repo, [integer $page = 0], [integer $limit = 0])
Variables

Inherited Variables

Inherited from JGithubObject

JGithubObject::$client
JGithubObject::$options
Methods
create (line 37)

Method to create a commit.

  • since: 12.1
  • access: public
object create (string $user, string $repo, string $message, string $tree, [array $parents = array()])
  • string $user: 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.
createCommitComment (line 75)

Method to create a comment on a commit.

  • since: 12.1
  • access: public
object createCommitComment (string $user, string $repo, string $sha, string $comment, integer $line, string $filepath, integer $position)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • string $sha: The SHA of the commit to comment on.
  • string $comment: The text of the comment.
  • integer $line: The line number of the commit to comment on.
  • string $filepath: A relative path to the file to comment on within the commit.
  • integer $position: Line index in the diff to comment on.
deleteCommitComment (line 115)

Method to delete a comment on a commit.

  • since: 12.1
  • access: public
object deleteCommitComment (string $user, string $repo, string $id)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • string $id: The ID of the comment to edit.
editCommitComment (line 146)

Method to edit a comment on a commit.

  • since: 12.1
  • access: public
object editCommitComment (string $user, string $repo, string $id, string $comment)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • string $id: The ID of the comment to edit.
  • string $comment: The text of the comment.
getCommit (line 184)

Method to get a single commit for a repository.

  • since: 12.1
  • access: public
array getCommit (string $user, string $repo, string $sha, [integer $page = 0], [integer $limit = 0])
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • string $sha: The SHA of the commit to retrieve.
  • integer $page: Page to request
  • integer $limit: Number of results to return per page
getCommitComment (line 214)

Method to get a single comment on a commit.

  • since: 12.1
  • access: public
array getCommitComment (string $user, string $repo, integer $id)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $id: ID of the comment to retrieve
getCommitComments (line 246)

Method to get a list of comments for a single commit for a repository.

  • since: 12.1
  • access: public
array getCommitComments (string $user, string $repo, string $sha, [integer $page = 0], [integer $limit = 0])
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • string $sha: The SHA of the commit to retrieve.
  • integer $page: Page to request
  • integer $limit: Number of results to return per page
getDiff (line 277)

Method to get a diff for two commits.

  • since: 12.1
  • access: public
array getDiff (string $user, string $repo, string $base, string $head)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • string $base: The base of the diff, either a commit SHA or branch.
  • string $head: The head of the diff, either a commit SHA or branch.
getList (line 308)

Method to list commits for a repository.

  • since: 12.1
  • access: public
array getList (string $user, string $repo, [integer $page = 0], [integer $limit = 0])
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $page: Page to request
  • integer $limit: Number of results to return per page
getListComments (line 339)

Method to get a list of commit comments for a repository.

  • since: 12.1
  • access: public
array getListComments (string $user, string $repo, [integer $page = 0], [integer $limit = 0])
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $page: Page to request
  • integer $limit: Number of results to return per page

Inherited Methods

Inherited From JGithubObject

 JGithubObject::__construct()
 JGithubObject::fetchUrl()
 JGithubObject::processResponse()

Documentation generated on Tue, 19 Nov 2013 14:56:07 +0100 by phpDocumentor 1.4.3