|
@@ -12,7 +12,8 @@ require "./src/gpac.php";
|
|
|
use Gogs\Lib\Curl\Exception as ApiException;
|
|
|
|
|
|
define('API_URL', 'https://git.giaever.org/api/v1');
|
|
|
-define('API_TOKEN', '142efbfd6fbdf147f03d289f8b22a438eaa1b5d1');
|
|
|
+
|
|
|
+define('API_TOKEN', 'e14b9eff0749b6f0c4cadf4bb72b83d44578ae28');
|
|
|
|
|
|
$client = new Gogs\API\Client(API_URL, API_TOKEN);
|
|
|
|
|
@@ -94,6 +95,7 @@ try {
|
|
|
|
|
|
$orgs = $me->orgs()->load();
|
|
|
|
|
|
+
|
|
|
try {
|
|
|
echo "\nCreate organization\n";
|
|
|
$org = $orgs->create(
|
|
@@ -105,7 +107,7 @@ try {
|
|
|
throw new ApiException\NotAuthorizedException("Creating organization", $e->getCode(), $e);
|
|
|
} catch (ApiException\HTTPUnexpectedResponse $e) {
|
|
|
echo $e->getResponse();
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
echo "\nLooking up organizations of test-" . $me->username . "\n";
|
|
|
foreach($orgs->search(array("name" => "test-" . $me->username))->all() as $key => $org)
|