Move Github Webhook to external plugin
See: https://github.com/kanboard/plugin-github-webhook
This commit is contained in:
@@ -40,25 +40,6 @@ class Webhook extends Base
|
||||
$this->response->text('FAILED');
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Github webhooks
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function github()
|
||||
{
|
||||
$this->checkWebhookToken();
|
||||
|
||||
$this->githubWebhook->setProjectId($this->request->getIntegerParam('project_id'));
|
||||
|
||||
$result = $this->githubWebhook->parsePayload(
|
||||
$this->request->getHeader('X-Github-Event'),
|
||||
$this->request->getJson()
|
||||
);
|
||||
|
||||
echo $result ? 'PARSED' : 'IGNORED';
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Gitlab webhooks
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user