,------.
`-____-' ,-----------.
,i--i. | |
/ @ @ \ / HEE HEE! |
| -.__.- | ___-' J
\. ,/ """"""""""""""""""'
,\""""/.
,' `--' `.
(_,i' `i._)
| |
| ,. |
| | | |
`-' `-'
Pullsbury Gitboy helps teams collaborate more effectively on pull requests. It listens to webhooks from github, then it posts a slack notification into a team channel once a PR has been opened.
Pullsbury Gitboy requires:
- Python 2.7
- RabbitMQ (or any other Message broker that is compatible with Celery)
- A publically addressable hostname/IP that either github or your github:enterprise can reach.
- A github account with read/write access to the repositories you want to watch. This account is used fetch additional information about the pull requests it sees.
Pullsbury Gitboy runs as two processes. A web process handles accepting webhooks from github, and a celery process handles asking github for more information, and the actual slack calls. You'll also need to have rabbitmq-server running.
You install Pullsbury Gitboy by cloning the repository and installing dependecies,
or by using docker. If you are not using docker, it is recommended that you use
virtualenv
to save shaving yaks down the road.
git clone git://github.com/AntonNguyen/pullsbury.git
cd pullsbury
pipenv install
Once the dependencies are installed you should configure the repositories you want to watch.
To use docker, you'll need to install both docker, docker-compose and possibly docker toolbox depending on your operating system. Once you have the docker installed, you can boot up pullsbury into docker using:
docker build --tag=pullsbury_image .
docker-compose up -d broker worker web
Edit docker-composer.yml and customise your configuration by setting keys under environment for the
web and worker processes. For the most basic installation you'll need to set at least GITHUB_USERNAME
and GITHUB_PASSWORD
(or GITHUB_OAUTH_TOKEN
), and PULLSBURY_SERVER_NAME
.
Pullsbury Gitboy is configured through a settings file. Both the web app and celery process share the same configuration file, so configuration is easier to manage and share.
- Edit the required configuration options, or set the correct environment variables.
- Set the
PULLSBURY_SETTINGS
environment variable to the path of your configuration files. In *nix system this can be done via:
export PULLSBURY_SETTINGS='/path/to/settings.py'
- You can skip setting
PULLSBURY_SETTINGS
if you're running Pullsbury Gitboy from a directory containing yoursettings.py
file.
After setting up configuration you'll need to start up both processes:
pipenv run gunicorn pullsbury.web:app
Now when ever a pull request is opened for a registered repository new jobs will be spun up and notify the appropriate slack channels.