Hubot with Git Submodules

I love hubot and use one in a few different places. One thing I do find though is that I often want to edit or evolve those plugins, and it seems somehow unethical to just hardcode my changes into my own repo. Once I figured out how to wire together a forked repo as a submodule, it became much easier to work with hubots with external plugins, so I thought I’d share my recipe for that. Continue reading

Set Up Your First Hubot

It took me far too long to get my first hubot working; when I finally sat down to get it going the process was much easier than I expected! So here’s a little guide in the hope that this helps you get started too.
Continue reading

Hubot and Slack

I’m enjoying using hubot to integrate services very easily and both give updates and respond to commands in chat. One of my hubots chats to us in slack rather than in IRC, and there are a couple of gotchas that I wish I’d known about before I started!

  • Hubot will not respond to you in PM, you need to join a channel and then /invite @hubot and your bot will join you in that channel and then respond when you address him/her by name
  • When configuring channel names for slack (I use the gitlab plugin which needs a GITLAB_CHANNEL environment variable), do NOT include a # at the start of it if you use slack – works a treat in IRC, but skip it for slack. I spent quite a while looking for a bug in the slack adapter before I figured this one out so it’s written here for me to look up next time!
  • Also note that your hubot can only speak in channels that it has joined; I have seen hubot actually crash when asked to speak in a channel that exists but which isn’t known to it.

I think this central way of having plugins which can integrate with many messaging platforms on one side, and integrate with many external APIs on the other means we’ll be doing much more in chat ops moving forward. Already I’m impressed by how many of the hosted tools I use have webhooks, although there aren’t hubot plugins for all of them (yet!).