You are here

public function Github_Api_Issue::addLabel in Bibliography Module 7.2

Add a label to the issue by username, repo and issue number. Requires authentication. http://develop.github.com/p/issues.html#add_and_remove_labels

Parameters

string $username the username:

string $repo the repo:

string $issueNumber the issue number:

string $labelName the label name:

Return value

array list of issue labels

File

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

Class

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

Code

public function addLabel($username, $repo, $labelName, $issueNumber) {
  $response = $this
    ->post('issues/label/add/' . urlencode($username) . '/' . urlencode($repo) . '/' . urlencode($labelName) . '/' . urlencode($issueNumber));
  return $response['labels'];
}