From f5c119fdaf444fc0b1b59c1e07fd32a5f6ddf069 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Tue, 1 Oct 2024 22:29:21 +0200 Subject: Initial commit --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..244f12f --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Webhook listener + +A webserver which runs commands when it receives webhook events from GitHub. + +## Local development + +To test the server in development, run: + +```sh +$ rm -f /tmp/webhook-listener.sock +$ nix develop --command systemfd --socket unix::/tmp/webhook-listener.sock -- target/debug/webhook-listener +``` + +Then, in another terminal, run this command to send a sample event: + +```sh +$ examples/sample_push_event.sh +``` + +`sample.http` contains a sample request signed with the key `mysecret`. The +payload from that request is found in `sample_push_payload.json` which is what +the above script sends. -- cgit v1.2.3