Add Bitbucket webhook

This commit is contained in:
Frederic Guillot
2015-02-08 21:13:59 -05:00
parent 02f7c8d33d
commit 6f94ce6af3
24 changed files with 279 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ namespace Action;
use Integration\GitlabWebhook;
use Integration\GithubWebhook;
use Integration\BitbucketWebhook;
use Model\Task;
/**
@@ -28,6 +29,7 @@ class TaskClose extends Base
GithubWebhook::EVENT_ISSUE_CLOSED,
GitlabWebhook::EVENT_COMMIT,
GitlabWebhook::EVENT_ISSUE_CLOSED,
BitbucketWebhook::EVENT_COMMIT,
);
}
@@ -44,6 +46,7 @@ class TaskClose extends Base
case GithubWebhook::EVENT_ISSUE_CLOSED:
case GitlabWebhook::EVENT_COMMIT:
case GitlabWebhook::EVENT_ISSUE_CLOSED:
case BitbucketWebhook::EVENT_COMMIT:
return array();
default:
return array('column_id' => t('Column'));
@@ -63,6 +66,7 @@ class TaskClose extends Base
case GithubWebhook::EVENT_ISSUE_CLOSED:
case GitlabWebhook::EVENT_COMMIT:
case GitlabWebhook::EVENT_ISSUE_CLOSED:
case BitbucketWebhook::EVENT_COMMIT:
return array('task_id');
default:
return array('task_id', 'column_id');
@@ -95,6 +99,7 @@ class TaskClose extends Base
case GithubWebhook::EVENT_ISSUE_CLOSED:
case GitlabWebhook::EVENT_COMMIT:
case GitlabWebhook::EVENT_ISSUE_CLOSED:
case BitbucketWebhook::EVENT_COMMIT:
return true;
default:
return $data['column_id'] == $this->getParam('column_id');