Skip to content

Latest commit

 

History

History

dullahan-plugin-slack

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Dullahan Plugin Slack

Allows Dullahan to send messages to Slack.

Table of Contents

Getting Started

Install this plugin:

yarn add @k2g/dullahan-plugin-slack

Note: Our documentation uses yarn commands, but npm will also work. You can compare yarn and npm commands in the yarn docs, here.

Now that the plugin is installed, you can add it to your Dullahan configuration file:

export default {
    plugins: [
        '@k2g/dullahan-plugin-slack'
    ]
}

Plugin Options

name type default description
webhook string DULLAHAN_SLACK_WEBHOOK, SLACK_WEBHOOK The webhook generated by Slack to be used
channel string - The channel (or private user chat) to be used (must start with # or @)
mention string - Used to mention a user, channel or workspace ('@here', '@channel' or '@everyone')
when string 'always' Choose from 'always', 'failure' or 'success'
maxPreviews number 3 The maximum amount of failed tests that should be previewed in Slack
slowTestThreshold number 60000 A successful test should be considered a slow test if it took more than the specified number of milliseconds to complete
attachments object {} An object of key-value pairs to be added to the message as attachments

To change any of these options, pass along an object containing the options you wish to change to Dullahan:

export default {
    plugins: [
        ['@k2g/dullahan-plugin-slack', {
            channel: '#dullahan-results',
            attachments: {
                Browser: 'Google Chrome',
                System: 'Windows 10',
                Cat: 'Dog'
            }
        }]
    ]
}

Companion Plugins

Frequently Asked Questions

Question: Can I send multiple messages using this plugin?

Answer: Yes, simply create a second entry for this plugin in your config and give it the options that you'd like.

License

This plugin is licensed under GPL-3.0.