diff options
Diffstat (limited to 'app/Integration')
-rw-r--r-- | app/Integration/BitbucketWebhook.php | 4 | ||||
-rw-r--r-- | app/Integration/GithubWebhook.php | 6 | ||||
-rw-r--r-- | app/Integration/GitlabWebhook.php | 1 | ||||
-rw-r--r-- | app/Integration/HipchatWebhook.php | 1 | ||||
-rw-r--r-- | app/Integration/Jabber.php | 5 | ||||
-rw-r--r-- | app/Integration/SlackWebhook.php | 1 |
6 files changed, 2 insertions, 16 deletions
diff --git a/app/Integration/BitbucketWebhook.php b/app/Integration/BitbucketWebhook.php index b78c4d77..44e5bd74 100644 --- a/app/Integration/BitbucketWebhook.php +++ b/app/Integration/BitbucketWebhook.php @@ -80,7 +80,6 @@ class BitbucketWebhook extends \Kanboard\Core\Base $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->isMember($this->project_id, $user['id'])) { @@ -147,8 +146,7 @@ class BitbucketWebhook extends \Kanboard\Core\Base if (isset($payload['changes']['status'])) { return $this->handleStatusChange($task, $payload); - } - else if (isset($payload['changes']['assignee'])) { + } elseif (isset($payload['changes']['assignee'])) { return $this->handleAssigneeChange($task, $payload); } diff --git a/app/Integration/GithubWebhook.php b/app/Integration/GithubWebhook.php index c948ea8b..a4333723 100644 --- a/app/Integration/GithubWebhook.php +++ b/app/Integration/GithubWebhook.php @@ -77,7 +77,6 @@ class GithubWebhook extends \Kanboard\Core\Base public function parsePushEvent(array $payload) { foreach ($payload['commits'] as $commit) { - $task_id = $this->task->getTaskIdFromText($commit['message']); if (empty($task_id)) { @@ -149,7 +148,6 @@ class GithubWebhook extends \Kanboard\Core\Base $task = $this->taskFinder->getByReference($this->project_id, $payload['issue']['number']); if (! empty($task)) { - $user = $this->user->getByUsername($payload['comment']['user']['login']); if (! empty($user) && ! $this->projectPermission->isMember($this->project_id, $user['id'])) { @@ -270,7 +268,6 @@ class GithubWebhook extends \Kanboard\Core\Base $task = $this->taskFinder->getByReference($this->project_id, $issue['number']); if (! empty($user) && ! empty($task) && $this->projectPermission->isMember($this->project_id, $user['id'])) { - $event = array( 'project_id' => $this->project_id, 'task_id' => $task['id'], @@ -301,7 +298,6 @@ class GithubWebhook extends \Kanboard\Core\Base $task = $this->taskFinder->getByReference($this->project_id, $issue['number']); if (! empty($task)) { - $event = array( 'project_id' => $this->project_id, 'task_id' => $task['id'], @@ -333,7 +329,6 @@ class GithubWebhook extends \Kanboard\Core\Base $task = $this->taskFinder->getByReference($this->project_id, $issue['number']); if (! empty($task)) { - $event = array( 'project_id' => $this->project_id, 'task_id' => $task['id'], @@ -365,7 +360,6 @@ class GithubWebhook extends \Kanboard\Core\Base $task = $this->taskFinder->getByReference($this->project_id, $issue['number']); if (! empty($task)) { - $event = array( 'project_id' => $this->project_id, 'task_id' => $task['id'], diff --git a/app/Integration/GitlabWebhook.php b/app/Integration/GitlabWebhook.php index 4b90ef7f..fb75d95a 100644 --- a/app/Integration/GitlabWebhook.php +++ b/app/Integration/GitlabWebhook.php @@ -239,7 +239,6 @@ class GitlabWebhook extends \Kanboard\Core\Base $task = $this->taskFinder->getByReference($this->project_id, $payload['issue']['id']); if (! empty($task)) { - $user = $this->user->getByUsername($payload['user']['username']); if (! empty($user) && ! $this->projectPermission->isMember($this->project_id, $user['id'])) { diff --git a/app/Integration/HipchatWebhook.php b/app/Integration/HipchatWebhook.php index af1e4495..6f789718 100644 --- a/app/Integration/HipchatWebhook.php +++ b/app/Integration/HipchatWebhook.php @@ -60,7 +60,6 @@ class HipchatWebhook extends \Kanboard\Core\Base public function notify($project_id, $task_id, $event_name, array $event) { if ($this->isActivated($project_id)) { - $params = $this->getParameters($project_id); $project = $this->project->getbyId($project_id); diff --git a/app/Integration/Jabber.php b/app/Integration/Jabber.php index 9c7dcd40..d776e560 100644 --- a/app/Integration/Jabber.php +++ b/app/Integration/Jabber.php @@ -72,7 +72,6 @@ class Jabber extends \Kanboard\Core\Base public function notify($project_id, $task_id, $event_name, array $event) { if ($this->isActivated($project_id)) { - $project = $this->project->getbyId($project_id); $event['event_name'] = $event_name; @@ -98,7 +97,6 @@ class Jabber extends \Kanboard\Core\Base public function sendMessage($project_id, $payload) { try { - $params = $this->getParameters($project_id); $options = new Options($params['server']); @@ -121,8 +119,7 @@ class Jabber extends \Kanboard\Core\Base $client->send($message); $client->disconnect(); - } - catch (Exception $e) { + } catch (Exception $e) { $this->container['logger']->error('Jabber error: '.$e->getMessage()); } } diff --git a/app/Integration/SlackWebhook.php b/app/Integration/SlackWebhook.php index e216ed5b..8f4eb422 100644 --- a/app/Integration/SlackWebhook.php +++ b/app/Integration/SlackWebhook.php @@ -70,7 +70,6 @@ class SlackWebhook extends \Kanboard\Core\Base public function notify($project_id, $task_id, $event_name, array $event) { if ($this->isActivated($project_id)) { - $project = $this->project->getbyId($project_id); $event['event_name'] = $event_name; |