X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=app%2FController%2FGithub%2FHook%2FReceive.php;h=4af889993cb58d8a45ce66131519b437573cd7e1;hb=8218e7f0e7eed6bba889dee119e4db7a9b236a86;hp=1ac998477d3493898fa98716caf903653358f271;hpb=8b207c90c6c49876775ab61908f45510baf9981a;p=pharext%2Fpharext.org diff --git a/app/Controller/Github/Hook/Receive.php b/app/Controller/Github/Hook/Receive.php index 1ac9984..4af8899 100644 --- a/app/Controller/Github/Hook/Receive.php +++ b/app/Controller/Github/Hook/Receive.php @@ -67,7 +67,6 @@ class Receive implements Controller function release($release) { if ($release->action !== "published") { $response = $this->app->getResponse(); - $response->setResponseCode(202); $response->getBody()->append("Not published"); return; @@ -76,6 +75,9 @@ class Receive implements Controller foreach ($release->release->assets as $asset) { if ($asset->content_type === "application/phar") { /* we've already uploaded the asset when we created the release */ + $response = $this->app->getResponse(); + $response->setResponseCode(202); + $response->getBody()->append("Already published"); return; } }