Socket
Book a DemoInstallSign in
Socket

danger-plugin-slack

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

danger-plugin-slack

Report to Slack the result of Danger

1.1.2
latest
Source
npmnpm
Version published
Weekly downloads
1K
12.89%
Maintainers
1
Weekly downloads
 
Created
Source

danger-plugin-slack

Build Status npm version semantic-release Greenkeeper badge

Report to Slack the result of Danger

Usage

Install:

yarn add danger-plugin-slack --dev

To send the Danger report to slack:

// dangerfile.js
import slack from 'danger-plugin-slack'

const options = {
  webhookUrl: "YOUR_SLACK_WEBHOOK_URL" // only the webhook URL is required
}

slack(options) // to invoke at the end of the dangerfile to get the full report

To send a specific message:

// dangerfile.js
import slack from 'danger-plugin-slack'

const options = {
  webhookUrl: "YOUR_SLACK_WEBHOOK_URL",
  text: "Hello world!", // A custom message to send instead of the report (optional, default: null)
  username: "Jacky", // A custom sender name (optional, default: "DangerJS")
  iconEmoji: ":sunglasses:", // A custom emoji (optional, default: ":open_mouth:")
  iconUrl: "http://path/custom/icon/url", // A custom iconUrl (optional, default: null)
  channel: "#general", // A custom channel (optional)
}

slack(options)

Incoming Webhook

To get a new incoming webhook url, you will have to click here. Keep in mind that optional parameters such as channel or emoji doesn't work with integrations declared as Slack Apps. So it's better to create a simple incoming webhook.

Changelog

See the GitHub release history.

Contributing

See CONTRIBUTING.md.

Keywords

danger

FAQs

Package last updated on 17 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.