Listing issues, searching, editing and closing your projects issues. Wraps GitHub Issue API.
Additional APIs:
$issues = $client->api('issue')->all('KnpLabs', 'php-github-api', array('state' => 'open'));Returns an array of issues.
$result = $client->api('search')->issues('repo:KnpLabs/php-github-api is:issue is:closed bug');
$issues = $result['items'];Uses the Search API to find closed issues in this repository matching the "bug" term. The search response contains total_count, incomplete_results, and items; $issues contains the issues from the returned page. The is:issue qualifier excludes pull requests.
$issue = $client->api('issue')->show('KnpLabs', 'php-github-api', 1);Returns an array of information about the issue.
Requires authentication.
$client->api('issue')->create('KnpLabs', 'php-github-api-example', array('title' => 'The issue title', 'body' => 'The issue body'));Creates a new issue in the repo "php-github-api-example" (the repository in this example does not exist) of the user "KnpLabs". The issue is assigned to the authenticated user. Returns an array of information about the issue.
Requires authentication.
$client->api('issue')->update('KnpLabs', 'php-github-api', 4, array('state' => 'closed'));Closes the fourth issue of the repo "php-github-api" of the user "KnpLabs". Returns an array of information about the issue.
Requires authentication.
$client->api('issue')->update('KnpLabs', 'php-github-api', 4, array('state' => 'open'));Reopens the fourth issue of the repo "php-github-api" of the user "KnpLabs". Returns an array of information about the issue.
Requires authentication.
$client->api('issue')->update('KnpLabs', 'php-github-api', 4, array('body' => 'The new issue body'));Updates the fourth issue of the repo "php-github-api" of the user "KnpLabs". Available attributes are title and body. Returns an array of information about the issue.
$client->api('issue')->all('KnpLabs', 'php-github-api', array('labels' => 'label name'));Returns an array of issues matching the given label.
$client->api('issue')->lock('KnpLabs', 'php-github-api', 4);$client->api('issue')->unlock('KnpLabs', 'php-github-api', 4);