Method to create a pull request.
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.
Method to create a comment on a pull request.
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.
Method to create a comment in reply to another comment.
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.
Method to create a pull request from an existing issue.
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.
Method to delete a comment on a pull request.
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.
Method to update a pull request.
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]
Method to update a comment on a pull request.
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.
Method to get a single pull request.
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.
Method to get a specific comment on a pull request.
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.
Method to get the list of comments on a pull request.
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.
Method to get a list of commits for a pull request.
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.
Method to get a list of files for a pull request.
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.
Method to list pull requests.
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.
Method to check if a pull request has been merged.
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.
Method to merge a pull request.
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()