diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-12-28 22:22:15 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-12-28 22:22:15 -0500 |
commit | 5266b821446b14b79a3c5a5c77c57791b985f0a9 (patch) | |
tree | df0719492193e0ba842430edbbab8cd02775fbc5 /app/Action | |
parent | d6530bd55fdd863f0cf153bc2854fb4e34076316 (diff) |
Add Gitlab webhook
Diffstat (limited to 'app/Action')
-rw-r--r-- | app/Action/CommentCreation.php | 2 | ||||
-rw-r--r-- | app/Action/TaskAssignCategoryLabel.php | 2 | ||||
-rw-r--r-- | app/Action/TaskAssignUser.php | 2 | ||||
-rw-r--r-- | app/Action/TaskClose.php | 11 | ||||
-rw-r--r-- | app/Action/TaskCreation.php | 4 | ||||
-rw-r--r-- | app/Action/TaskOpen.php | 2 |
6 files changed, 17 insertions, 6 deletions
diff --git a/app/Action/CommentCreation.php b/app/Action/CommentCreation.php index 5dbe32f1..27ed011b 100644 --- a/app/Action/CommentCreation.php +++ b/app/Action/CommentCreation.php @@ -2,7 +2,7 @@ namespace Action; -use Model\GithubWebhook; +use Integration\GithubWebhook; /** * Create automatically a comment from a webhook diff --git a/app/Action/TaskAssignCategoryLabel.php b/app/Action/TaskAssignCategoryLabel.php index 19064526..1383d491 100644 --- a/app/Action/TaskAssignCategoryLabel.php +++ b/app/Action/TaskAssignCategoryLabel.php @@ -2,7 +2,7 @@ namespace Action; -use Model\GithubWebhook; +use Integration\GithubWebhook; /** * Set a category automatically according to a label diff --git a/app/Action/TaskAssignUser.php b/app/Action/TaskAssignUser.php index f24ff415..cf2a9a4b 100644 --- a/app/Action/TaskAssignUser.php +++ b/app/Action/TaskAssignUser.php @@ -2,7 +2,7 @@ namespace Action; -use Model\GithubWebhook; +use Integration\GithubWebhook; /** * Assign a task to someone diff --git a/app/Action/TaskClose.php b/app/Action/TaskClose.php index 6cf9be05..760dfd84 100644 --- a/app/Action/TaskClose.php +++ b/app/Action/TaskClose.php @@ -2,7 +2,8 @@ namespace Action; -use Model\GithubWebhook; +use Integration\GitlabWebhook; +use Integration\GithubWebhook; use Model\Task; /** @@ -25,6 +26,8 @@ class TaskClose extends Base Task::EVENT_MOVE_COLUMN, GithubWebhook::EVENT_COMMIT, GithubWebhook::EVENT_ISSUE_CLOSED, + GitlabWebhook::EVENT_COMMIT, + GitlabWebhook::EVENT_ISSUE_CLOSED, ); } @@ -39,6 +42,8 @@ class TaskClose extends Base switch ($this->event_name) { case GithubWebhook::EVENT_COMMIT: case GithubWebhook::EVENT_ISSUE_CLOSED: + case GitlabWebhook::EVENT_COMMIT: + case GitlabWebhook::EVENT_ISSUE_CLOSED: return array(); default: return array('column_id' => t('Column')); @@ -56,6 +61,8 @@ class TaskClose extends Base switch ($this->event_name) { case GithubWebhook::EVENT_COMMIT: case GithubWebhook::EVENT_ISSUE_CLOSED: + case GitlabWebhook::EVENT_COMMIT: + case GitlabWebhook::EVENT_ISSUE_CLOSED: return array('task_id'); default: return array('task_id', 'column_id'); @@ -86,6 +93,8 @@ class TaskClose extends Base switch ($this->event_name) { case GithubWebhook::EVENT_COMMIT: case GithubWebhook::EVENT_ISSUE_CLOSED: + case GitlabWebhook::EVENT_COMMIT: + case GitlabWebhook::EVENT_ISSUE_CLOSED: return true; default: return $data['column_id'] == $this->getParam('column_id'); diff --git a/app/Action/TaskCreation.php b/app/Action/TaskCreation.php index 9b7a0b13..1c093eee 100644 --- a/app/Action/TaskCreation.php +++ b/app/Action/TaskCreation.php @@ -2,7 +2,8 @@ namespace Action; -use Model\GithubWebhook; +use Integration\GithubWebhook; +use Integration\GitlabWebhook; /** * Create automatically a task from a webhook @@ -22,6 +23,7 @@ class TaskCreation extends Base { return array( GithubWebhook::EVENT_ISSUE_OPENED, + GitlabWebhook::EVENT_ISSUE_OPENED, ); } diff --git a/app/Action/TaskOpen.php b/app/Action/TaskOpen.php index fc29e9eb..73f1fad3 100644 --- a/app/Action/TaskOpen.php +++ b/app/Action/TaskOpen.php @@ -2,7 +2,7 @@ namespace Action; -use Model\GithubWebhook; +use Integration\GithubWebhook; /** * Open automatically a task |