projects
/
pharext
/
pharext.org
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
prepare url
[pharext/pharext.org]
/
app
/
Github
/
Create
/
Webhook.php
diff --git
a/app/Github/Create/Webhook.php
b/app/Github/Create/Webhook.php
index 6e583fcd91c88428dd4439f7d6c3b803a20c3259..72ff2d705e8016d843fdbc71568113b203eabb4a 100644
(file)
--- a/
app/Github/Create/Webhook.php
+++ b/
app/Github/Create/Webhook.php
@@
-15,13
+15,22
@@
class Webhook extends Create
"Content-Type" => "application/json",
"Authorization" => "token " . $this->api->getToken(),
]);
"Content-Type" => "application/json",
"Authorization" => "token " . $this->api->getToken(),
]);
+
+ if (!empty($this->args["conf"]["tag"])) {
+ $events[] = "create";
+ }
+ if (!empty($this->args["conf"]["release"])) {
+ $events[] = "release";
+ }
+
$request->getBody()->append(json_encode([
"name" => "web",
$request->getBody()->append(json_encode([
"name" => "web",
+ "events" => $events,
"config" => [
"url" => $this->config->hook->url,
"content_type" => $this->config->hook->content_type,
"config" => [
"url" => $this->config->hook->url,
"content_type" => $this->config->hook->content_type,
+ "insecure_ssl" => $this->config->hook->insecure_ssl,
"secret" => $this->config->client->secret, // FIXME: bad idea?
"secret" => $this->config->client->secret, // FIXME: bad idea?
- "insecure_ssl" => false,
]
]));
return $request;
]
]));
return $request;