Skip to content

Bitbucket webhook that sends events from bitbucket to chat channel (Skype)

License

Notifications You must be signed in to change notification settings

khoahuynhdev/bitbucket-webhook

Repository files navigation

This repository sets up a simple Flask server to receive Bitbucket webhooks and notifies you via Skype channel

Requirements

  • Mac OS X 10.8+
  • Python
  • Pip
  • ngrok (Note: brew install ngrok installs an old version. Use latest ngrok download instead, for development only)
  • virtualenv (optional)

Installation

  1. Clone this repository and set it as the current working directory.
  2. (Optional, but good practice) Create a virtual environment. mkvirtualenv webhook-listener Once created, use workon webhook-listener to restore the virtual environment.
  3. pip install -r REQUIREMENTS.txt loads required libraries.
  4. Edit .env for a ngrok subdomain of your choosing. If you are using a free ngrok account, just rm .env.
  5. honcho start to start the ngrok tunnel and Flask server (python listener.py to start without ngrok)
  6. Configure your webhook (default: http:https://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

Thanks

This repo uses:

  • Microframework: Flask
  • Python Foreman clone: Honcho
  • Python wrapper for Mac OS 10.8 Notification Center: pync
  • Secure tunneling to localhost: ngrok

About

Bitbucket webhook that sends events from bitbucket to chat channel (Skype)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages