Listens for events from GitHub and 3rd party apps using EveryPolitician data and passes them on as webhooks in the same manner as GitHub's webhooks, featuring:
- JSON payload containing
countries_json_url
andpull_request_url
- signed (with the secret you provided) header:
X-EveryPolitician-Signature
This is superuseful if you want your app to be alerted whenever the EveryPolitician data changes. The EveryPolitician Bot has described how to use this service in more detail.
We're running this service for you at https://everypolitician-app-manager.herokuapp.com/
Get the code from GitHub
git clone https://github.com/everypolitician/webhook-manager
cd webhook-manager
Configure the environment by copying .env.example
and following the instructions inside to configure the app.
cp .env.example .env
vi .env
Then use vagrant to build a VM with all the dependencies installed:
vagrant up
Log in to the vagrant VM and start the app server and worker with foreman:
vagrant ssh
foreman start
Then visit http://localhost:5000 to view the app.
To run the tests use the following:
vagrant ssh
bundle exec rake test