Once upon a time, you managed your Github repositories,
the pull requests and the commits... didn't yoooou?
botdylan runs as a daemon. It's configured by writing a
cron scripts execute periodically
hook scripts execute on
github hook events.
$ ls /etc/botdylanscripts/hooksscripts/cronsconfig.json$ botdylan --dir /etc/botdylan
botdylan was initially built and used internally at Teambox.
We use Github heavily. There are some repetitive tasks that were taking away our time to hack on a better product. Since we are in the productivity space we decided to stop doing things manually and start to have a more productive environment to work with.
The project is heavily inspired by hubot.
You can automatize any process in GitHub. Some of the things we are currently doing:
- Label issues with the status of the CI
- Show a cowboy image when someone posts directly to develop.
- Label issues that have 2 or more thumbs
- Post images on demand "image me..."
- Label issues with the status of the PR (mergeable or not)
- Ping inactive pull requests
- Post message to your chat room (when the CI fails for instance)
- Interact with other services via HTTP
botdylan has just one CLI option:
--dir [current_path]: Location of your
Configuring botdylan is damn simple! Just populate your
config.json file on your
configuration directory with the following options:
username: Bot username
password: Bot password or oauth token
auth [basic]: Auth type to use when connecting to GitHub. Can be
repositories: Hash of repositories (owner/repository) with the
port : Port to listen github webhooks
silent [false]: Flag to disable output
"username": "botdylan""password": "blood-on-the-tracks""url": """port": 5000"repositories":"botdylan/test":"crons":"0 0 0 * * *": "ping""hooks":"issue_comment": "pong""push" : "cowboys"
scripts/hooks will run on any given hook event,
botdylan will create the hooks automatically if they don't exist.
scripts/crons use the
The scripts have to export a single function that will be executed by
Cron scripts receive:
Hooks scripts receive:
You will find plenty of examples under the
This object represents our beloved bot. It has some methods to help you write your scripts:
trace: Write a message to the console unless the
silentoption is sent
options: Options from your
handleError: Function applicator that handles showing errors if any
GitHubApiinstance of node-github
http: A request instance
events: Contains a
emitmessage. Ideal to communicate between scripts
store: A getter/setter memory storage.
There are plenty of things that we would like to have soon done:
- More scripts! Most of them can be imported from hubot which we love <3
scripts/eventsto be able to create scripts that are invoked from custom events
- Better tools for bot to reduce the boilerplate on the scripts
- Better documentation and how to script guides
(The MIT License)
Copyright (c) 2013 Pau Ramon email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.