From 8218e7f0e7eed6bba889dee119e4db7a9b236a86 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 3 Jun 2015 13:40:05 +0200 Subject: [PATCH] use a 202 if the asset was already published --- app/Controller/Github/Hook/Receive.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } } -- 2.30.2