Skip to content

derekgottlieb/hubot-slack-allowlist-middleware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Variable Description Example
HUBOT_ALLOWLIST A comma separated list (no spaces). random,general
HUBOT_ALLOWLIST_PATH Set the path (relative to your hubot directory) to a json/js/coffee file that returns an array of allowlisted channels. allowlist.json
HUBOT_ALLOWLIST_DEBUG Enable additional debug logging when set true

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.2%
  • Shell 1.8%