- From the root directory of this repository, run:
$ stack build github-webhooks-servant-example --stack-yaml "stack-examples.yaml"
- Then to start the server:
$ PORT=8080 KEY=YOUR_GITHUB_TEST_SECRET stack exec github-webhooks-servant-example
- It will prompt you to install and run ngrok so that you can test your local server with responses from GitHub:
$ brew install ngrok # or apt-get install
$ ngrok http 8080
-
Navigate to your test repository on GitHub and configure your forwarding address (make sure to include
/hook
) and secret: -
Push a commit to the target repository.
-
The terminal will echo your comment/commit push SHA if your hook is configured correctly. You can replay the payloads from the webook control panel in the repository settings.