Skip to content

Instantly share code, notes, and snippets.

@lonnen
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lonnen/8699bf472c98ba34e580 to your computer and use it in GitHub Desktop.
Save lonnen/8699bf472c98ba34e580 to your computer and use it in GitHub Desktop.
leeroybot config to get things started
[11:00:20] $ heroku config
=== leeroy-bot Config Vars
HUBOT_IRC_DEBUG: 1
HUBOT_IRC_NICK: leeroybot
HUBOT_IRC_NICKSERV_PASSWOR: ---------
HUBOT_IRC_NICKSERV_USERNAME: leeroybot
HUBOT_IRC_PORT: 6697
HUBOT_IRC_ROOMS: #dangerzone,#breakpad,#airmozilla-dev
HUBOT_IRC_SERVER: irc.mozilla.org
HUBOT_IRC_UNFLOOD: true
HUBOT_IRC_USESSL: 1
HUBOT_JENKINS_AUTH: bots:-------
HUBOT_JENKINS_URL: https://ci.mozilla.org
HUBOT_TRAVIS_DEBUG: 1
REDISCLOUD_URL: redis://rediscloud:----------@pub-redis-19450.us-east-1-1.2.ec2.garantiadata.com:19450

github change --> travis build --> notification to heroku hosted robot.

so

your github project has a .travis.yml with a notifications section. see: https://github.com/mozilla/socorro/blob/master/.travis.yml#L36

your hubot fork has a .travis.yml with a heroku deploy section. You need to set that up with the travis-ci client library and your heroku info. see: http://docs.travis-ci.com/user/deployment/heroku/ , https://github.com/lonnen/leeroybot/blob/master/.travis.yml#L4

you should change the irc user. the readme has lots of info about how to write a custom script. When I need something slightly wonky I tend to steal the script from the main travis scripts repo (linked in the readme) and add a couple lines of IF/ELSE/THEN/UNLESS logic to filter out noisy I don't need.

This set up will auto deploy on PR merge. If no one interacts with the bot for a few hours heroku will spin down the single node and the bot will log off. You can work around this by throwing a monitor on, or curling with a cron, the help URL for the bot. http://your.domain.com/:botname/help

For writing coffeescript:

http://coffeescript.org/

I heavily use the "try coffeescript" section at the top of the page. It will live transpile, show you errors, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment