projects
/
pharext
/
pharext.org
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
8b207c9
)
use a 202 if the asset was already published
author
Michael Wallner
<mike@php.net>
Wed, 3 Jun 2015 11:40:05 +0000
(13:40 +0200)
committer
Michael Wallner
<mike@php.net>
Wed, 3 Jun 2015 11:40:05 +0000
(13:40 +0200)
app/Controller/Github/Hook/Receive.php
patch
|
blob
|
history
diff --git
a/app/Controller/Github/Hook/Receive.php
b/app/Controller/Github/Hook/Receive.php
index 1ac998477d3493898fa98716caf903653358f271..4af889993cb58d8a45ce66131519b437573cd7e1 100644
(file)
--- 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();
function release($release) {
if ($release->action !== "published") {
$response = $this->app->getResponse();
-
$response->setResponseCode(202);
$response->getBody()->append("Not published");
return;
$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 */
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;
}
}
return;
}
}