diff --git a/packs/slack/CHANGES.md b/packs/slack/CHANGES.md new file mode 100644 index 000000000..67aa805dd --- /dev/null +++ b/packs/slack/CHANGES.md @@ -0,0 +1,5 @@ +# Change Log + +# 0.3.0 + +- Rename `config.yaml` to `config.schema.yaml` and update to use schema. diff --git a/packs/slack/README.md b/packs/slack/README.md index 557a3e4dd..c265d769c 100644 --- a/packs/slack/README.md +++ b/packs/slack/README.md @@ -4,6 +4,9 @@ Pack which allows integration with [Slack](https://slack.com/) service. ## Configuration +Copy the example configuration in [slack`.yaml.example](./slack`.yaml.example) +to `/opt/stackstorm/configs/slack`.yaml` and edit as required. + * ``post_message_action.webhook_url`` - Webhook URL. * ``post_message_action.channel`` - Channel to send the message to (e.g. `#mychannel`). If not specified, messages will be sent to the channel which diff --git a/packs/slack/config.schema.yaml b/packs/slack/config.schema.yaml new file mode 100644 index 000000000..9954d6e5f --- /dev/null +++ b/packs/slack/config.schema.yaml @@ -0,0 +1,77 @@ +--- + post_message_action: + description: "Admin-action specific settings." + type: "object" + required: false + additionalProperties: false + properties: + webhook_url: + type: "string" + description: "Webhook URL, e.g. https://hooks.slack.com/services/" + default: true + required: true + channel: + type: "string" + description: "Channel to send message to - e.g. #mychannel. If not specified, will use channel selected when configuring webook" + required: false + username: + type: "string" + description: "Default name of user under which messages will be posted" + required: true + icon_emoji: + type: "string" + description: "Default icon of user under which messages will be posted" + default: ":panda_face:" + required: false + sensor: + description: "Sensor specific settings." + type: "object" + required: false + additionalProperties: false + properties: + token: + type: "string" + description: "Authentication token used to authenticate against Real Time Messaging API." + default: true + required: false + strip_formatting: + type: "boolean" + description: "Slack automatically parses URLs, images, channels, and usernames by default. This option returns raw data. Default false" + default: false + required: false + action_token: + description: "Slack Action token." + type: "string" + required: true + secret: true + admin: + description: "Admin-action specific settings." + type: "object" + required: false + additionalProperties: false + properties: + admin_token: + type: "string" + description: "Admin-level token for adding new users" + default: true + required: false + organization: + type: "string" + description: "Name of organisation to add new user to" + required: true + set_active: + type: "boolean" + description: "Set new user as active? Default true" + default: true + required: false + attempts: + type: "integer" + description: "Number of attempts to make to add the new user" + default: 1 + required: false + auto_join_channels: + type: "array" + description: "A list of channels to auto-join the new account to" + items: + type: "string" + required: false diff --git a/packs/slack/pack.yaml b/packs/slack/pack.yaml index 45cc983ca..7109bef45 100755 --- a/packs/slack/pack.yaml +++ b/packs/slack/pack.yaml @@ -7,6 +7,6 @@ keywords: - chat - messaging - instant messaging -version : 0.2.1 +version : 0.3.0 author : StackStorm, Inc. -email : info@stackstorm.com \ No newline at end of file +email : info@stackstorm.com diff --git a/packs/slack/config.yaml b/packs/slack/slack.yaml.example similarity index 93% rename from packs/slack/config.yaml rename to packs/slack/slack.yaml.example index 40d961d73..e55d2d508 100644 --- a/packs/slack/config.yaml +++ b/packs/slack/slack.yaml.example @@ -2,6 +2,7 @@ # Used for post message action post_message_action: webhook_url: "https://hooks.slack.com/services/" + channel: "#mychannel" username: "my-bot" icon_emoji: ":panda_face:"