Coder Social home page Coder Social logo

danger-plugin-slack's Introduction

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.

danger-plugin-slack's People

Contributors

julon avatar greenkeeper[bot] avatar semantic-release-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.