Danger

Danger title image

slacka project from orta therox, Juanito Fatas and and others.

slack

Notify danger reports to slack.

Created by shunsuke maeda.

Reference

Attributes

API token to authenticate with SLACK API

api_tokenString

Methods

Get slack team members For more information, see also https://api.slack.com/methods/users.list

members [Hash]

Get slack team channels For more information, see also https://api.slack.com/methods/channels.list

channels [Hash]

Get slack team groups (private channels) For more information, see also http://api.slack.com/methods/groups.list

groups [Hash]

Notify to Slack

notify (channel='#general': String, text=nil: String, **opts: Unknown)

Examples

Configure credentials to access the Slack API

slack.api_token = YOUR_API_TOKEN

Get channels

message slack.channels.map {|channel| channel['name']}.join "\n"

Get members

message slack.members.map {|member| member['name'] }.join "\n"

Notify danger reports to slack

slack.notify(channel: '#your_channel')

Post message to slack

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

How to Install

Include gem "danger-slack" in your project’s Gemfile. Then run bundle install.

Then inside your Dangerfile, you can access the plugin via slack.

Tags

slack

Repository

See in Action