You are here

public function Github_Api_Repo::addDeployKey in Bibliography Module 7.2

Add a deploy key for a repository

Parameters

string $repo the name of the repo:

string $title the title of the key:

string $key the public key data:

Return value

array the list of deploy keys

File

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

Class

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

Code

public function addDeployKey($repo, $title, $key) {
  $response = $this
    ->post('repos/key/' . urlencode($repo) . '/add', array(
    'title' => $title,
    'key' => $key,
  ));
  return $response['public_keys'];
}