diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-06 21:46:31 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-06 21:46:31 -0500 |
commit | 00e5a4c5b40610ec849567d30f88e3ab8d0720fb (patch) | |
tree | 49138feec30136c9ff432b7d61659e976a27211d /app/Action | |
parent | a03e4d4dcb4ebce06671465c9a7bd7e51ba2ef79 (diff) |
Move Github Webhook to external plugin
See: https://github.com/kanboard/plugin-github-webhook
Diffstat (limited to 'app/Action')
-rw-r--r-- | app/Action/Base.php | 7 | ||||
-rw-r--r-- | app/Action/CommentCreation.php | 3 | ||||
-rw-r--r-- | app/Action/TaskAssignCategoryLabel.php | 6 | ||||
-rw-r--r-- | app/Action/TaskAssignUser.php | 2 | ||||
-rw-r--r-- | app/Action/TaskClose.php | 3 | ||||
-rw-r--r-- | app/Action/TaskCreation.php | 2 | ||||
-rw-r--r-- | app/Action/TaskOpen.php | 2 |
7 files changed, 6 insertions, 19 deletions
diff --git a/app/Action/Base.php b/app/Action/Base.php index febd6cfc..1298aec2 100644 --- a/app/Action/Base.php +++ b/app/Action/Base.php @@ -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; } diff --git a/app/Action/CommentCreation.php b/app/Action/CommentCreation.php index d6ea2074..d7051d4d 100644 --- a/app/Action/CommentCreation.php +++ b/app/Action/CommentCreation.php @@ -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, diff --git a/app/Action/TaskAssignCategoryLabel.php b/app/Action/TaskAssignCategoryLabel.php index 8d291e89..95fa116e 100644 --- a/app/Action/TaskAssignCategoryLabel.php +++ b/app/Action/TaskAssignCategoryLabel.php @@ -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(); } /** diff --git a/app/Action/TaskAssignUser.php b/app/Action/TaskAssignUser.php index bb3a83c2..0b4b55f5 100644 --- a/app/Action/TaskAssignUser.php +++ b/app/Action/TaskAssignUser.php @@ -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, ); } diff --git a/app/Action/TaskClose.php b/app/Action/TaskClose.php index a4b093a4..216d0f17 100644 --- a/app/Action/TaskClose.php +++ b/app/Action/TaskClose.php @@ -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, diff --git a/app/Action/TaskCreation.php b/app/Action/TaskCreation.php index 23ff4592..909ee78c 100644 --- a/app/Action/TaskCreation.php +++ b/app/Action/TaskCreation.php @@ -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, ); diff --git a/app/Action/TaskOpen.php b/app/Action/TaskOpen.php index a1ab622c..5cb626c3 100644 --- a/app/Action/TaskOpen.php +++ b/app/Action/TaskOpen.php @@ -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, ); |