diff options
Diffstat (limited to 'app/Integration/GithubWebhook.php')
-rw-r--r-- | app/Integration/GithubWebhook.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/app/Integration/GithubWebhook.php b/app/Integration/GithubWebhook.php index 607bbc1e..a725f5b9 100644 --- a/app/Integration/GithubWebhook.php +++ b/app/Integration/GithubWebhook.php @@ -90,12 +90,19 @@ class GithubWebhook extends \Core\Base continue; } - if ($task['project_id'] == $this->project_id) { - $this->container['dispatcher']->dispatch( - self::EVENT_COMMIT, - new GenericEvent(array('task_id' => $task_id) + $task) - ); + if ($task['project_id'] != $this->project_id) { + continue; } + + $this->container['dispatcher']->dispatch( + self::EVENT_COMMIT, + new GenericEvent(array( + 'task_id' => $task_id, + 'commit_message' => $commit['message'], + 'commit_url' => $commit['url'], + 'commit_comment' => $commit['message']."\n\n[".t('Commit made by @%s on Github', $commit['author']['username']).']('.$commit['url'].')' + ) + $task) + ); } return true; |