This is a couple of very rough python scripts that currently parse webhooks from Phabricator and Docker Hub, it then creates a message from that information and passes it on. Currently it sends the message to a Discord webhook and saves it as a json file. When parsing the Phabricator webhook it requests more information via the Conduit API. It currently supports Diffusion Commits, Differential Revisions, and Maniphest Tasks.
http://yourserver:9000/hooks/phabricatorhttp://yourserver:9000/hooks/dockerhubdocker-compose.yml namely:
PHABRICATOR_URL - URL for the Phabricator instancePHABRICATOR_TOKEN - Conduit API tokenDISCORD_URL - Discord webhook URLdocker-compose up -dThis uses Adnanh Webhook for incoming webhooks. It weakly/barely authenticates the webhook, parses the json body for specific info, and passes that off to the relevant python script.
phabricator.py will query Phabricator via a Conduit API wrapper for more information and bundle that into a message.
dockerhub.py takes the Docker Hub information and bundles it into a message.
webactivity.py is used to save messages to json files.
Discord notifications are sent using a Discord webhook API wrapper.
The Docker image is Alpine based and created using a multi-stage build in order to minimize its size. The Docker image is based on the one by almir.
The webhook examples folder has some examples of different webhooks to use for testing.
Content type
Image
Digest
Size
27.7 MB
Last updated
about 5 years ago
docker pull zeigren/benzaiten