3.0.0 • Published 2 years ago

hubot-slack-allowlist-middleware v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

Hubot Slack Allowlist

Don't want #general to trigger your bot?

Use this.

Originally based on https://github.com/michaeljacobdavis/hubot-slack-whitelist-middleware

How to use

Install

npm install --save hubot-slack-allowlist-middleware

Register

In external-scripts.json add

"hubot-slack-allowlist-middleware"

This is meant for Slack, but might work with any adapter that exposes the current channel via context.response.envelope.room.

Environment Variables

There are two ways to set a allowlist:

Environment VariableDescriptionExample
HUBOT_ALLOWLISTA comma separated list (no spaces).random,general
HUBOT_ALLOWLIST_PATHSet the path (relative to your hubot directory) to a json/js/coffee file that returns an array of allowlisted channels.allowlist.json
HUBOT_ALLOWLIST_DEBUGEnable additional debug logging when settrue
3.0.0

2 years ago

2.0.1

2 years ago

2.0.0

4 years ago