You are here

public function Github_Api_Issue::open in Bibliography Module 7.2

Create a new issue for the given username and repo. The issue is assigned to the authenticated user. Requires authentication. http://develop.github.com/p/issues.html#open_and_close_issues

Parameters

string $username the username:

string $repo the repo:

string $issueTitle the new issue title:

string $issueBody the new issue body:

Return value

array information about the issue

File

modules/CiteProc/Github/Api/Issue.php, line 87

Class

Github_Api_Issue
Listing issues, searching, editing and closing your projects issues.

Code

public function open($username, $repo, $issueTitle, $issueBody) {
  $response = $this
    ->post('issues/open/' . urlencode($username) . '/' . urlencode($repo), array(
    'title' => $issueTitle,
    'body' => $issueBody,
  ));
  return $response['issue'];
}