What's the recommended way to implement Slack notifications #1147
-
Hi folks -- I'd love to notify my company's internal Slack when a deploy starts and ends. Digging through issues like #1074 and #198 shows that Shipit doesn't have this functionality built in which makes a lot of sense. Is there a current recommended path for getting the notifications out of shipit and into a chatbot? I saw some references to a webhook API but in looking around the codebase and docs didn't see anything about outgoing webhook delivery, just receiving. Thanks for any pointers you can give me! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey Harry 👋 The recommended way is indeed to send webhooks to a chatbot app that will then act as the gateway. The outgoing Webhooks are indeed under-documented, and have pretty much no UI... Thet are handled by the Shipit::Hooks model, see also the schema. Each record is basically a subscription. So right know users are expected to either create them from a Rails console, or a migration. Alternatively if you don't have a chat bot, or would rather keep this contained in Shipit, while a bit of a hack, you can decorate the Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hey Harry 👋
The recommended way is indeed to send webhooks to a chatbot app that will then act as the gateway.
The outgoing Webhooks are indeed under-documented, and have pretty much no UI... Thet are handled by the Shipit::Hooks model, see also the schema. Each record is basically a subscription.
So right know users are expected to either create them from a Rails console, or a migration.
Alternatively if you don't have a chat bot, or would rather keep this contained in Shipit, while a bit of a hack, you can decorate the
Shipit::Hook.emit
method in your host app, and use that to implement what you need there. We should probably make this a first class API.Hope this helps.