mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
vcs.createRepository()
This commit is contained in:
1 parent
860b4fb1c0
commit
a174562c4e
6 files changed
+196
-52
No files matched your search
@@ -208,4 +208,15 @@ class Github extends OAuth2
|
||||
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
public function createRepository(string $accessToken, string $repositoryName, bool $private): array
|
||||
{
|
||||
$repository = $this->request('POST', 'https://api.github.com/user/repos', ['Authorization: token ' . \urlencode($accessToken)], \json_encode([
|
||||
'name' => $repositoryName,
|
||||
'private' => $private
|
||||
]));
|
||||
|
||||
$repository = \json_decode($repository, true);
|
||||
return $repository;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user