| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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 config.json file that describes cron and hooks scripts. cron scripts execute periodically and hook scripts execute on github hook events.
$ ls /etc/botdylan scripts/hooks scripts/crons config.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:
botdylan has just one CLI option:
Configuring botdylan is damn simple! Just populate your config.json file on your configuration directory with the following options:
{
"username": "botdylan"
, "password": "blood-on-the-tracks"
, "secret": "myhashsecret"
, "url": "http://example.com:5000"
, "port": 5000
, "repositories": {
"botdylan/test": {
"crons": {
"0 0 0 * * *": ["ping"]
}
, "hooks": {
"issue_comment": ["pong"]
, "push" : ["cowboys"]
}
}
}
, "github_api": {
"host": "my-enterprise-github-instance.mycompany.com" // if you're using GitHub Enterprise,
"timeout": 2000
}
}Scripts under scripts/hooks will run on any given hook event, botdylan will create the hooks automatically if they don't exist.
Scripts under scripts/crons use the cron syntax.
Sometimes you might not want to store your GitHub credentials inside repository. In order to prevent this you can use three environment variables: GITHUB_USERNAME, GITHUB_PASSWORD, GITHUB_WEBHOOK_SECRET - when set they will overwrite username, password, secret config options.
Example:
GITHUB_USERNAME=johndoe GITHUB_PASSWORD=qwerty GITHUB_WEBHOOK_SECRET=bazinga botdylan --dir /etc/botdylan
The scripts have to export a single function that will be executed by botdylan.
Cron scripts receive:
Hooks scripts receive:
You will find plenty of examples under the scripts folder.
This object represents our beloved bot. It has some methods to help you write your scripts:
There are plenty of things that we would like to have soon done:
(The MIT License)
Copyright (c) 2013 Pau Ramon masylum@gmail.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.
| Back | FazBrowse Home | New Git URL |