You are here

public function Github_Api_Repo::addRepoCollaborator in Bibliography Module 7.2

Add a collaborator to a repository http://develop.github.com/p/repo.html

Parameters

string $repo the name of the repo:

string $username the user who should be added as a collaborator:

Return value

array list of the repo collaborators

File

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

Class

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

Code

public function addRepoCollaborator($repo, $username) {
  $response = $this
    ->post('repos/collaborators/' . urlencode($repo) . '/add/' . urlencode($username));
  return $response['collaborators'];
}