Skip to content

A Hubot instance that's here to protect you.

Notifications You must be signed in to change notification settings

aschwa2/pushbot

 
 

Repository files navigation

PushBot

Docker Repository on Quay.io

This is a version of GitHub's chat bot, Hubot. We use it to do silly things in our Slack chat.

Getting started

If you want to run PushBot, you'll need a few things on your system:

  • node.js and npm, the server-side JavaScript runtime. You can grab the tarballs from there or follow Joyent's other installation instructions. Personally, I use nvm, which is installed by my dotfiles.
  • Redis, a key-value store that's used for persistent storage. You should have a package for this for your operating system.

Testing Hubot Locally

You can test your hubot locally by running the following:

% bin/hubot

You'll see some start up output about where your scripts come from and a prompt.

[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading adapter shell
[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/scripts
[Sun, 04 Dec 2011 18:41:11 GMT] INFO Loading scripts from /home/tomb/Development/hubot/src/scripts
Hubot>

Then you can interact with hubot by typing hubot help.

Hubot> hubot help

Hubot> animate me <query> - The same thing as `image me`, except adds a few
convert me <expression> to <units> - Convert expression to given units.
help - Displays all of the help commands that Hubot knows about.
...

References

Want to contribute scripts? Here are a few references that might be handy.

  • Scripts are written in a language called CoffeeScript, a JavaScript transpiler.
  • If you need a reference for JavaScript itself, I recommend the Mozilla developer network.
  • Hubot's scripting API is documented in the hubot repo. You can also use the other scripts in scripts/ for reference, of course.

If your script starts to become big and complicated, you should consider extracting it to its own npm package. I did this for hubot-markov if you'd like to see an example. hubot-example is a template library that you can clone as a starting point: make sure you edit the package.json info before you publish!

About

A Hubot instance that's here to protect you.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CoffeeScript 94.9%
  • JavaScript 4.5%
  • Other 0.6%