summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-10-25 18:13:13 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-10-25 18:13:13 -0400
commitc4e6d658e4099bd8152c77a76f486809693205f5 (patch)
tree3f40b34076fe62843023877e463c8538f2339053 /app/Controller
parent7af67934cf67d40e1471b519ecdf06343203c6f6 (diff)
Finish github webhooks integration
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Project.php1
-rw-r--r--app/Controller/Webhook.php4
2 files changed, 4 insertions, 1 deletions
diff --git a/app/Controller/Project.php b/app/Controller/Project.php
index d749ef53..c5f16496 100644
--- a/app/Controller/Project.php
+++ b/app/Controller/Project.php
@@ -54,6 +54,7 @@ class Project extends Base
$this->response->html($this->projectLayout('project_show', array(
'project' => $project,
'stats' => $this->project->getStats($project['id']),
+ 'webhook_token' => $this->config->get('webhook_token'),
'title' => $project['name'],
)));
}
diff --git a/app/Controller/Webhook.php b/app/Controller/Webhook.php
index 71acab08..fa9c5834 100644
--- a/app/Controller/Webhook.php
+++ b/app/Controller/Webhook.php
@@ -55,9 +55,11 @@ class Webhook extends Base
$this->githubWebhook->setProjectId($this->request->getIntegerParam('project_id'));
- $this->githubWebhook->parsePayload(
+ $result = $this->githubWebhook->parsePayload(
$this->request->getHeader('X-Github-Event'),
$this->request->getBody()
);
+
+ echo $result ? 'PARSED' : 'IGNORED';
}
}