1.0.0 • Published 8 years ago
hubot-gitter v1.0.0
What?
A simple Hubot adapter for gitter.im
How?
- Go to https://developer.gitter.im, login and get your own Personal Access Token (NOT your app token).
- Follow the instruction here to create your bot.
- In your bot folder, run
npm i -S hubot-gitter - Start your bot using this command,
TOKEN=<your Gitter Personal Access Token> ROOM="org/room1,org2/room3" ./bin/hubot -a gitterYou can let your bot join multiple rooms, each separates by comma (,)
- (Optional) Edit your
package.jsonand add this toscripts
{
"scripts": {
"start": "./bin/hubot --name tien -a gitter"
}
}Then you can start your bot with npm start. This is useful for deployment with Zeit (see below).
Deployment with Zeit
You can deploy your bot for free with Zeit. Assume that you are currently in your bot folder, the deploy command is:
now -e TOKEN=<your Gitter Personal Access Token> -e ROOM="org/room1,org2/room3" Zeit will automatically run npm start. Please note that Your code and logs will be made public. so be careful there.
It is possible that you would have multiple deployment with Zeit, resulting multiple instances of your bot joining the same rooms. To cure this, use now ls and now rm to delete old deployment.
Changelog
1.0.0
- Upgrade after a long time
- BREAKING:
ROOM_IDwas removed. UseROOMinstead.
0.0.2
- Utilize module
node-gitterto interact with Gitter API - Allow bot to join multiple rooms
- Change
ROOM_IDtoROOMfor shorter param name.ROOM_IDis still usable.
0.0.1
- Initial release