diff --git a/lib/api/phpGitHubApiIssue.php b/lib/api/phpGitHubApiIssue.php index e2e408e..f5f6cb9 100755 --- a/lib/api/phpGitHubApiIssue.php +++ b/lib/api/phpGitHubApiIssue.php @@ -45,6 +45,21 @@ public function search($username, $repo, $state, $searchTerm) return $response['issues']; } + /** + * Search issues by label + * + * @param string $username the username + * @param string $repo the repo + * @param string $label the label to filter issues by + * @return array list of issues found + */ + public function searchLabel($username, $repo, $label) + { + $response = $this->api->get('issues/list/'.urlencode($username).'/'.urlencode($repo).'/label/'.urlencode($label)); + + return $response['issues']; + } + /** * Get extended information about an issue by its username, repo and number * http://develop.github.com/p/issues.html#view_an_issue