This repository sets up a simple Flask server to receive Bitbucket webhooks and notifies you via Mac OS X Notification Center
- Mac OS X 10.8+
- Python
- Pip
- ngrok (Note:
brew install ngrok
installs an old version. Use latest ngrok download instead.) - virtualenv (optional)
- Clone this repository and set it as the current working directory.
- (Optional, but good practice) Create a virtual environment.
mkvirtualenv webhook-listener
Once created, useworkon webhook-listener
to restore the virtual environment. pip install -r REQUIREMENTS.txt
loads required libraries.- Edit
.env
for a ngrok subdomain of your choosing. If you are using a free ngrok account, justrm .env
. honcho start
to start the ngrok tunnel and Flask server (python listener.py
to start without ngrok)- Configure your webhook (default:
http://bbwebhook.ngrok.io/webhook
) on your repo in Bitbucket. If you are using a free ngrok account, you can find an assigned URL on the ngrok dashboard under the Tunnels Online section. If you copy from the dashboard, be sure to add/webhook
to the end when you paste into Bitbucket.
- Access locally on http://localhost:5000
- Access remotely on http://bbwebhook.ngrok.io (subdomain is set in
.env
) - Access ngrok interface on http://localhost:4040
This repo uses: