Move Github Webhook to external plugin

See: https://github.com/kanboard/plugin-github-webhook
This commit is contained in:
Frederic Guillot
2016-01-06 21:46:31 -05:00
parent a03e4d4dcb
commit 00e5a4c5b4
47 changed files with 10 additions and 2698 deletions

View File

@@ -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;
}

View File

@@ -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,

View File

@@ -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();
}
/**

View File

@@ -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,
);
}

View File

@@ -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,

View File

@@ -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,
);

View File

@@ -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,
);