projects
/
pharext
/
pharext.org
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix hooks
[pharext/pharext.org]
/
app
/
Github
/
API
/
Hooks
/
CreateHook.php
diff --git
a/app/Github/API/Hooks/CreateHook.php
b/app/Github/API/Hooks/CreateHook.php
index 325dca7fc32528a4e435724c4e7eea7a53bed0d4..866e93964236bdd12bccdb95c2025d5db3368553 100644
(file)
--- a/
app/Github/API/Hooks/CreateHook.php
+++ b/
app/Github/API/Hooks/CreateHook.php
@@
-15,7
+15,8
@@
class CreateHook extends Call
"Accept" => $this->config->api->accept,
"Content-Type" => "application/json",
]);
"Accept" => $this->config->api->accept,
"Content-Type" => "application/json",
]);
-
+
+ $events = [];
if (!empty($this->args["conf"]["tag"])) {
$events[] = "create";
}
if (!empty($this->args["conf"]["tag"])) {
$events[] = "create";
}
@@
-35,7
+36,7
@@
class CreateHook extends Call
]));
$this->api->getClient()->enqueue($request, function($response) use($callback) {
]));
$this->api->getClient()->enqueue($request, function($response) use($callback) {
- if ($response->getRe
esponseCode() !
= 400 || null === ($json = json_decode($response->getBody()))) {
+ if ($response->getRe
sponseCode() >
= 400 || null === ($json = json_decode($response->getBody()))) {
throw new RequestException($response);
}
$callback($json);
throw new RequestException($response);
}
$callback($json);