notification to slack in Dangerfile
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rubocop.yml
.ruby-version
.travis.yml
Dangerfile
Gemfile
Gemfile.lock
Guardfile
LICENSE.txt
README.md
Rakefile
danger-slack.gemspec

README.md

danger-slack

Notify danger reports to slack.

slack setup

The following steps is required for using danger-slack plugin.

1. create bot in https://my.slack.com/services/new/bot  
2. invite created bot user to channel in slack app

slack.api_token or SLACK_API_TOKEN are the bot's token starting from xoxb-

Installation

$ gem install danger-slack

Usage

How to set your Slack API token

In Dangerfile,

slack.api_token = 'SLACK_API_TOKEN'

or

Set Environment variable SLACK_API_TOKEN

methods

Get channels

slack.channels

Get members

slack.members

Get groups

slack.groups

Notify danger reports to slack

slack.notify(channel: '#your_channel')

Post message to slack

slack.notify(channel: '#your_channel', text: 'hello danger')