Class: Changelog::Notifier::Adapters::Slack
- Defined in:
- lib/changelog/notifier/adapters/slack.rb
Overview
Slack adapter sends the release note in a Slack channel.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Changelog::Notifier::Adapters::Base
Instance Method Details
#configured? ⇒ Boolean
12 13 14 |
# File 'lib/changelog/notifier/adapters/slack.rb', line 12 def configured? @webhook_url.to_s.empty? == false end |
#publish!(release_note_hash, version) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/changelog/notifier/adapters/slack.rb', line 16 def publish!(release_note_hash, version) formatted_release_note = format_release_note_hash(release_note_hash) notifier = instantiate_slack_notifier @capistrano.info "Posting #{version}'s release note to the " \ "#{channel} Slack channel using the #{icon_emoji} " \ 'emoji icon ...' notifier.post formatted_release_note end |