From: Michael Wallner Date: Wed, 12 Aug 2015 18:31:22 +0000 (+0200) Subject: mirror right at the ping X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=0b76b04916c36dbeff9560381cec9f94d27f59d2;p=m6w6%2Freplicator mirror right at the ping --- diff --git a/public/mirror.php b/public/mirror.php index 57970db..27f3c61 100644 --- a/public/mirror.php +++ b/public/mirror.php @@ -37,15 +37,12 @@ switch ($evt) { $response->getBody()->append("Not a configured event"); break; case "ping"; - $response->setResponseCode(204); - $response->setResponseStatus("PONG"); - break; case "push": if (!($json = json_decode($request->getBody()))) { $response->setResponseCode(415); $response->setContentType($request->getHeader("Content-Type")); $response->getBody()->append($request->getBody()); - } elseif (!in_array($json->repository->owner->name, $owners, true)) { + } elseif (!in_array(isset($json->repository->owner->name)?$json->repository->owner->name:$json->repository->owner->login, $owners, true)) { $response->setResponseCode(403); $response->getBody()->append("Invalid owner"); } else {