You are here

public function Github_Api_Repo::getRepoContributors in Bibliography Module 7.2

Get the contributors of a repository http://develop.github.com/p/repo.html

Parameters

string $username the user who owns the repo:

string $repo the name of the repo:

boolean $includingNonGithubUsers by default, the list only shows GitHub users. You can include non-users too by setting this to true:

Return value

array list of the repo contributors

File

modules/CiteProc/Github/Api/Repo.php, line 389

Class

Github_Api_Repo
Searching repositories, getting repository information and managing repository information for authenticated users.

Code

public function getRepoContributors($username, $repo, $includingNonGithubUsers = false) {
  $url = 'repos/show/' . urlencode($username) . '/' . urlencode($repo) . '/contributors';
  if ($includingNonGithubUsers) {
    $url .= '/anon';
  }
  $response = $this
    ->get($url);
  return $response['contributors'];
}