hubot-hall
v1.0.3
Published
A Hall adapter for hubot
Readme
hubot-hall
A Hubot adapter for Hall
Compatibility with Hubot
- Hubot >= 2.4.2
Compatibility with NodeJS
- Preferably use NodeJS 0.8.x or later
Installing Hubot-Hall on Heroku
Complete the instructions in the Hubot wiki and return to these steps to configure your app for Hall.
Create a new Hall account for your bot to use.
- You can set the first name and last name on the account to whatever you wish.
- Once setup is complete, you can invoke your bot with either the full name of the user account or with the name you give the bot when you start it up.
- Record the email address and password so you can configure your Hubot-Hall adapter later.
The
hubot/directory that you created in the Hubot on Heroku instructions above is all that is relevant to us now. Let's switch to it:% cd hubot/Edit
package.jsonand addhubot-hallto thedependenciessection. It should look something like this:"dependencies": { "hubot-hall": "latest", ... }If you won't be using the
redis-brain.coffeescript, you need to remove it from the array inhubot-scripts.jsonfile.Edit
Procfileand change it to use thehalladapter and give it a name (optional) wherebot_nameis the name you'll use to invoke the bot (it will default to hubot):web: bin/hubot -a hall -n bot_nameConfigure it:
You will need to set a configuration variable if you are hosting on the free Heroku plan (if you haven't already done so).
% heroku config:add HEROKU_URL=http://soothing-mists-4567.herokuapp.comWhere the URL is your Heroku app's URL (shown after running
heroku create, orheroku rename).Set the email to the email you used to register the bot with Hall:
% heroku config:add HUBOT_HALL_EMAIL="..."Set the password to the password chosen when you created the bot's account.
% heroku config:add HUBOT_HALL_PASSWORD="..."Add and commit your package.json changes:
% git add . % git commit -m "added the hubot-hall dependency"Deploy and start the bot:
% git push heroku master % heroku ps:scale web=1This will tell Heroku to run 1 of the
webprocess type which is described in theProcfile.You should see the bot join all rooms it has been added to. If not, check the output of
heroku logs. You can also useheroku configto check the config vars andheroku restartto restart the bot.heroku pswill show you its current process state.Assuming your bot's name is "Hubot", the bot will respond to commands like "@hubot help". The '@' symbol is optional.
To configure the commands the bot responds to, you'll need to edit the
hubot-scripts.jsonfile (valid script names here) or add scripts to thescripts/directory.To deploy an updated version of the bot, simply commit your changes and run
git push heroku masteragain.
Running on Unix
Complete the instructions in the Hubot wiki and return to these steps to configure your app for Hall.
Create a new Hall account for your bot to use.
- You can set the first name and last name on the account to whatever you wish.
- Once setup is complete, you can invoke your bot with either the full name of the user account or with the name you give the bot when you start it up.
- Record the email address and password so you can configure your Hubot-Hall adapter later.
The
hubot/directory that you created in the Hubot on Unix instructions above is all that is relevant to us now. Let's switch to it:% cd hubot/Edit
package.jsonand addhubot-hallto thedependenciessection. It should look something like this:"dependencies": { "hubot-hall": "latest", ... }Install the dependencies
% npm installConfigure it:
Set the email to the email you used to register the bot with Hall:
% heroku config:add HUBOT_HALL_EMAIL="..."Set the password to the password chosen when you created the bot's account.
% heroku config:add HUBOT_HALL_PASSWORD="..."Run the hubot with the Hall adapter
% bin/hubot -a hallOr run hubot from a script like so:
#!/bin/bash
export HUBOT_HALL_EMAIL="..."
export HUBOT_HALL_PASSWORD="..."
bin/hubot --a hall