diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-07 20:16:05 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-07 20:16:05 -0500 |
commit | 54b3cfe8a14e99ab2372fc5095facc3a2259f077 (patch) | |
tree | 3af8286c3bead5ff0a50895b9298a30dc9742b8e | |
parent | 1ef6e6c2bf39234993b825d4b974301470c49e83 (diff) |
Move bitbucket webhook to an external plugin
45 files changed, 2 insertions, 2388 deletions
@@ -8,6 +8,7 @@ Breaking changes: * Action name stored in the database is now the absolute class name * Core functionalities moved to external plugins: - Github Webhook: https://github.com/kanboard/plugin-github-webhook + - Bitbucket Webhook: https://github.com/kanboard/plugin-bitbucket-webhook New features: diff --git a/app/Action/CommentCreation.php b/app/Action/CommentCreation.php index d7051d4d..e08ef47f 100644 --- a/app/Action/CommentCreation.php +++ b/app/Action/CommentCreation.php @@ -2,7 +2,6 @@ namespace Kanboard\Action; -use Kanboard\Integration\BitbucketWebhook; use Kanboard\Integration\GitlabWebhook; /** @@ -33,8 +32,6 @@ class CommentCreation extends Base public function getCompatibleEvents() { return array( - BitbucketWebhook::EVENT_ISSUE_COMMENT, - BitbucketWebhook::EVENT_COMMIT, GitlabWebhook::EVENT_COMMIT, GitlabWebhook::EVENT_ISSUE_COMMENT, ); diff --git a/app/Action/TaskAssignUser.php b/app/Action/TaskAssignUser.php index 0b4b55f5..da54d186 100644 --- a/app/Action/TaskAssignUser.php +++ b/app/Action/TaskAssignUser.php @@ -2,8 +2,6 @@ namespace Kanboard\Action; -use Kanboard\Integration\BitbucketWebhook; - /** * Assign a task to someone * @@ -31,9 +29,7 @@ class TaskAssignUser extends Base */ public function getCompatibleEvents() { - return array( - BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, - ); + return array(); } /** diff --git a/app/Action/TaskClose.php b/app/Action/TaskClose.php index 216d0f17..7f8af786 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\BitbucketWebhook; use Kanboard\Model\Task; /** @@ -36,8 +35,6 @@ class TaskClose extends Base return array( GitlabWebhook::EVENT_COMMIT, GitlabWebhook::EVENT_ISSUE_CLOSED, - BitbucketWebhook::EVENT_COMMIT, - BitbucketWebhook::EVENT_ISSUE_CLOSED, ); } diff --git a/app/Action/TaskCreation.php b/app/Action/TaskCreation.php index 909ee78c..8daa6726 100644 --- a/app/Action/TaskCreation.php +++ b/app/Action/TaskCreation.php @@ -3,7 +3,6 @@ namespace Kanboard\Action; use Kanboard\Integration\GitlabWebhook; -use Kanboard\Integration\BitbucketWebhook; /** * Create automatically a task from a webhook @@ -34,7 +33,6 @@ class TaskCreation extends Base { return array( GitlabWebhook::EVENT_ISSUE_OPENED, - BitbucketWebhook::EVENT_ISSUE_OPENED, ); } diff --git a/app/Action/TaskOpen.php b/app/Action/TaskOpen.php index 5cb626c3..efbcb874 100644 --- a/app/Action/TaskOpen.php +++ b/app/Action/TaskOpen.php @@ -3,7 +3,6 @@ namespace Kanboard\Action; use Kanboard\Integration\GitlabWebhook; -use Kanboard\Integration\BitbucketWebhook; /** * Open automatically a task @@ -34,7 +33,6 @@ class TaskOpen extends Base { return array( GitlabWebhook::EVENT_ISSUE_REOPENED, - BitbucketWebhook::EVENT_ISSUE_REOPENED, ); } diff --git a/app/Controller/Webhook.php b/app/Controller/Webhook.php index 82e9d635..be8bf030 100644 --- a/app/Controller/Webhook.php +++ b/app/Controller/Webhook.php @@ -54,23 +54,4 @@ class Webhook extends Base echo $result ? 'PARSED' : 'IGNORED'; } - - /** - * Handle Bitbucket webhooks - * - * @access public - */ - public function bitbucket() - { - $this->checkWebhookToken(); - - $this->bitbucketWebhook->setProjectId($this->request->getIntegerParam('project_id')); - - $result = $this->bitbucketWebhook->parsePayload( - $this->request->getHeader('X-Event-Key'), - $this->request->getJson() - ); - - echo $result ? 'PARSED' : 'IGNORED'; - } } diff --git a/app/Core/Base.php b/app/Core/Base.php index 88029f69..bbc51c50 100644 --- a/app/Core/Base.php +++ b/app/Core/Base.php @@ -45,7 +45,6 @@ use Pimple\Container; * @property \Kanboard\Core\Lexer $lexer * @property \Kanboard\Core\Paginator $paginator * @property \Kanboard\Core\Template $template - * @property \Kanboard\Integration\BitbucketWebhook $bitbucketWebhook * @property \Kanboard\Integration\GitlabWebhook $gitlabWebhook * @property \Kanboard\Formatter\ProjectGanttFormatter $projectGanttFormatter * @property \Kanboard\Formatter\TaskFilterGanttFormatter $taskFilterGanttFormatter diff --git a/app/Core/Event/EventManager.php b/app/Core/Event/EventManager.php index dd70f847..34a70900 100644 --- a/app/Core/Event/EventManager.php +++ b/app/Core/Event/EventManager.php @@ -3,7 +3,6 @@ namespace Kanboard\Core\Event; use Kanboard\Integration\GitlabWebhook; -use Kanboard\Integration\BitbucketWebhook; use Kanboard\Model\Task; use Kanboard\Model\TaskLink; @@ -59,12 +58,6 @@ class EventManager GitlabWebhook::EVENT_ISSUE_REOPENED => t('Gitlab issue reopened'), GitlabWebhook::EVENT_ISSUE_CLOSED => t('Gitlab issue closed'), GitlabWebhook::EVENT_ISSUE_COMMENT => t('Gitlab issue comment created'), - BitbucketWebhook::EVENT_COMMIT => t('Bitbucket commit received'), - BitbucketWebhook::EVENT_ISSUE_OPENED => t('Bitbucket issue opened'), - BitbucketWebhook::EVENT_ISSUE_CLOSED => t('Bitbucket issue closed'), - BitbucketWebhook::EVENT_ISSUE_REOPENED => t('Bitbucket issue reopened'), - BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE => t('Bitbucket issue assignee change'), - BitbucketWebhook::EVENT_ISSUE_COMMENT => t('Bitbucket issue comment created'), ); $events = array_merge($events, $this->events); diff --git a/app/Integration/BitbucketWebhook.php b/app/Integration/BitbucketWebhook.php deleted file mode 100644 index e6ba3f1a..00000000 --- a/app/Integration/BitbucketWebhook.php +++ /dev/null @@ -1,312 +0,0 @@ -<?php - -namespace Kanboard\Integration; - -use Kanboard\Event\GenericEvent; - -/** - * Bitbucket Webhook - * - * @package integration - * @author Frederic Guillot - */ -class BitbucketWebhook extends \Kanboard\Core\Base -{ - /** - * Events - * - * @var string - */ - const EVENT_COMMIT = 'bitbucket.webhook.commit'; - const EVENT_ISSUE_OPENED = 'bitbucket.webhook.issue.opened'; - const EVENT_ISSUE_CLOSED = 'bitbucket.webhook.issue.closed'; - const EVENT_ISSUE_REOPENED = 'bitbucket.webhook.issue.reopened'; - const EVENT_ISSUE_ASSIGNEE_CHANGE = 'bitbucket.webhook.issue.assignee'; - const EVENT_ISSUE_COMMENT = 'bitbucket.webhook.issue.commented'; - - /** - * Project id - * - * @access private - * @var integer - */ - private $project_id = 0; - - /** - * Set the project id - * - * @access public - * @param integer $project_id Project id - */ - public function setProjectId($project_id) - { - $this->project_id = $project_id; - } - - /** - * Parse incoming events - * - * @access public - * @param string $type Bitbucket event type - * @param array $payload Bitbucket event - * @return boolean - */ - public function parsePayload($type, array $payload) - { - switch ($type) { - case 'issue:comment_created': - return $this->handleCommentCreated($payload); - case 'issue:created': - return $this->handleIssueOpened($payload); - case 'issue:updated': - return $this->handleIssueUpdated($payload); - case 'repo:push': - return $this->handlePush($payload); - } - - return false; - } - - /** - * Parse comment issue events - * - * @access public - * @param array $payload - * @return boolean - */ - public function handleCommentCreated(array $payload) - { - $task = $this->taskFinder->getByReference($this->project_id, $payload['issue']['id']); - - if (! empty($task)) { - $user = $this->user->getByUsername($payload['actor']['username']); - - if (! empty($user) && ! $this->projectPermission->isAssignable($this->project_id, $user['id'])) { - $user = array(); - } - - $event = array( - 'project_id' => $this->project_id, - 'reference' => $payload['comment']['id'], - 'comment' => $payload['comment']['content']['raw']."\n\n[".t('By @%s on Bitbucket', $payload['actor']['display_name']).']('.$payload['comment']['links']['html']['href'].')', - 'user_id' => ! empty($user) ? $user['id'] : 0, - 'task_id' => $task['id'], - ); - - $this->container['dispatcher']->dispatch( - self::EVENT_ISSUE_COMMENT, - new GenericEvent($event) - ); - - return true; - } - - return false; - } - - /** - * Handle new issues - * - * @access public - * @param array $payload - * @return boolean - */ - public function handleIssueOpened(array $payload) - { - $event = array( - 'project_id' => $this->project_id, - 'reference' => $payload['issue']['id'], - 'title' => $payload['issue']['title'], - 'description' => $payload['issue']['content']['raw']."\n\n[".t('Bitbucket Issue').']('.$payload['issue']['links']['html']['href'].')', - ); - - $this->container['dispatcher']->dispatch( - self::EVENT_ISSUE_OPENED, - new GenericEvent($event) - ); - - return true; - } - - /** - * Handle issue updates - * - * @access public - * @param array $payload - * @return boolean - */ - public function handleIssueUpdated(array $payload) - { - $task = $this->taskFinder->getByReference($this->project_id, $payload['issue']['id']); - - if (empty($task)) { - return false; - } - - if (isset($payload['changes']['status'])) { - return $this->handleStatusChange($task, $payload); - } elseif (isset($payload['changes']['assignee'])) { - return $this->handleAssigneeChange($task, $payload); - } - - return false; - } - - /** - * Handle issue status change - * - * @access public - * @param array $task - * @param array $payload - * @return boolean - */ - public function handleStatusChange(array $task, array $payload) - { - $event = array( - 'project_id' => $this->project_id, - 'task_id' => $task['id'], - 'reference' => $payload['issue']['id'], - ); - - switch ($payload['issue']['state']) { - case 'closed': - $this->container['dispatcher']->dispatch(self::EVENT_ISSUE_CLOSED, new GenericEvent($event)); - return true; - case 'open': - $this->container['dispatcher']->dispatch(self::EVENT_ISSUE_REOPENED, new GenericEvent($event)); - return true; - } - - return false; - } - - /** - * Handle issue assignee change - * - * @access public - * @param array $task - * @param array $payload - * @return boolean - */ - public function handleAssigneeChange(array $task, array $payload) - { - if (empty($payload['issue']['assignee'])) { - return $this->handleIssueUnassigned($task, $payload); - } - - return $this->handleIssueAssigned($task, $payload); - } - - /** - * Handle issue assigned - * - * @access public - * @param array $task - * @param array $payload - * @return boolean - */ - public function handleIssueAssigned(array $task, array $payload) - { - $user = $this->user->getByUsername($payload['issue']['assignee']['username']); - - if (empty($user)) { - return false; - } - - if (! $this->projectPermission->isAssignable($this->project_id, $user['id'])) { - return false; - } - - $event = array( - 'project_id' => $this->project_id, - 'task_id' => $task['id'], - 'owner_id' => $user['id'], - 'reference' => $payload['issue']['id'], - ); - - $this->container['dispatcher']->dispatch(self::EVENT_ISSUE_ASSIGNEE_CHANGE, new GenericEvent($event)); - - return true; - } - - /** - * Handle issue unassigned - * - * @access public - * @param array $task - * @param array $payload - * @return boolean - */ - public function handleIssueUnassigned(array $task, array $payload) - { - $event = array( - 'project_id' => $this->project_id, - 'task_id' => $task['id'], - 'owner_id' => 0, - 'reference' => $payload['issue']['id'], - ); - - $this->container['dispatcher']->dispatch(self::EVENT_ISSUE_ASSIGNEE_CHANGE, new GenericEvent($event)); - - return true; - } - - /** - * Parse push events - * - * @access public - * @param array $payload - * @return boolean - */ - public function handlePush(array $payload) - { - if (isset($payload['push']['changes'])) { - foreach ($payload['push']['changes'] as $change) { - if (isset($change['new']['target']) && $this->handleCommit($change['new']['target'], $payload['actor'])) { - return true; - } - } - } - - return false; - } - - /** - * Parse commit - * - * @access public - * @param array $commit Bitbucket commit - * @param array $actor Bitbucket actor - * @return boolean - */ - public function handleCommit(array $commit, array $actor) - { - $task_id = $this->task->getTaskIdFromText($commit['message']); - - if (empty($task_id)) { - return false; - } - - $task = $this->taskFinder->getById($task_id); - - if (empty($task)) { - return false; - } - - if ($task['project_id'] != $this->project_id) { - return false; - } - - $this->container['dispatcher']->dispatch( - self::EVENT_COMMIT, - new GenericEvent(array( - 'task_id' => $task_id, - 'commit_message' => $commit['message'], - 'commit_url' => $commit['links']['html']['href'], - 'comment' => $commit['message']."\n\n[".t('Commit made by @%s on Bitbucket', $actor['display_name']).']('.$commit['links']['html']['href'].')', - ) + $task) - ); - - return true; - } -} diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php index f58c3d6b..50b17c1b 100644 --- a/app/Locale/bs_BA/translations.php +++ b/app/Locale/bs_BA/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Već imaš jedan pod-zadatak "u radu"', 'Which parts of the project do you want to duplicate?' => 'Koje delove projekta želiš duplicirati?', 'Disallow login form' => 'Zabrani prijavnu formu', - 'Bitbucket commit received' => 'Bitbucket: commit dobijen', - 'Bitbucket webhooks' => 'Bitbucket: webhooks', - 'Help on Bitbucket webhooks' => 'Pomoć na Bitbucket webhooks', 'Start' => 'Početak', 'End' => 'Kraj', 'Task age in days' => 'Trajanje zadatka u danima', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'Korisnik će dobiti email', 'Email subject' => 'Predmet email-a', 'Date' => 'Datum', - 'By @%s on Bitbucket' => 'Od @%s na Bitbucket', - 'Bitbucket Issue' => 'Bitbucket problem', - 'Commit made by @%s on Bitbucket' => 'Commit-ao @%s na Bitbucket', - 'Commit made by @%s on Gitlab' => 'Commit-ao @%s na Gitlab', 'Add a comment log when moving the task between columns' => 'Dodaj komentar u dnevnik kada se pomjeri zadatak između kolona', 'Move the task to another column when the category is changed' => 'Pomjeri zadatak u drugu kolonu kada je kategorija promijenjena', 'Send a task by email to someone' => 'Pošalji zadatak nekome emailom', 'Reopen a task' => 'Ponovo otvori zadatak', - 'Bitbucket issue opened' => 'Bitbucket: otvoren problem', - 'Bitbucket issue closed' => 'Bitbucket: zatvoren problem', - 'Bitbucket issue reopened' => 'Bitbucket: problem ponovo otvoren', - 'Bitbucket issue assignee change' => 'Bitbucket: promijenjen izvršilac problema', - 'Bitbucket issue comment created' => 'Bitbucket: dodan komentar na problemu', 'Column change' => 'Promijena kolone', 'Position change' => 'Promjena pozicije', 'Swimlane change' => 'Promjena swimline trake', diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php index 9b65bd3b..8baba251 100644 --- a/app/Locale/cs_CZ/translations.php +++ b/app/Locale/cs_CZ/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Jeden dílčí úkol již aktuálně řešíte', 'Which parts of the project do you want to duplicate?' => 'Které části projektu chcete duplikovat?', // 'Disallow login form' => '', - 'Bitbucket commit received' => 'Bitbucket commit erhalten', - 'Bitbucket webhooks' => 'Bitbucket webhooks', - 'Help on Bitbucket webhooks' => 'Hilfe für Bitbucket webhooks', 'Start' => 'Začátek', 'End' => 'Konec', 'Task age in days' => 'Doba trvání úkolu ve dnech', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'Uživatel, který dostane E-mail', 'Email subject' => 'E-mail Předmět', 'Date' => 'Datum', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', 'Add a comment log when moving the task between columns' => 'Přidat komentář když je úkol přesouván mezi sloupci', 'Move the task to another column when the category is changed' => 'Přesun úkolu do jiného sloupce když je změněna kategorie', 'Send a task by email to someone' => 'Poslat někomu úkol poštou', 'Reopen a task' => 'Znovu otevřít úkol', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', 'Column change' => 'Spalte geändert', 'Position change' => 'Position geändert', 'Swimlane change' => 'Swimlane geändert', diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php index 99cf7ffb..dd531abb 100644 --- a/app/Locale/da_DK/translations.php +++ b/app/Locale/da_DK/translations.php @@ -578,9 +578,6 @@ return array( // 'You already have one subtask in progress' => '', // 'Which parts of the project do you want to duplicate?' => '', // 'Disallow login form' => '', - // 'Bitbucket commit received' => '', - // 'Bitbucket webhooks' => '', - // 'Help on Bitbucket webhooks' => '', // 'Start' => '', // 'End' => '', // 'Task age in days' => '', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php index cbdc1fde..263e0421 100644 --- a/app/Locale/de_DE/translations.php +++ b/app/Locale/de_DE/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Bereits eine Teilaufgabe in Bearbeitung', 'Which parts of the project do you want to duplicate?' => 'Welcher Teil des Projekts soll kopiert werden?', 'Disallow login form' => 'Verbiete Login-Formular', - 'Bitbucket commit received' => 'Bitbucket-Commit erhalten', - 'Bitbucket webhooks' => 'Bitbucket-Webhooks', - 'Help on Bitbucket webhooks' => 'Hilfe für Bitbucket-Webhooks', 'Start' => 'Start', 'End' => 'Ende', 'Task age in days' => 'Aufgabenalter in Tagen', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'Empfänger der E-Mail', 'Email subject' => 'E-Mail-Betreff', 'Date' => 'Datum', - 'By @%s on Bitbucket' => 'Durch @%s auf Bitbucket', - 'Bitbucket Issue' => 'Bitbucket-Issue', - 'Commit made by @%s on Bitbucket' => 'Commit von @%s auf Bitbucket', - 'Commit made by @%s on Gitlab' => 'Commit von @%s auf Gitlab', 'Add a comment log when moving the task between columns' => 'Kommentar hinzufügen, wenn Aufgabe in andere Spalte verschoben wird', 'Move the task to another column when the category is changed' => 'Aufgabe in andere Spalte verschieben, wenn Kategorie geändert wird', 'Send a task by email to someone' => 'Aufgabe per E-Mail versenden', 'Reopen a task' => 'Aufgabe wieder öffnen', - 'Bitbucket issue opened' => 'Bitbucket Ticket eröffnet', - 'Bitbucket issue closed' => 'Bitbucket Ticket geschlossen', - 'Bitbucket issue reopened' => 'Bitbucket Ticket wieder eröffnet', - 'Bitbucket issue assignee change' => 'Bitbucket Ticket Zuordnung geändert', - 'Bitbucket issue comment created' => 'Bitbucket Ticket Kommentar erstellt', 'Column change' => 'Spalte geändert', 'Position change' => 'Position geändert', 'Swimlane change' => 'Swimlane geändert', diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php index 03a62976..aa08e35c 100644 --- a/app/Locale/es_ES/translations.php +++ b/app/Locale/es_ES/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Ya dispones de una subtarea en progreso', 'Which parts of the project do you want to duplicate?' => '¿Qué partes del proyecto desea duplicar?', 'Disallow login form' => 'Deshabilitar formulario de ingreso', - 'Bitbucket commit received' => 'Recibido envío desde Bitbucket', - 'Bitbucket webhooks' => 'Disparadores Web (webhooks) de Bitbucket', - 'Help on Bitbucket webhooks' => 'Ayuda sobre disparadores web (webhooks) de Bitbucket', 'Start' => 'Inicio', 'End' => 'Fin', 'Task age in days' => 'Edad de la tarea en días', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'Usuario que recibirá el correo', 'Email subject' => 'Asunto del correo', 'Date' => 'Fecha', - 'By @%s on Bitbucket' => 'Mediante @%s en Bitbucket', - 'Bitbucket Issue' => 'Asunto de Bitbucket', - 'Commit made by @%s on Bitbucket' => 'Envío realizado por @%s en Bitbucket', - 'Commit made by @%s on Gitlab' => 'Envío realizado por @%s en Gitlab', 'Add a comment log when moving the task between columns' => 'Añadir un comentario al mover la tarea entre columnas', 'Move the task to another column when the category is changed' => 'Mover la tarea a otra columna cuando cambia la categoría', 'Send a task by email to someone' => 'Enviar una tarea a alguien por correo', 'Reopen a task' => 'Reabrir tarea', - 'Bitbucket issue opened' => 'Abierto asunto de Bitbucket', - 'Bitbucket issue closed' => 'Cerrado asunto de Bitbucket', - 'Bitbucket issue reopened' => 'Reabierto asunto de Bitbucket', - 'Bitbucket issue assignee change' => 'Cambiado concesionario de asunto de Bitbucket', - 'Bitbucket issue comment created' => 'Creado comentario de asunto de Bitbucket', 'Column change' => 'Cambio de columna', 'Position change' => 'Cambio de posición', 'Swimlane change' => 'Cambio de calle', diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php index 1e72850d..e1a14749 100644 --- a/app/Locale/fi_FI/translations.php +++ b/app/Locale/fi_FI/translations.php @@ -578,9 +578,6 @@ return array( // 'You already have one subtask in progress' => '', // 'Which parts of the project do you want to duplicate?' => '', // 'Disallow login form' => '', - // 'Bitbucket commit received' => '', - // 'Bitbucket webhooks' => '', - // 'Help on Bitbucket webhooks' => '', // 'Start' => '', // 'End' => '', // 'Task age in days' => '', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php index 1d85232b..f974584f 100644 --- a/app/Locale/fr_FR/translations.php +++ b/app/Locale/fr_FR/translations.php @@ -580,9 +580,6 @@ return array( 'You already have one subtask in progress' => 'Vous avez déjà une sous-tâche en progrès', 'Which parts of the project do you want to duplicate?' => 'Quelles parties du projet voulez-vous dupliquer ?', 'Disallow login form' => 'Interdire le formulaire d\'authentification', - 'Bitbucket commit received' => 'Commit reçu via Bitbucket', - 'Bitbucket webhooks' => 'Webhook Bitbucket', - 'Help on Bitbucket webhooks' => 'Aide sur les webhooks Bitbucket', 'Start' => 'Début', 'End' => 'Fin', 'Task age in days' => 'Âge de la tâche en jours', @@ -752,19 +749,10 @@ return array( 'User that will receive the email' => 'Utilisateur qui va reçevoir l\'email', 'Email subject' => 'Sujet de l\'email', 'Date' => 'Date', - 'By @%s on Bitbucket' => 'Par @%s sur Bitbucket', - 'Bitbucket Issue' => 'Ticket Bitbucket', - 'Commit made by @%s on Bitbucket' => 'Commit fait par @%s sur Bitbucket', - 'Commit made by @%s on Gitlab' => 'Commit fait par @%s sur Gitlab', 'Add a comment log when moving the task between columns' => 'Ajouter un commentaire d\'information lorsque une tâche est déplacée dans une autre colonne', 'Move the task to another column when the category is changed' => 'Déplacer une tâche vers une autre colonne lorsque la catégorie a changé', 'Send a task by email to someone' => 'Envoyer une tâche par email à quelqu\'un', 'Reopen a task' => 'Rouvrir une tâche', - 'Bitbucket issue opened' => 'Ticket Bitbucket ouvert', - 'Bitbucket issue closed' => 'Ticket Bitbucket fermé', - 'Bitbucket issue reopened' => 'Ticket Bitbucket rouvert', - 'Bitbucket issue assignee change' => 'Changement d\'assigné sur un ticket Bitbucket', - 'Bitbucket issue comment created' => 'Commentaire créé sur un ticket Bitbucket', 'Column change' => 'Changement de colonne', 'Position change' => 'Changement de position', 'Swimlane change' => 'Changement de swimlane', diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php index 1c220016..392ead6c 100644 --- a/app/Locale/hu_HU/translations.php +++ b/app/Locale/hu_HU/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Már van egy folyamatban levő részfeladata', 'Which parts of the project do you want to duplicate?' => 'A projekt mely részeit szeretné másolni?', // 'Disallow login form' => '', - 'Bitbucket commit received' => 'Bitbucket commit érkezett', - 'Bitbucket webhooks' => 'Bitbucket webhooks', - 'Help on Bitbucket webhooks' => 'Bitbucket webhooks súgó', 'Start' => 'Kezdet', 'End' => 'Vég', 'Task age in days' => 'Feladat életkora napokban', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php index b9e8948d..9640abfb 100644 --- a/app/Locale/id_ID/translations.php +++ b/app/Locale/id_ID/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Anda sudah ada satu subtugas dalam proses', 'Which parts of the project do you want to duplicate?' => 'Bagian dalam proyek mana yang ingin anda duplikasi?', 'Disallow login form' => 'Larang formulir masuk', - 'Bitbucket commit received' => 'Menerima komit Bitbucket', - 'Bitbucket webhooks' => 'Webhook Bitbucket', - 'Help on Bitbucket webhooks' => 'Bantuan pada webhook Bitbucket', 'Start' => 'Mulai', 'End' => 'Selesai', 'Task age in days' => 'Usia tugas dalam hari', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'Pengguna yang akan menerima email', 'Email subject' => 'Subjek Email', 'Date' => 'Tanggal', - 'By @%s on Bitbucket' => 'Oleh @%s pada Bitbucket', - 'Bitbucket Issue' => 'Tiket Bitbucket', - 'Commit made by @%s on Bitbucket' => 'Komit dibuat oleh @%s pada Bitbucket', - 'Commit made by @%s on Gitlab' => 'Komit dibuat oleh @%s pada Gitlab', 'Add a comment log when moving the task between columns' => 'Menambahkan log komentar ketika memindahkan tugas antara kolom', 'Move the task to another column when the category is changed' => 'Pindahkan tugas ke kolom lain ketika kategori berubah', 'Send a task by email to someone' => 'Kirim tugas melalui email ke seseorang', 'Reopen a task' => 'Membuka kembali tugas', - 'Bitbucket issue opened' => 'Tiket Bitbucket dibuka', - 'Bitbucket issue closed' => 'Tiket Bitbucket ditutup', - 'Bitbucket issue reopened' => 'Tiket Bitbucket dibuka kembali', - 'Bitbucket issue assignee change' => 'Perubahan penugasan tiket Bitbucket', - 'Bitbucket issue comment created' => 'Komentar dibuat tiket Bitbucket', 'Column change' => 'Kolom berubah', 'Position change' => 'Posisi berubah', 'Swimlane change' => 'Swimlane berubah', diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php index 4d01d70c..81d1853f 100644 --- a/app/Locale/it_IT/translations.php +++ b/app/Locale/it_IT/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Hai già un sotto-compito in progresso', 'Which parts of the project do you want to duplicate?' => 'Quali parti del progetto vuoi duplicare?', // 'Disallow login form' => '', - 'Bitbucket commit received' => 'Commit ricevuto da Bitbucket', - 'Bitbucket webhooks' => 'Webhooks di Bitbucket', - 'Help on Bitbucket webhooks' => 'Guida ai Webhooks di Bitbucket', 'Start' => 'Inizio', 'End' => 'Fine', 'Task age in days' => 'Anzianità del compito in giorni', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php index f98d96ee..3b24f224 100644 --- a/app/Locale/ja_JP/translations.php +++ b/app/Locale/ja_JP/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'すでに進行中のサブタスクがあります。', 'Which parts of the project do you want to duplicate?' => 'プロジェクトの何を複製しますか?', // 'Disallow login form' => '', - 'Bitbucket commit received' => 'Bitbucket コミットを受信しました', - 'Bitbucket webhooks' => 'Bitbucket Webhooks', - 'Help on Bitbucket webhooks' => 'Bitbucket Webhooks のヘルプ', 'Start' => '開始', 'End' => '終了', 'Task age in days' => 'タスクの経過日数', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php index 749630d9..75631126 100644 --- a/app/Locale/nb_NO/translations.php +++ b/app/Locale/nb_NO/translations.php @@ -578,9 +578,6 @@ return array( // 'You already have one subtask in progress' => '', 'Which parts of the project do you want to duplicate?' => 'Hvilke deler av dette prosjektet ønsker du å kopiere?', // 'Disallow login form' => '', - // 'Bitbucket commit received' => '', - // 'Bitbucket webhooks' => '', - // 'Help on Bitbucket webhooks' => '', 'Start' => 'Start', 'End' => 'Slutt', 'Task age in days' => 'Dager siden oppgaven ble opprettet', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', 'Date' => 'Dato', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', 'Add a comment log when moving the task between columns' => 'Legg til en kommentar i loggen når en oppgave flyttes mellom kolonnene', 'Move the task to another column when the category is changed' => 'Flytt oppgaven til en annen kolonne når kategorien endres', 'Send a task by email to someone' => 'Send en oppgave på epost til noen', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', 'Column change' => 'Endret kolonne', 'Position change' => 'Posisjonsendring', 'Swimlane change' => 'Endret svømmebane', diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php index 51148db5..5e1d2960 100644 --- a/app/Locale/nl_NL/translations.php +++ b/app/Locale/nl_NL/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'U heeft al een subtaak in behandeling', 'Which parts of the project do you want to duplicate?' => 'Welke onderdelen van het project wilt u dupliceren?', // 'Disallow login form' => '', - 'Bitbucket commit received' => 'Bitbucket commit ontvangen', - 'Bitbucket webhooks' => 'Bitbucket webhooks', - 'Help on Bitbucket webhooks' => 'Help bij Bitbucket webhooks', 'Start' => 'Start', 'End' => 'Eind', 'Task age in days' => 'Leeftijd taak in dagen', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php index 0356ab62..253e19f6 100644 --- a/app/Locale/pl_PL/translations.php +++ b/app/Locale/pl_PL/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Masz już zadanie o statusie "w trakcie"', 'Which parts of the project do you want to duplicate?' => 'Które elementy projektu chcesz zduplikować?', // 'Disallow login form' => '', - // 'Bitbucket commit received' => '', - // 'Bitbucket webhooks' => '', - // 'Help on Bitbucket webhooks' => '', 'Start' => 'Początek', 'End' => 'Koniec', 'Task age in days' => 'Wiek zadania w dniach', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', 'Send a task by email to someone' => 'Wyślij zadanie mailem do kogokolwiek', 'Reopen a task' => 'Otwórz ponownie zadanie', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', 'Column change' => 'Zmiana kolumny', 'Position change' => 'Zmiana pozycji', 'Swimlane change' => 'Zmiana Swimlane', diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php index 3873a4f9..ac063b16 100644 --- a/app/Locale/pt_BR/translations.php +++ b/app/Locale/pt_BR/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Você já tem um subtarefa em andamento', 'Which parts of the project do you want to duplicate?' => 'Quais partes do projeto você deseja duplicar?', 'Disallow login form' => 'Proibir o formulário de login', - 'Bitbucket commit received' => '"Commit" recebido via Bitbucket', - 'Bitbucket webhooks' => 'Webhook Bitbucket', - 'Help on Bitbucket webhooks' => 'Ajuda sobre os webhooks do Bitbucket', 'Start' => 'Início', 'End' => 'Fim', 'Task age in days' => 'Idade da tarefa em dias', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'O usuário que vai receber o e-mail', 'Email subject' => 'Assunto do e-mail', 'Date' => 'Data', - 'By @%s on Bitbucket' => 'Por @%s no Bitbucket', - 'Bitbucket Issue' => 'Bitbucket Issue', - 'Commit made by @%s on Bitbucket' => 'Commit feito por @%s no Bitbucket', - 'Commit made by @%s on Gitlab' => 'Commit feito por @%s no Gitlab', 'Add a comment log when moving the task between columns' => 'Adicionar um comentário de log quando uma tarefa é movida para uma outra coluna', 'Move the task to another column when the category is changed' => 'Mover uma tarefa para outra coluna quando a categoria mudou', 'Send a task by email to someone' => 'Enviar uma tarefa por e-mail a alguém', 'Reopen a task' => 'Reabrir uma tarefa', - 'Bitbucket issue opened' => 'Bitbucket issue opened', - 'Bitbucket issue closed' => 'Bitbucket issue closed', - 'Bitbucket issue reopened' => 'Bitbucket issue reopened', - 'Bitbucket issue assignee change' => 'Bitbucket issue assignee change', - 'Bitbucket issue comment created' => 'Bitbucket issue comment created', 'Column change' => 'Mudança de coluna', 'Position change' => 'Mudança de posição', 'Swimlane change' => 'Mudança de swimlane', diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php index b7b154b8..fec3b724 100644 --- a/app/Locale/pt_PT/translations.php +++ b/app/Locale/pt_PT/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Já tem uma subtarefa em andamento', 'Which parts of the project do you want to duplicate?' => 'Quais as partes do projecto que deseja duplicar?', 'Disallow login form' => 'Desactivar login', - 'Bitbucket commit received' => '"Commit" recebido via Bitbucket', - 'Bitbucket webhooks' => 'Webhook Bitbucket', - 'Help on Bitbucket webhooks' => 'Ajuda sobre os webhooks Bitbucket', 'Start' => 'Inicio', 'End' => 'Fim', 'Task age in days' => 'Idade da tarefa em dias', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'O utilizador que vai receber o e-mail', 'Email subject' => 'Assunto do e-mail', 'Date' => 'Data', - 'By @%s on Bitbucket' => 'Por @%s no Bitbucket', - 'Bitbucket Issue' => 'Problema Bitbucket', - 'Commit made by @%s on Bitbucket' => 'Commit feito por @%s no Bitbucket', - 'Commit made by @%s on Gitlab' => 'Commit feito por @%s no Gitlab', 'Add a comment log when moving the task between columns' => 'Adicionar um comentário de log quando uma tarefa é movida para uma outra coluna', 'Move the task to another column when the category is changed' => 'Mover uma tarefa para outra coluna quando a categoria mudar', 'Send a task by email to someone' => 'Enviar uma tarefa por e-mail a alguém', 'Reopen a task' => 'Reabrir uma tarefa', - 'Bitbucket issue opened' => 'Problema aberto no Bitbucket', - 'Bitbucket issue closed' => 'Problema fechado no Bitbucket', - 'Bitbucket issue reopened' => 'Problema reaberto no Bitbucket', - 'Bitbucket issue assignee change' => 'Alterar assignação do problema no Bitbucket', - 'Bitbucket issue comment created' => 'Comentário ao problema adicionado ao Bitbucket', 'Column change' => 'Mudança de coluna', 'Position change' => 'Mudança de posição', 'Swimlane change' => 'Mudança de swimlane', diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php index 0afd9b96..a8066115 100644 --- a/app/Locale/ru_RU/translations.php +++ b/app/Locale/ru_RU/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'У вас уже есть одна задача в разработке', 'Which parts of the project do you want to duplicate?' => 'Какие части проекта должны быть дублированы?', 'Disallow login form' => 'Запретить форму входа', - 'Bitbucket commit received' => 'Получен коммит с Bitbucket', - 'Bitbucket webhooks' => 'BitBucket webhooks', - 'Help on Bitbucket webhooks' => 'Помощь по BitBucket webhooks', 'Start' => 'Начало', 'End' => 'Конец', 'Task age in days' => 'Возраст задачи в днях', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'Пользователь, который будет получать e-mail', 'Email subject' => 'Тема e-mail', 'Date' => 'Дата', - 'By @%s on Bitbucket' => 'Польз. @%s на Bitbucket', - 'Bitbucket Issue' => 'Задача Bitbucket', - 'Commit made by @%s on Bitbucket' => 'Коммит сделан польз. @%s на Bitbucket', - 'Commit made by @%s on Gitlab' => 'Коммит сделан польз. @%s в Gitlab', 'Add a comment log when moving the task between columns' => 'Добавлять запись при перемещении задачи между колонками', 'Move the task to another column when the category is changed' => 'Переносить задачи в другую колонку при изменении категории', 'Send a task by email to someone' => 'Отправить задачу по email', 'Reopen a task' => 'Переоткрыть задачу', - 'Bitbucket issue opened' => 'Открыта задача Bitbucket', - 'Bitbucket issue closed' => 'Закрыта задача Bitbucket', - 'Bitbucket issue reopened' => 'Переоткрыта задача Bitbucket', - 'Bitbucket issue assignee change' => 'Изменный назначенный для задачи на Bitbucket', - 'Bitbucket issue comment created' => 'Создан комментарий для задачи на Bitbucket', 'Column change' => 'Изменение колонки', 'Position change' => 'Позиция изменена', 'Swimlane change' => 'Дорожка изменена', diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php index 5e56d805..b59e2e51 100644 --- a/app/Locale/sr_Latn_RS/translations.php +++ b/app/Locale/sr_Latn_RS/translations.php @@ -578,9 +578,6 @@ return array( // 'You already have one subtask in progress' => '', 'Which parts of the project do you want to duplicate?' => 'Koje delove projekta želite da kopirate', // 'Disallow login form' => '', - // 'Bitbucket commit received' => '', - // 'Bitbucket webhooks' => '', - // 'Help on Bitbucket webhooks' => '', // 'Start' => '', // 'End' => '', // 'Task age in days' => '', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php index 67d0251f..bf6ee199 100644 --- a/app/Locale/sv_SE/translations.php +++ b/app/Locale/sv_SE/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Du har redan en deluppgift igång', 'Which parts of the project do you want to duplicate?' => 'Vilka delar av projektet vill du duplicera?', // 'Disallow login form' => '', - 'Bitbucket commit received' => 'Bitbucket bidrag mottaget', - 'Bitbucket webhooks' => 'Bitbucket webhooks', - 'Help on Bitbucket webhooks' => 'Hjälp för Bitbucket webhooks', 'Start' => 'Start', 'End' => 'Slut', 'Task age in days' => 'Uppgiftsålder i dagar', @@ -750,19 +747,10 @@ return array( 'User that will receive the email' => 'Användare som kommer att ta emot mailet', 'Email subject' => 'E-post ämne', 'Date' => 'Datum', - 'By @%s on Bitbucket' => 'Av @%s på Bitbucket', - 'Bitbucket Issue' => 'Bitbucket fråga', - 'Commit made by @%s on Bitbucket' => 'Bidrag gjort av @%s på Bitbucket', - 'Commit made by @%s on Gitlab' => 'Bidrag gjort av @%s på Gitlab', 'Add a comment log when moving the task between columns' => 'Lägg till en kommentarslogg när en uppgift flyttas mellan kolumner', 'Move the task to another column when the category is changed' => 'Flyttas uppgiften till en annan kolumn när kategorin ändras', 'Send a task by email to someone' => 'Skicka en uppgift med e-post till någon', 'Reopen a task' => 'Återöppna en uppgift', - 'Bitbucket issue opened' => 'Bitbucketfråga öppnad', - 'Bitbucket issue closed' => 'Bitbucketfråga stängd', - 'Bitbucket issue reopened' => 'Bitbucketfråga återöppnad', - 'Bitbucket issue assignee change' => 'Bitbucketfråga tilldelningsändring', - 'Bitbucket issue comment created' => 'Bitbucketfråga kommentar skapad', 'Column change' => 'Kolumnändring', 'Position change' => 'Positionsändring', 'Swimlane change' => 'Swimlaneändring', diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php index 85197bc4..81946540 100644 --- a/app/Locale/th_TH/translations.php +++ b/app/Locale/th_TH/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'คุณมีหนึ่งงานย่อยที่กำลังทำงาน', // 'Which parts of the project do you want to duplicate?' => '', // 'Disallow login form' => '', - // 'Bitbucket commit received' => '', - // 'Bitbucket webhooks' => '', - // 'Help on Bitbucket webhooks' => '', 'Start' => 'เริ่ม', 'End' => 'จบ', 'Task age in days' => 'อายุงาน', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php index 25adf099..10472aad 100644 --- a/app/Locale/tr_TR/translations.php +++ b/app/Locale/tr_TR/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => 'Zaten işlemde olan bir alt görev var', 'Which parts of the project do you want to duplicate?' => 'Projenin hangi kısımlarının kopyasını oluşturmak istiyorsunuz?', // 'Disallow login form' => '', - 'Bitbucket commit received' => 'Bitbucket commit alındı', - 'Bitbucket webhooks' => 'Bitbucket webhooks', - 'Help on Bitbucket webhooks' => 'Bitbucket webhooks için yardım', 'Start' => 'Başlangıç', 'End' => 'Son', 'Task age in days' => 'Görev yaşı gün olarak', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', // 'Email subject' => '', // 'Date' => '', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', // 'Reopen a task' => '', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php index 53caba72..a152748f 100644 --- a/app/Locale/zh_CN/translations.php +++ b/app/Locale/zh_CN/translations.php @@ -578,9 +578,6 @@ return array( 'You already have one subtask in progress' => '你已经有了一个进行中的子任务', 'Which parts of the project do you want to duplicate?' => '要复制项目的哪些内容?', // 'Disallow login form' => '', - 'Bitbucket commit received' => '收到Bitbucket提交', - 'Bitbucket webhooks' => 'Bitbucket网络钩子', - 'Help on Bitbucket webhooks' => 'Bitbucket网络钩子帮助', 'Start' => '开始', 'End' => '结束', 'Task age in days' => '任务存在天数', @@ -750,19 +747,10 @@ return array( // 'User that will receive the email' => '', 'Email subject' => '邮件主题', 'Date' => '日期', - // 'By @%s on Bitbucket' => '', - // 'Bitbucket Issue' => '', - // 'Commit made by @%s on Bitbucket' => '', - // 'Commit made by @%s on Gitlab' => '', // 'Add a comment log when moving the task between columns' => '', // 'Move the task to another column when the category is changed' => '', // 'Send a task by email to someone' => '', 'Reopen a task' => '重新开始一个任务', - // 'Bitbucket issue opened' => '', - // 'Bitbucket issue closed' => '', - // 'Bitbucket issue reopened' => '', - // 'Bitbucket issue assignee change' => '', - // 'Bitbucket issue comment created' => '', // 'Column change' => '', // 'Position change' => '', // 'Swimlane change' => '', diff --git a/app/ServiceProvider/ClassProvider.php b/app/ServiceProvider/ClassProvider.php index 659d95b6..f7cd466c 100644 --- a/app/ServiceProvider/ClassProvider.php +++ b/app/ServiceProvider/ClassProvider.php @@ -116,7 +116,6 @@ class ClassProvider implements ServiceProviderInterface 'UserProfile', ), 'Integration' => array( - 'BitbucketWebhook', 'GitlabWebhook', ) ); diff --git a/app/Template/project/integrations.php b/app/Template/project/integrations.php index 6a149dbe..77b1b793 100644 --- a/app/Template/project/integrations.php +++ b/app/Template/project/integrations.php @@ -12,10 +12,4 @@ <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'gitlab', array('token' => $webhook_token, 'project_id' => $project['id']), false, '', true) ?>"/><br/> <p class="form-help"><?= $this->url->doc(t('Help on Gitlab webhooks'), 'gitlab-webhooks') ?></p> </div> - - <h3><i class="fa fa-bitbucket fa-fw"></i> <?= t('Bitbucket webhooks') ?></h3> - <div class="listing"> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->href('webhook', 'bitbucket', array('token' => $webhook_token, 'project_id' => $project['id']), false, '', true) ?>"/><br/> - <p class="form-help"><?= $this->url->doc(t('Help on Bitbucket webhooks'), 'bitbucket-webhooks') ?></p> - </div> </form>
\ No newline at end of file diff --git a/doc/bitbucket-webhooks.markdown b/doc/bitbucket-webhooks.markdown deleted file mode 100644 index 925615fa..00000000 --- a/doc/bitbucket-webhooks.markdown +++ /dev/null @@ -1,55 +0,0 @@ -Bitbucket webhooks -================== - -Bitbucket events can be connected to Kanboard automatic actions. - -List of supported events ------------------------- - -- Bitbucket commit received -- Bitbucket issue opened -- Bitbucket issue closed -- Bitbucket issue reopened -- Bitbucket issue assignee change -- Bitbucket issue comment created - -List of supported actions -------------------------- - -- Create a task from an external provider -- Change the assignee based on an external username -- Create a comment from an external provider -- Close a task -- Open a task - -Configuration -------------- - -![Bitbucket configuration](http://kanboard.net/screenshots/documentation/bitbucket-webhooks.png) - -1. On Kanboard, go to the project settings and choose the section **Integrations** -2. Copy the Bitbucket webhook URL -3. On Bitbucket, go to the project settings and go to the section **Webhooks** -4. Choose a title for your webhook and paste the Kanboard URL - -Examples --------- - -### Close a Kanboard task when a commit pushed to Bitbucket - -- Choose the event: **Bitbucket commit received** -- Choose action: **Close the task** - -When one or more commits are sent to Bitbucket, Kanboard will receive the information, each commit message with a task number included will be closed. - -Example: - -- Commit message: "Fix bug #1234" -- That will close the Kanboard task #1234 - -### Add comment when a commit received - -- Choose the event: **Bitbucket commit received** -- Choose action: **Create a comment from an external provider** - -The comment will contain the commit message and the URL to the commit. diff --git a/doc/github-webhooks.markdown b/doc/github-webhooks.markdown deleted file mode 100644 index a20b5a18..00000000 --- a/doc/github-webhooks.markdown +++ /dev/null @@ -1,99 +0,0 @@ -Github webhooks integration -=========================== - -Kanboard can be synchronized with Github. -Currently, it's only a one-way synchronization: Github to Kanboard. - -Github webhooks are plugged to Kanboard automatic actions. -When an event occurs on Github, an action can be performed on Kanboard. - -List of available events ------------------------- - -- Github commit received -- Github issue opened -- Github issue closed -- Github issue reopened -- Github issue assignee change -- Github issue label change -- Github issue comment created - -List of available actions -------------------------- - -- Create a task from an external provider -- Change the assignee based on an external username -- Change the category based on an external label -- Create a comment from an external provider -- Close a task -- Open a task - -Configuration on Github ------------------------ - -Go to your project settings page, on the left choose "Webhooks & Services", then click on the button "Add webhook". - -![Github configuration](http://kanboard.net/screenshots/documentation/github-webhooks.png) - -- **Payload url**: Copy and paste the link from the Kanboard project settings (section **Integrations > Github**). -- Select **"Send me everything"** - -![Github webhook](http://kanboard.net/screenshots/documentation/kanboard-github-webhooks.png) - -Each time an event happens, Github will send an event to Kanboard now. -The Kanboard webhook url is protected by a random token. - -Everything else is handled by automatic actions in your Kanboard project settings. - -Examples --------- - -### Close a Kanboard task when a commit pushed to Github - -- Choose the event: **Github commit received** -- Choose the action: **Close the task** - -When one or more commits are sent to Github, Kanboard will receive the information, each commit message with a task number included will be closed. - -Example: - -- Commit message: "Fix bug #1234" -- That will close the Kanboard task #1234 - -### Create a Kanboard task when a new issue is opened on Github - -- Choose the event: **Github issue opened** -- Choose the action: **Create a task from an external provider** - -When a task is created from a Github issue, the link to the issue is added to the description and the task have a new field named "Reference" (this is the Github ticket number). - -### Close a Kanboard task when an issue is closed on Github - -- Choose the event: **Github issue closed** -- Choose the action: **Close the task** - -### Reopen a Kanboard task when an issue is reopened on Github - -- Choose the event: **Github issue reopened** -- Choose the action: **Open the task** - -### Assign a task to a Kanboard user when an issue is assigned on Github - -- Choose the event: **Github issue assignee change** -- Choose the action: **Change the assignee based on an external username** - -Note: The username must be the same between Github and Kanboard and the user must be member of the project. - -### Assign a category when an issue is tagged on Github - -- Choose the event: **Github issue label change** -- Choose the action: **Change the category based on an external label** -- Define the label and the category - -### Create a comment on Kanboard when an issue is commented on Github - -- Choose the event: **Github issue comment created** -- Choose the action: **Create a comment from an external provider** - -If the username is the same between Github and Kanboard the comment author will be assigned, otherwise there is no author. -The user also have to be member of the project in Kanboard. diff --git a/doc/index.markdown b/doc/index.markdown index 0030e6d0..bc3a2fbf 100644 --- a/doc/index.markdown +++ b/doc/index.markdown @@ -68,7 +68,6 @@ Using Kanboard ### Integrations -- [Bitbucket webhooks](bitbucket-webhooks.markdown) - [Gitlab webhooks](gitlab-webhooks.markdown) - [iCalendar subscriptions](ical.markdown) - [RSS/Atom subscriptions](rss.markdown) diff --git a/tests/units/Integration/BitbucketWebhookTest.php b/tests/units/Integration/BitbucketWebhookTest.php deleted file mode 100644 index bb6755c2..00000000 --- a/tests/units/Integration/BitbucketWebhookTest.php +++ /dev/null @@ -1,399 +0,0 @@ -<?php - -require_once __DIR__.'/../Base.php'; - -use Kanboard\Integration\BitbucketWebhook; -use Kanboard\Model\TaskCreation; -use Kanboard\Model\TaskFinder; -use Kanboard\Model\Project; -use Kanboard\Model\ProjectUserRole; -use Kanboard\Model\User; -use Kanboard\Core\Security\Role; - -class BitbucketWebhookTest extends Base -{ - public function testHandlePush() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_COMMIT, array($this, 'onCommit')); - - $tc = new TaskCreation($this->container); - $p = new Project($this->container); - $bw = new BitbucketWebhook($this->container); - $payload = json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_push.json'), true); - - $this->assertEquals(1, $p->create(array('name' => 'test'))); - $bw->setProjectId(1); - - // No task - $this->assertFalse($bw->handlePush($payload)); - - // Create task with the wrong id - $this->assertEquals(1, $tc->create(array('title' => 'test1', 'project_id' => 1))); - $this->assertFalse($bw->handlePush($payload)); - - // Create task with the right id - $this->assertEquals(2, $tc->create(array('title' => 'test2', 'project_id' => 1))); - $this->assertTrue($bw->handlePush($payload)); - - $called = $this->container['dispatcher']->getCalledListeners(); - $this->assertArrayHasKey(BitbucketWebhook::EVENT_COMMIT.'.BitbucketWebhookTest::onCommit', $called); - } - - public function testIssueOpened() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_OPENED, array($this, 'onIssueOpened')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $bw = new BitbucketWebhook($this->container); - $bw->setProjectId(1); - - $this->assertNotFalse($bw->parsePayload( - 'issue:created', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_opened.json'), true) - )); - } - - public function testCommentCreatedWithNoUser() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_COMMENT, array($this, 'onCommentCreatedWithNoUser')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:comment_created', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_comment_created.json'), true) - )); - } - - public function testCommentCreatedWithNotMember() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_COMMENT, array($this, 'onCommentCreatedWithNotMember')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $u = new User($this->container); - $this->assertEquals(2, $u->create(array('username' => 'fguillot'))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:comment_created', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_comment_created.json'), true) - )); - } - - public function testCommentCreatedWithUser() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_COMMENT, array($this, 'onCommentCreatedWithUser')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $u = new User($this->container); - $this->assertEquals(2, $u->create(array('username' => 'minicoders'))); - - $pp = new ProjectUserRole($this->container); - $this->assertTrue($pp->addUser(1, 2, Role::PROJECT_MEMBER)); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:comment_created', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_comment_created.json'), true) - )); - } - - public function testIssueClosed() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_CLOSED, array($this, 'onIssueClosed')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_closed.json'), true) - )); - } - - public function testIssueClosedWithNoTask() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_CLOSED, array($this, 'onIssueClosed')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 42, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_closed.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueReopened() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_REOPENED, array($this, 'onIssueReopened')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_reopened.json'), true) - )); - } - - public function testIssueReopenedWithNoTask() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_REOPENED, array($this, 'onIssueReopened')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 42, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_reopened.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueUnassigned() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, array($this, 'onIssueUnassigned')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_unassigned.json'), true) - )); - } - - public function testIssueAssigned() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, array($this, 'onIssueAssigned')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $u = new User($this->container); - $this->assertEquals(2, $u->create(array('username' => 'minicoders'))); - - $pp = new ProjectUserRole($this->container); - $this->assertTrue($pp->addUser(1, 2, Role::PROJECT_MEMBER)); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_assigned.json'), true) - )); - - $this->assertNotEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueAssignedWithNoPermission() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, function () {}); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $u = new User($this->container); - $this->assertEquals(2, $u->create(array('username' => 'minicoders'))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_assigned.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueAssignedWithNoUser() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, function () {}); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_assigned.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueAssignedWithNoTask() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, function () {}); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 43, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_assigned.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function onCommit($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(2, $data['task_id']); - $this->assertEquals('test2', $data['title']); - $this->assertEquals("Test another commit #2\n\n\n[Commit made by @Frederic Guillot on Bitbucket](https://bitbucket.org/minicoders/test-webhook/commits/824059cce7667d3f8d8780cc707391be821e0ea6)", $data['comment']); - $this->assertEquals("Test another commit #2\n", $data['commit_message']); - $this->assertEquals('https://bitbucket.org/minicoders/test-webhook/commits/824059cce7667d3f8d8780cc707391be821e0ea6', $data['commit_url']); - } - - public function onIssueOpened($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['reference']); - $this->assertEquals('My new issue', $data['title']); - $this->assertEquals("**test**\n\n[Bitbucket Issue](https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue)", $data['description']); - } - - public function onCommentCreatedWithNoUser($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(0, $data['user_id']); - $this->assertEquals(19176252, $data['reference']); - $this->assertEquals("1. step1\n2. step2\n\n[By @Frederic Guillot on Bitbucket](https://bitbucket.org/minicoders/test-webhook/issue/1#comment-19176252)", $data['comment']); - } - - public function onCommentCreatedWithNotMember($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(0, $data['user_id']); - $this->assertEquals(19176252, $data['reference']); - $this->assertEquals("1. step1\n2. step2\n\n[By @Frederic Guillot on Bitbucket](https://bitbucket.org/minicoders/test-webhook/issue/1#comment-19176252)", $data['comment']); - } - - public function onCommentCreatedWithUser($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(2, $data['user_id']); - $this->assertEquals(19176252, $data['reference']); - $this->assertEquals("1. step1\n2. step2\n\n[By @Frederic Guillot on Bitbucket](https://bitbucket.org/minicoders/test-webhook/issue/1#comment-19176252)", $data['comment']); - } - - public function onIssueClosed($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(1, $data['reference']); - } - - public function onIssueReopened($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(1, $data['reference']); - } - - public function onIssueAssigned($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(1, $data['reference']); - $this->assertEquals(2, $data['owner_id']); - } - - public function onIssueUnassigned($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(1, $data['reference']); - $this->assertEquals(0, $data['owner_id']); - } -} diff --git a/tests/units/fixtures/bitbucket_comment_created.json b/tests/units/fixtures/bitbucket_comment_created.json deleted file mode 100644 index 66a09bb8..00000000 --- a/tests/units/fixtures/bitbucket_comment_created.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "actor": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "repository": { - "full_name": "minicoders/test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "type": "repository", - "links": { - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - }, - "owner": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "name": "test-webhook" - }, - "comment": { - "content": { - "html": "<ol>\n<li>step1</li>\n<li>step2</li>\n</ol>", - "raw": "1. step1\n2. step2", - "markup": "markdown" - }, - "created_on": "2015-06-21T02:51:40.532529+00:00", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1#comment-19176252" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19176252" - } - }, - "id": 19176252, - "user": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "updated_on": null - }, - "issue": { - "updated_on": "2015-06-21T02:51:40.536516+00:00", - "votes": 0, - "assignee": null, - "links": { - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - } - }, - "priority": "major", - "kind": "bug", - "watches": 1, - "edited_on": null, - "state": "new", - "content": { - "html": "<p><strong>test</strong></p>", - "raw": "**test**", - "markup": "markdown" - }, - "component": null, - "milestone": null, - "version": null, - "id": 1, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "type": "issue", - "reporter": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "title": "My new issue" - } -}
\ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_assigned.json b/tests/units/fixtures/bitbucket_issue_assigned.json deleted file mode 100644 index 0324afb2..00000000 --- a/tests/units/fixtures/bitbucket_issue_assigned.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "repository": { - "name": "test-webhook", - "type": "repository", - "full_name": "minicoders/test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - } - }, - "owner": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - } - }, - "changes": { - "responsible": { - "new": { - "is_system": false, - "name": "Frederic Guillot", - "username": "minicoders", - "id": 1290132, - "billing_external_uuid": null - }, - "old": null - }, - "assignee": { - "new": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "old": null - } - }, - "actor": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "issue": { - "repository": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - } - }, - "type": "repository", - "full_name": "minicoders/test-webhook", - "name": "test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}" - }, - "edited_on": null, - "component": null, - "updated_on": "2015-06-21T15:21:28.023525+00:00", - "reporter": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "state": "open", - "content": { - "raw": "**test**", - "markup": "markdown", - "html": "<p><strong>test</strong></p>" - }, - "kind": "bug", - "links": { - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - } - }, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "watches": 1, - "milestone": null, - "version": null, - "assignee": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "title": "My new issue", - "priority": "major", - "id": 1, - "votes": 0, - "type": "issue" - }, - "comment": { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19181255" - } - }, - "updated_on": null, - "content": { - "raw": null, - "markup": "markdown", - "html": "" - }, - "id": 19181255, - "created_on": "2015-06-21T15:21:28.043980+00:00", - "user": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - } - } -}
\ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_closed.json b/tests/units/fixtures/bitbucket_issue_closed.json deleted file mode 100644 index 473b5167..00000000 --- a/tests/units/fixtures/bitbucket_issue_closed.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "actor": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "changes": { - "status": { - "old": "new", - "new": "closed" - } - }, - "repository": { - "full_name": "minicoders/test-webhook", - "type": "repository", - "links": { - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - }, - "owner": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "name": "test-webhook" - }, - "comment": { - "content": { - "html": "", - "raw": null, - "markup": "markdown" - }, - "created_on": "2015-06-21T02:54:40.263014+00:00", - "updated_on": null, - "id": 19176265, - "user": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19176265" - } - } - }, - "issue": { - "state": "closed", - "votes": 0, - "assignee": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "links": { - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - } - }, - "priority": "major", - "version": null, - "watches": 1, - "edited_on": null, - "reporter": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "content": { - "html": "<p><strong>test</strong></p>", - "raw": "**test**", - "markup": "markdown" - }, - "component": null, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "updated_on": "2015-06-21T02:54:40.249466+00:00", - "kind": "bug", - "id": 1, - "milestone": null, - "type": "issue", - "repository": { - "full_name": "minicoders/test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "type": "repository", - "name": "test-webhook", - "links": { - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - } - }, - "title": "My new issue" - } -}
\ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_opened.json b/tests/units/fixtures/bitbucket_issue_opened.json deleted file mode 100644 index 7891c230..00000000 --- a/tests/units/fixtures/bitbucket_issue_opened.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "issue": { - "type": "issue", - "links": { - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - } - }, - "component": null, - "updated_on": "2015-06-21T02:17:40.990654+00:00", - "reporter": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "type": "user", - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "watches": 1, - "kind": "bug", - "edited_on": null, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "milestone": null, - "version": null, - "state": "new", - "assignee": null, - "content": { - "raw": "**test**", - "markup": "markdown", - "html": "<p><strong>test</strong></p>" - }, - "priority": "major", - "id": 1, - "votes": 0, - "title": "My new issue" - }, - "repository": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - } - }, - "type": "repository", - "full_name": "minicoders/test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "name": "test-webhook", - "owner": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "type": "user", - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - } - }, - "actor": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "type": "user", - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - } -}
\ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_reopened.json b/tests/units/fixtures/bitbucket_issue_reopened.json deleted file mode 100644 index bb950916..00000000 --- a/tests/units/fixtures/bitbucket_issue_reopened.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "issue": { - "edited_on": null, - "watches": 1, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "reporter": { - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - }, - "content": { - "markup": "markdown", - "raw": "**test**", - "html": "<p><strong>test</strong></p>" - }, - "id": 1, - "milestone": null, - "repository": { - "full_name": "minicoders/test-webhook", - "type": "repository", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - } - }, - "name": "test-webhook" - }, - "component": null, - "version": null, - "votes": 0, - "priority": "major", - "type": "issue", - "state": "open", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - }, - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - } - }, - "kind": "bug", - "updated_on": "2015-06-21T14:56:49.739063+00:00", - "assignee": { - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - }, - "title": "My new issue" - }, - "comment": { - "id": 19181022, - "created_on": "2015-06-21T14:56:49.749362+00:00", - "content": { - "markup": "markdown", - "raw": null, - "html": "" - }, - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19181022" - } - }, - "user": { - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - }, - "updated_on": null - }, - "repository": { - "name": "test-webhook", - "owner": { - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - }, - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "type": "repository", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - } - }, - "full_name": "minicoders/test-webhook" - }, - "changes": { - "status": { - "new": "open", - "old": "closed" - } - }, - "actor": { - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - } -}
\ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_unassigned.json b/tests/units/fixtures/bitbucket_issue_unassigned.json deleted file mode 100644 index 3cbab2ea..00000000 --- a/tests/units/fixtures/bitbucket_issue_unassigned.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "comment": { - "updated_on": null, - "content": { - "html": "", - "markup": "markdown", - "raw": null - }, - "created_on": "2015-06-21T15:07:45.787623+00:00", - "user": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19181143" - } - }, - "id": 19181143 - }, - "issue": { - "state": "open", - "content": { - "html": "<p><strong>test</strong></p>", - "markup": "markdown", - "raw": "**test**" - }, - "milestone": null, - "type": "issue", - "version": null, - "title": "My new issue", - "assignee": null, - "kind": "bug", - "component": null, - "priority": "major", - "reporter": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "edited_on": null, - "updated_on": "2015-06-21T15:07:45.775705+00:00", - "id": 1, - "votes": 0, - "repository": { - "full_name": "minicoders/test-webhook", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - }, - "type": "repository", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "name": "test-webhook" - }, - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - } - }, - "watches": 1 - }, - "actor": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "repository": { - "full_name": "minicoders/test-webhook", - "owner": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "type": "repository", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - }, - "name": "test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}" - }, - "changes": { - "responsible": { - "old": { - "is_system": false, - "username": "minicoders", - "name": "Frederic Guillot", - "billing_external_uuid": null, - "id": 1290132 - }, - "new": null - }, - "assignee": { - "old": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "new": null - } - } -}
\ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_push.json b/tests/units/fixtures/bitbucket_push.json deleted file mode 100644 index f480b074..00000000 --- a/tests/units/fixtures/bitbucket_push.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "push": { - "changes": [ - { - "forced": false, - "old": { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/refs/branches/master" - }, - "commits": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commits/master" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/branch/master" - } - }, - "name": "master", - "target": { - "date": "2015-06-21T00:50:37+00:00", - "hash": "b6b46580eb9b20a06396f5f697ea1a55cf170e69", - "message": "test edited online with Bitbucket for task #5", - "type": "commit", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commit/b6b46580eb9b20a06396f5f697ea1a55cf170e69" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/commits/b6b46580eb9b20a06396f5f697ea1a55cf170e69" - } - }, - "parents": [ - { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commit/7251db4b505cbfca3f845ebcff0ec0ddc4003ed8" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/commits/7251db4b505cbfca3f845ebcff0ec0ddc4003ed8" - } - }, - "type": "commit", - "hash": "7251db4b505cbfca3f845ebcff0ec0ddc4003ed8" - } - ], - "author": { - "raw": "Frederic Guillot <bob>", - "user": { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "username": "minicoders", - "display_name": "Frederic Guillot" - } - } - }, - "type": "branch" - }, - "created": false, - "links": { - "diff": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/diff/824059cce7667d3f8d8780cc707391be821e0ea6..b6b46580eb9b20a06396f5f697ea1a55cf170e69" - }, - "commits": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commits?include=824059cce7667d3f8d8780cc707391be821e0ea6exclude=b6b46580eb9b20a06396f5f697ea1a55cf170e69" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/branches/compare/824059cce7667d3f8d8780cc707391be821e0ea6..b6b46580eb9b20a06396f5f697ea1a55cf170e69" - } - }, - "new": { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/refs/branches/master" - }, - "commits": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commits/master" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/branch/master" - } - }, - "name": "master", - "target": { - "date": "2015-06-21T03:15:08+00:00", - "hash": "824059cce7667d3f8d8780cc707391be821e0ea6", - "message": "Test another commit #2\n", - "type": "commit", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commit/824059cce7667d3f8d8780cc707391be821e0ea6" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/commits/824059cce7667d3f8d8780cc707391be821e0ea6" - } - }, - "parents": [ - { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commit/24aa9d82bbb6f9a60f743fe538deb0a44622fc98" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/commits/24aa9d82bbb6f9a60f743fe538deb0a44622fc98" - } - }, - "type": "commit", - "hash": "24aa9d82bbb6f9a60f743fe538deb0a44622fc98" - } - ], - "author": { - "raw": "Frederic Guillot <bob@localhost>" - } - }, - "type": "branch" - }, - "closed": false - } - ] - }, - "repository": { - "name": "test-webhook", - "owner": { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "username": "minicoders", - "display_name": "Frederic Guillot" - }, - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "type": "repository", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - } - }, - "full_name": "minicoders/test-webhook" - }, - "actor": { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "username": "minicoders", - "display_name": "Frederic Guillot" - } -}
\ No newline at end of file |