All Projects → cycomachead → hubot-group-alias

cycomachead / hubot-group-alias

Licence: MIT License
@mentions for groups using Hubot

Programming Languages

coffeescript
4710 projects
shell
77523 projects

Projects that are alternatives of or similar to hubot-group-alias

hubot-pager-me
PagerDuty integration for Hubot
Stars: ✭ 74 (+428.57%)
Mutual labels:  hubot, hubot-scripts
hubot-seen
A hubot script that tracks when/where users were last seen.
Stars: ✭ 25 (+78.57%)
Mutual labels:  hubot, hubot-scripts
hubot-ansible
A hubot script for launching ansible commands
Stars: ✭ 14 (+0%)
Mutual labels:  hubot, hubot-scripts
hubot-github-repo-event-notifier
Notifies about any GitHub repo event available via webhook.
Stars: ✭ 58 (+314.29%)
Mutual labels:  hubot, hubot-scripts
hubot-analytics
📈 A hubot script to get google analytics reports
Stars: ✭ 16 (+14.29%)
Mutual labels:  hubot, hubot-scripts
hubot-code-review
A Hubot script for GitHub code review on Slack.
Stars: ✭ 38 (+171.43%)
Mutual labels:  hubot, hubot-scripts
hubot-broadlink-rm
A hubot script to learn and send IR hex codes with Broadlink RM
Stars: ✭ 24 (+71.43%)
Mutual labels:  hubot, hubot-scripts
Huggies
Huggies is a plug and play automation tool for AWS Elastic Beanstalk
Stars: ✭ 13 (-7.14%)
Mutual labels:  hubot
hubot-typescript-boilerplate
ChatOps made easier
Stars: ✭ 20 (+42.86%)
Mutual labels:  hubot
evolution
proposals for changes and user-visible enhancements to Hubot
Stars: ✭ 42 (+200%)
Mutual labels:  hubot
hubot-schedule
A hubot script to schedule a message in both cron-style and datetime-based format pattern
Stars: ✭ 46 (+228.57%)
Mutual labels:  hubot
hubot-bearychat
BearyChat Adapter for Hubot
Stars: ✭ 99 (+607.14%)
Mutual labels:  hubot
hubot-suggest
Suggest hubot commands when not found
Stars: ✭ 29 (+107.14%)
Mutual labels:  hubot
docker-hubot
Docker container for running hubot in a container.
Stars: ✭ 17 (+21.43%)
Mutual labels:  hubot
st2chatops
Packaging environment for building StackStorm chatops native packages
Stars: ✭ 26 (+85.71%)
Mutual labels:  hubot
hackmit-hackbot
🤖 HackMIT's personal assistant!
Stars: ✭ 13 (-7.14%)
Mutual labels:  hubot
hubot-dingtalk
hubot-dingtalk:支持钉钉Outgoing
Stars: ✭ 29 (+107.14%)
Mutual labels:  hubot
gubot
A hubot like bot written in golang which is langage agnostic and cloud agnostic
Stars: ✭ 29 (+107.14%)
Mutual labels:  hubot
hubot-markov
Hubot watches all, and builds a markov model from everything you say.
Stars: ✭ 63 (+350%)
Mutual labels:  hubot
hubot-zulip
No description or website provided.
Stars: ✭ 19 (+35.71%)
Mutual labels:  hubot

Hubot Group Alias

Group Alias is a simple Hubot package which allows you to define new "@mentions" which are automatically expanded. For example, you could define @dev, @design to send a message to all members of your teams. Using hubot-auth, you can also dynamically define groups!

Setup

  1. All this package to your package.json. Do this by running this command:

    npm install --save hubot-group-alias
  2. Add "hubot-group-alias" to external-scripts.json:

    [
    "...",
    "hubot-group-alias",
    "..."
    ]
  3. Set the HUBOT_GROUP_ALIAS variable.

     heroku config:add HUBOT_GROUP_ALIAS=...
    
    • (Read below for configuration instructions.)
  4. Optional: set HUBOT_GROUP_ALIAS_NAME_PROP

    • This is the property of the User object that contains the short or @ name for each user. The problem is this field is non-standard and defined by each user.
    • This field is likely required if you want sender's usernames to be filtered from the messages sent, or you're using hubot-auth. This is because both those features rely on matching this property for expanding the message.
    • This property first checks User.mention_name then User.name
    • Here are some examples:
      • HipChat: HUBOT_GROUP_ALIAS_NAME_PROP="mention_name"
      • Slack: I think this should be just User.name, but I'm not sure, because I don't use Slack.

HUBOT_GROUP_ALIAS Format

The format for configuration is easy:

alias1=user1,user2;alias2=user1

That is:

  • Separate different aliases by ;.
  • Define an alias with =.
  • Separate users by ,.
  • Users (and aliases) should not have @.
  • Aliases are case insensitive.

Note: When set in a shell environment, you may want to put '' around your alias definition so that any ; don't try to break the command.

Dynamic Configuration

Group Alias supports dynamically defining groups using the hubot-auth package. All "roles" that are created by hubot-auth will be treated able to be expanded into @mention messages. To do this, simple set:

HUBOT_GROUP_ALIAS='DYNAMIC'

and make sure hubot-auth is installed.

Notes
  • The only supported modes are dynamic or pre-defined. There is currently no "hybrid" mode. (I would welcome a PR if anyone wants this!)
  • Currently dynamic mode is not case sensitive because hubot-auth roles act the same way.
  • You should probably set HUBOT_GROUP_ALIAS_NAME_PROP because otherwise, hubot-auth may use a different User name from the @ name. (Please see the section above for more details)

Autocomplete Abilities

By default, most chat apps don't support autocomplete for bots. :(

However, Group Alias includes the ability to use custom emoji in order to allow apps autocomplete. This should work with most chat clients, though please file an issue if there is a different emoji syntax I've missed. To use this feature, all you need to do is add the emoji to your particular chatroom, with the same name as the alias.

The script matches the following forms of the alias dev:

  • @dev
  • (dev)
  • :dev:
  • ::dev::

Usage

For example:

If you set the configuration as: dev=Alice,Bob,Eve

And the message sent is:

PO> Hey @dev, there's a standup in 5 min.

Then this message will be sent by Hubot:

Hubot> Hey @Alice @Bob @Eve, there's a standup in 5 min.

Note that as of version 1.6.0 users' names are filtered from the messages they send.

In the above example, the following would happen if @Alice sent a message:

Alice> Hey @dev, there's a standup in 5 min.`
Hubot> Hey @Bob @Eve, there's a standup in 5 min.`
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].