Add Hipchat integration

This commit is contained in:
Frederic Guillot
2015-03-29 13:51:51 -04:00
parent 5536f6c6ce
commit 7cbae61dbd
32 changed files with 250 additions and 17 deletions

View File

@@ -42,14 +42,32 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface
$values
);
if ($this->config->get('integration_slack_webhook') == 1) {
$this->slackWebhook->notify(
$values['task']['project_id'],
$values['task']['id'],
$event_name,
$values
);
}
$this->sendSlackNotification($event_name, $values);
$this->sendHipchatNotification($event_name, $values);
}
}
private function sendSlackNotification($event_name, array $values)
{
if ($this->config->get('integration_slack_webhook') == 1) {
$this->slackWebhook->notify(
$values['task']['project_id'],
$values['task']['id'],
$event_name,
$values
);
}
}
private function sendHipchatNotification($event_name, array $values)
{
if ($this->config->get('integration_hipchat') == 1) {
$this->hipchat->notify(
$values['task']['project_id'],
$values['task']['id'],
$event_name,
$values
);
}
}