Add Slack and Hipchat integrations for each projects

This commit is contained in:
Frederic Guillot
2015-04-18 18:44:45 -04:00
parent f53bb88d10
commit 370b5a0fd7
15 changed files with 368 additions and 81 deletions

View File

@@ -49,26 +49,22 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface
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
);
}
$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
);
}
$this->hipchat->notify(
$values['task']['project_id'],
$values['task']['id'],
$event_name,
$values
);
}
private function getValues(GenericEvent $event)