Finish github webhooks integration
This commit is contained in:
@@ -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'],
|
||||
)));
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user