Class: GithubToSlack::SlackMessage

Inherits:
Object
  • Object
show all
Defined in:
app/models/github_to_slack/communicator.rb

Constant Summary collapse

WEBHOOK_URL =
ENV["SLACK_WEBHOOK_URL"]
CHANNEL_NAME =
ENV["SLACK_CHANNEL_NAME"]

Class Method Summary collapse

Class Method Details

.notify(message) ⇒ Object



40
41
42
43
44
45
46
# File 'app/models/github_to_slack/communicator.rb', line 40

def self.notify(message)
  Slack::Notifier
    .new(WEBHOOK_URL,
      channel: CHANNEL_NAME,
      username: 'Github To Slack')
    .ping(":allthethings: :octocat: :speaker: " + message)
end