From 5266b821446b14b79a3c5a5c77c57791b985f0a9 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 28 Dec 2014 22:22:15 -0500 Subject: Add Gitlab webhook --- app/Action/TaskClose.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'app/Action/TaskClose.php') 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'); -- cgit v1.2.3