mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
13 lines
295 B
Ruby
13 lines
295 B
Ruby
class SlackService < Service
|
|
def self.post(channel, message)
|
|
return unless Rails.env == 'production'
|
|
slack_hook = ENV['SLACK_HOOK']
|
|
return unless slack_hook
|
|
|
|
Slack::Notifier.new(
|
|
slack_hook,
|
|
channel: channel,
|
|
username: 'tristan'
|
|
).ping(message)
|
|
end
|
|
end |