Add Gitlab webhook
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Action;
|
||||
|
||||
use Model\GithubWebhook;
|
||||
use Integration\GithubWebhook;
|
||||
|
||||
/**
|
||||
* Create automatically a comment from a webhook
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Action;
|
||||
|
||||
use Model\GithubWebhook;
|
||||
use Integration\GithubWebhook;
|
||||
|
||||
/**
|
||||
* Set a category automatically according to a label
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Action;
|
||||
|
||||
use Model\GithubWebhook;
|
||||
use Integration\GithubWebhook;
|
||||
|
||||
/**
|
||||
* Assign a task to someone
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Action;
|
||||
|
||||
use Model\GithubWebhook;
|
||||
use Integration\GithubWebhook;
|
||||
|
||||
/**
|
||||
* Open automatically a task
|
||||
|
||||
Reference in New Issue
Block a user