1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/addons/slack-definition.js
2021-02-05 15:20:00 +01:00

65 lines
1.7 KiB
JavaScript

'use strict';
const {
FEATURE_CREATED,
FEATURE_UPDATED,
FEATURE_ARCHIVED,
FEATURE_REVIVED,
} = require('../event-type');
module.exports = {
name: 'slack',
displayName: 'Slack',
description: 'Allows Unleash to post updates to Slack.',
documentationUrl: 'https://unleash.github.io/docs/addons/slack',
parameters: [
{
name: 'url',
displayName: 'Slack webhook URL',
type: 'url',
required: true,
sensitive: true,
},
{
name: 'username',
displayName: 'Username',
placeholder: 'Unleash',
description:
'The username to use when posting messages to slack. Defaults to "Unleash".',
type: 'text',
required: false,
},
{
name: 'emojiIcon',
displayName: 'Emoji Icon',
placeholder: ':unleash:',
description:
'The emoji_icon to use when posting messages to slack. Defaults to ":unleash:".',
type: 'text',
required: false,
},
{
name: 'defaultChannel',
displayName: 'Default channel',
description:
'Default channel to post updates to if not specified in the slack-tag',
type: 'text',
required: true,
},
],
events: [
FEATURE_CREATED,
FEATURE_UPDATED,
FEATURE_ARCHIVED,
FEATURE_REVIVED,
],
tagTypes: [
{
name: 'slack',
description:
'Slack tag used by the slack-addon to specify the slack channel.',
icon: 'S',
},
],
};