Hubot

Hubot is an extendable bot created by GitHub. You can set up Hubot to work with Grove using an IRC connector. For deploying Hubot, we recommend Heroku.

To get started you'll need to sign up a new user to your organization. Register an account with the username you want your Hubot to be called. Here's how you can deploy the bot manually on Heroku but if you want you can use Tom Bell's Hubot Factory which will do most of the heavy lifting for you.

Setup

To install Hubot, you'll first need to have CoffeeScript and npm installed. Start the installation by cloning Hubot and creating a new instance.

git clone https://github.com/github/hubot.git
cd hubot
npm install
  
# Create new Hubot and switch directories
bin/hubot --create ../grovebot
cd ../grovebot
    
# Setup git repo
git init .
git add .
git commit -m "initial commit"

Now you need to add hubot-irc in the dependencies by editing the package.json file.

"dependencies": {
  "hubot-irc": ">= 0.0.1",
  "hubot": ">= 2.0.0",
  ...
}

Next modify the Procfile to match the following (remember to replace grovebot with your bot's name).

app: bin/hubot -a irc -n grovebot

Save both files and commit changes. Now it's time to deploy the app to Heroku (again, change grovebot to match your bot's name).

# Create Heroku app
heroku create grovebot --stack cedar
git push heroku master
  
# Some hubot extensions require Redis (RedisToGo needs to be active)
heroku addons:add redistogo:nano

Next configure your Hubot to work with Grove's IRC interface. Use your organization's and bot's information.

heroku config:add HUBOT_IRC_NICK="grovebot"
heroku config:add HUBOT_IRC_ROOMS="#channel-name"
heroku config:add HUBOT_IRC_SERVER="organization-name.irc.grove.io"
heroku config:add HUBOT_IRC_PASSWORD="organization-name"
heroku config:add HUBOT_IRC_NICKSERV_PASSWORD="password for the bot goes here"
# To use SSL but you can leave these out
heroku config:add HUBOT_IRC_PORT=6697
heroku config:add HUBOT_IRC_USESSL="true"

Once you're done, fire up your Hubot.

heroku ps:scale app=1

Now you should see the newly created Hubot join your chat rooms. Your Hubot should reply to you if you call it by name.

grovebot help

If it doesn't reply, something is wrong and you can get more information with commands.

heroku logs
heroku ps

Resources

To read more about deploying Hubot, check out these guides: