Move Github Webhook to external plugin
See: https://github.com/kanboard/plugin-github-webhook
This commit is contained in:
@@ -265,9 +265,12 @@ abstract class Base extends \Kanboard\Core\Base
|
||||
* @param string $event
|
||||
* @param string $description
|
||||
*/
|
||||
public function addEvent($event, $description)
|
||||
public function addEvent($event, $description = '')
|
||||
{
|
||||
$this->eventManager->register($event, $description);
|
||||
if ($description !== '') {
|
||||
$this->eventManager->register($event, $description);
|
||||
}
|
||||
|
||||
$this->compatibleEvents[] = $event;
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Kanboard\Action;
|
||||
|
||||
use Kanboard\Integration\BitbucketWebhook;
|
||||
use Kanboard\Integration\GithubWebhook;
|
||||
use Kanboard\Integration\GitlabWebhook;
|
||||
|
||||
/**
|
||||
@@ -34,8 +33,6 @@ class CommentCreation extends Base
|
||||
public function getCompatibleEvents()
|
||||
{
|
||||
return array(
|
||||
GithubWebhook::EVENT_ISSUE_COMMENT,
|
||||
GithubWebhook::EVENT_COMMIT,
|
||||
BitbucketWebhook::EVENT_ISSUE_COMMENT,
|
||||
BitbucketWebhook::EVENT_COMMIT,
|
||||
GitlabWebhook::EVENT_COMMIT,
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace Kanboard\Action;
|
||||
|
||||
use Kanboard\Integration\GithubWebhook;
|
||||
|
||||
/**
|
||||
* Set a category automatically according to a label
|
||||
*
|
||||
@@ -31,9 +29,7 @@ class TaskAssignCategoryLabel extends Base
|
||||
*/
|
||||
public function getCompatibleEvents()
|
||||
{
|
||||
return array(
|
||||
GithubWebhook::EVENT_ISSUE_LABEL_CHANGE,
|
||||
);
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Kanboard\Action;
|
||||
|
||||
use Kanboard\Integration\GithubWebhook;
|
||||
use Kanboard\Integration\BitbucketWebhook;
|
||||
|
||||
/**
|
||||
@@ -33,7 +32,6 @@ class TaskAssignUser extends Base
|
||||
public function getCompatibleEvents()
|
||||
{
|
||||
return array(
|
||||
GithubWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE,
|
||||
BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace Kanboard\Action;
|
||||
|
||||
use Kanboard\Integration\GitlabWebhook;
|
||||
use Kanboard\Integration\GithubWebhook;
|
||||
use Kanboard\Integration\BitbucketWebhook;
|
||||
use Kanboard\Model\Task;
|
||||
|
||||
@@ -35,8 +34,6 @@ class TaskClose extends Base
|
||||
public function getCompatibleEvents()
|
||||
{
|
||||
return array(
|
||||
GithubWebhook::EVENT_COMMIT,
|
||||
GithubWebhook::EVENT_ISSUE_CLOSED,
|
||||
GitlabWebhook::EVENT_COMMIT,
|
||||
GitlabWebhook::EVENT_ISSUE_CLOSED,
|
||||
BitbucketWebhook::EVENT_COMMIT,
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Kanboard\Action;
|
||||
|
||||
use Kanboard\Integration\GithubWebhook;
|
||||
use Kanboard\Integration\GitlabWebhook;
|
||||
use Kanboard\Integration\BitbucketWebhook;
|
||||
|
||||
@@ -34,7 +33,6 @@ class TaskCreation extends Base
|
||||
public function getCompatibleEvents()
|
||||
{
|
||||
return array(
|
||||
GithubWebhook::EVENT_ISSUE_OPENED,
|
||||
GitlabWebhook::EVENT_ISSUE_OPENED,
|
||||
BitbucketWebhook::EVENT_ISSUE_OPENED,
|
||||
);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Kanboard\Action;
|
||||
|
||||
use Kanboard\Integration\GithubWebhook;
|
||||
use Kanboard\Integration\GitlabWebhook;
|
||||
use Kanboard\Integration\BitbucketWebhook;
|
||||
|
||||
@@ -34,7 +33,6 @@ class TaskOpen extends Base
|
||||
public function getCompatibleEvents()
|
||||
{
|
||||
return array(
|
||||
GithubWebhook::EVENT_ISSUE_REOPENED,
|
||||
GitlabWebhook::EVENT_ISSUE_REOPENED,
|
||||
BitbucketWebhook::EVENT_ISSUE_REOPENED,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user