Code for running a webhook service to receive webhooks sent by a git server.
Go to file
2024-08-10 08:20:06 +10:00
.gitignore Initial commit 2024-08-01 15:20:34 +10:00
curl_test.sh Add files 2024-08-01 18:19:05 +10:00
docs.md Add files 2024-08-01 18:19:05 +10:00
git-webhooks.env Add files 2024-08-01 18:19:05 +10:00
git-webhooks.service Add files 2024-08-01 18:19:05 +10:00
LICENSE Initial commit 2024-08-01 15:20:34 +10:00
nginx.conf Add files 2024-08-01 18:19:05 +10:00
package-lock.json Add files 2024-08-01 18:19:05 +10:00
package.json Add files 2024-08-01 18:19:05 +10:00
README.md update docs and comments 2024-08-10 08:19:09 +10:00
webhooks.js update docs and comments 2024-08-10 08:19:09 +10:00

🪝 git-webhooks

This Express app listens for webhook events from a git hosting service. It was originally written for GitHub but also works with Gitea and Forgejo, and anything else that uses the X-Hub-Signature-256 header to send an HMAC SHA-256 digest of the payload. Alternatively you could change the code to look for a different header.

How this works is outlined in a blog post - Automation workflows with GitHub Actions and Webhooks, though I have slightly updated the code since then.

Installation

See the instructions for installing on a server.

Testing

There isn't a test suite, but you can use the curl_test.sh script to manually test that your app is working correctly.

Notes for Hugh

Remember that you adjusted this on the server to run process.js to merge csv changes into the topojson file!