Class JGithubPulls

Description

GitHub API Pull Requests class for the Joomla Platform.

  • since: 11.3

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

JGithubObject
   |
   --JGithubPulls
Method Summary
 object create (string $user, string $repo, string $title, string $base, string $head, [string $body = ''])
 object createComment (string $user, string $repo, integer $pullId, string $body, string $commitId, string $filePath, string $position)
 object createCommentReply (string $user, string $repo, integer $pullId, string $body, integer $inReplyTo)
 object createFromIssue (string $user, string $repo, integer $issueId, string $base, string $head)
 void deleteComment (string $user, string $repo, integer $commentId)
 object edit (string $user, string $repo, integer $pullId, [string $title = null], [string $body = null], [string $state = null])
 object editComment (string $user, string $repo, integer $commentId, string $body)
 object get (string $user, string $repo, integer $pullId)
 object getComment (string $user, string $repo, integer $commentId)
 array getComments (string $user, string $repo, integer $pullId, [integer $page = 0], [integer $limit = 0])
 array getCommits (string $user, string $repo, integer $pullId, [integer $page = 0], [integer $limit = 0])
 array getFiles (string $user, string $repo, integer $pullId, [integer $page = 0], [integer $limit = 0])
 array getList (string $user, string $repo, [string $state = 'open'], [integer $page = 0], [integer $limit = 0])
 boolean isMerged (string $user, string $repo, integer $pullId)
 object merge (string $user, string $repo, integer $pullId, [string $message = ''])
Variables

Inherited Variables

Inherited from JGithubObject

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

Method to create a pull request.

  • since: 11.3
  • access: public
object create (string $user, string $repo, string $title, string $base, string $head, [string $body = ''])
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • string $title: The title of the new pull request.
  • string $base: The branch (or git ref) you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repo that requests a merge to a base of another repo.
  • string $head: The branch (or git ref) where your changes are implemented.
  • string $body: The body text for the new pull request.
createComment (line 82)

Method to create a comment on a pull request.

  • since: 11.3
  • access: public
object createComment (string $user, string $repo, integer $pullId, string $body, string $commitId, string $filePath, string $position)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $pullId: The pull request number.
  • string $body: The comment body text.
  • string $commitId: The SHA1 hash of the commit to comment on.
  • string $filePath: The Relative path of the file to comment on.
  • string $position: The line index in the diff to comment on.
createCommentReply (line 124)

Method to create a comment in reply to another comment.

  • since: 11.3
  • access: public
object createCommentReply (string $user, string $repo, integer $pullId, string $body, integer $inReplyTo)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $pullId: The pull request number.
  • string $body: The comment body text.
  • integer $inReplyTo: The id of the comment to reply to.
createFromIssue (line 167)

Method to create a pull request from an existing issue.

  • since: 11.3
  • access: public
object createFromIssue (string $user, string $repo, integer $issueId, string $base, string $head)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $issueId: The issue number for which to attach the new pull request.
  • string $base: The branch (or git ref) you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repo that requests a merge to a base of another repo.
  • string $head: The branch (or git ref) where your changes are implemented.
deleteComment (line 206)

Method to delete a comment on a pull request.

  • since: 11.3
  • access: public
void deleteComment (string $user, string $repo, integer $commentId)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $commentId: The id of the comment to delete.
edit (line 237)

Method to update a pull request.

  • since: 11.3
  • access: public
object edit (string $user, string $repo, integer $pullId, [string $title = null], [string $body = null], [string $state = null])
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $pullId: The pull request number.
  • string $title: The optional new title for the pull request.
  • string $body: The optional new body text for the pull request.
  • string $state: The optional new state for the pull request. [open, closed]
editComment (line 292)

Method to update a comment on a pull request.

  • since: 11.3
  • access: public
object editComment (string $user, string $repo, integer $commentId, string $body)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $commentId: The id of the comment to update.
  • string $body: The new body text for the comment.
get (line 329)

Method to get a single pull request.

  • since: 11.3
  • access: public
object get (string $user, string $repo, integer $pullId)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $pullId: The pull request number.
getComment (line 359)

Method to get a specific comment on a pull request.

  • since: 11.3
  • access: public
object getComment (string $user, string $repo, integer $commentId)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $commentId: The comment id to get.
getComments (line 391)

Method to get the list of comments on a pull request.

  • since: 11.3
  • access: public
array getComments (string $user, string $repo, integer $pullId, [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 $pullId: The pull request number.
  • integer $page: The page number from which to get items.
  • integer $limit: The number of items on a page.
getCommits (line 423)

Method to get a list of commits for a pull request.

  • since: 11.3
  • access: public
array getCommits (string $user, string $repo, integer $pullId, [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 $pullId: The pull request number.
  • integer $page: The page number from which to get items.
  • integer $limit: The number of items on a page.
getFiles (line 455)

Method to get a list of files for a pull request.

  • since: 11.3
  • access: public
array getFiles (string $user, string $repo, integer $pullId, [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 $pullId: The pull request number.
  • integer $page: The page number from which to get items.
  • integer $limit: The number of items on a page.
getList (line 487)

Method to list pull requests.

  • since: 11.3
  • access: public
array getList (string $user, string $repo, [string $state = 'open'], [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 $state: The optional state to filter requests by. [open, closed]
  • integer $page: The page number from which to get items.
  • integer $limit: The number of items on a page.
isMerged (line 523)

Method to check if a pull request has been merged.

  • return: True if the pull request has been merged.
  • since: 11.3
  • access: public
boolean isMerged (string $user, string $repo, integer $pullId)
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $pullId: The pull request number. The pull request number.
merge (line 560)

Method to merge a pull request.

  • since: 11.3
  • access: public
object merge (string $user, string $repo, integer $pullId, [string $message = ''])
  • string $user: The name of the owner of the GitHub repository.
  • string $repo: The name of the GitHub repository.
  • integer $pullId: The pull request number.
  • string $message: The message that will be used for the merge commit.

Inherited Methods

Inherited From JGithubObject

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

Documentation generated on Tue, 19 Nov 2013 15:11:24 +0100 by phpDocumentor 1.4.3