Class Github\Api\PullRequest

InheritanceGithub\Api\PullRequest » Github\Api\AbstractApi
ImplementsGithub\Api\ApiInterface

API for accessing Pull Requests from your Git/Github repositories.

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
createJsonBody() Create a JSON encoded version of an array of parameters. Github\Api\AbstractApi
delete() Send a DELETE request with JSON-encoded parameters. Github\Api\AbstractApi
get() Send a GET request with query parameters. Github\Api\AbstractApi
head() Send a HEAD request with query parameters. Github\Api\AbstractApi
patch() Send a PATCH request with JSON-encoded parameters. Github\Api\AbstractApi
post() Send a POST request with JSON-encoded parameters. Github\Api\AbstractApi
postRaw() Send a POST request with raw data. Github\Api\AbstractApi
put() Send a PUT request with JSON-encoded parameters. Github\Api\AbstractApi

Method Details

all() public method

Get a listing of a project's pull requests by the username, repository and (optionally) state.

public array all ( $username, $repository, array $params = [] )
$username string

The username

$repository string

The repository

$params array

A list of extra parameters.

return array

Array of pull requests for the project

comments() public method

public void comments ( )
commits() public method

public void commits ( $username, $repository, $id )
$username
$repository
$id
create() public method

Create a pull request.

public array create ( $username, $repository, array $params )
$username string

The username

$repository string

The repository

$params array

A String of the branch or commit SHA that you want your changes to be pulled to.

                      A String of the branch or commit SHA of your changes. Typically this will be a branch.
                      If the branch is in a fork of the original repository, specify the username first:
                      "my-user:some-branch". The String title of the Pull Request. The String body of
                      the Pull Request. The issue number. Used when title and body is not set.
throws Github\Exception\MissingArgumentException
files() public method

public void files ( $username, $repository, $id )
$username
$repository
$id
merge() public method

public void merge ( $username, $repository, $id, $message '' )
$username
$repository
$id
$message
merged() public method

public void merged ( $username, $repository, $id )
$username
$repository
$id
show() public method

Show all details of a pull request, including the discussions.

public array show ( $username, $repository, $id )
$username string

The username

$repository string

The repository

$id string

The ID of the pull request for which details are retrieved

return array

Array of pull requests for the project

update() public method

public void update ( $username, $repository, $id, array $params )
$username
$repository
$id
$params