GitHub - calvingiles/webhook-bridge: Simple micro-service that accepts POST data in one format and re-POSTs it in another - http://suspension.io
Skip to content

Simple micro-service that accepts POST data in one format and re-POSTs it in another - http://suspension.io

License

Notifications You must be signed in to change notification settings

calvingiles/webhook-bridge

Repository files navigation

webhook-bridge

webhook-bridge is a simple python micro service you can run on heroku to bridge two webhooks that don't agree on the formatting.

The only bridge currently supported converts from ProdPad Ideas to Slack posts in the format of my liking. Want more? send me some feedback. Like it? Let everyone know.

The private details of your webhooks live only in the parametes of the url you post to in the first place - to use the hook requires no code changes whatsoever.

To use

Push to heroku and find your {heroku_app_name}.heroku.com.

Create an incoming webhook on slack and copy the url (I will call it {slack_hook_url} (something like https://your-company.slack.com/services/hooks/incoming-webhook?token=jGIb86HJD35agksoHnn28).

Create an outgoing webhook on Prodpad and set the url to:

{heroku_app_name}.heroku.com/interpret_webhook?hook_url={slack_hook_url}

Customising behaviour

Change 'translator.translate_payload()` to modify the behaviour of the hook.

Feedback?

Get in touch on twitter, email or by posting an issue if you have any feedback or just want to say you like it.

For develompent

  • Clone the repo
  • Get the Heroku Toolbelt
  • push to your heroku account. Calvin is keeper of the keys for this one for now.

requirements.txt and virtualenv

To set up a veritual env locally, cd to the root of the project and run:

$ virtualenv venv

This will reate a venv folder with virtualenv wrapped python and pip executables. To activate them in the current shell, use:

$ source venv/bin/activate

To install the requirements from the existing requirements.txt file, run:

$ pip install -r requirements.txt --allow-all-external

If you subsequently change the configuration by installing additional packages via the venv pip, use pip freeze to create a new requirements.txt file.

$ pip freeze > requirements.txt

With a locally installed venv, start your app in a heroku-like manor with foreman start web.

About

Simple micro-service that accepts POST data in one format and re-POSTs it in another - http://suspension.io

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published