sunlightlabs/scout — pull request #498 by konklone (2014-05-06 21:01:50+00:00)
Title: Slack integration

This adds Slack notifications for most admin interaction in Scout. It can drive notifications to a given team and channel, with a given integration's token, and a given name/avatar for the robot that delivers the messages.

The core Slack notifier code [is here](https://github.com/sunlightlabs/scout/compare/slack?expand=1#diff-10). The PR overall:

* Updates `config/config.yml.example` with a new `slack` section with configuration options.
* Various `Admin` methods now deliver Slack notifications by default.
* Exceptions that were passed on to Sentry will still generate a Slack notice, by using `Admin.report` but passing `email: false`.
* Sensitive messages (anything with an email address in it) should either:
* use `Admin.sensitive`, which is identical to `Admin.message` except it does not hit Slack, or
* use `Admin.report slack: false`, if sending a report. Nothing does this one at present.
* Exceptions when communicating with Slack result in an email to the admin saying that Slack integration is down.
* Exceptions when sending email now result in a Slack notification saying that email sending failed. Nice to have a backup route now for admin messages. (We'd previously disabled Postmark for admin messages a long time ago, when an accidental flood got us in trouble, so it now only uses SMTP.)

Closes #496. /cc @jcarbaugh