Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hairyhenderson/github-responder
A library & CLI tool that automatically sets up GitHub WebHooks and listens for events, with automatic TLS
https://github.com/hairyhenderson/github-responder
cli devops github github-webhooks gitops go golang-library hacktoberfest letsencrypt tls
Last synced: 14 days ago
JSON representation
A library & CLI tool that automatically sets up GitHub WebHooks and listens for events, with automatic TLS
- Host: GitHub
- URL: https://github.com/hairyhenderson/github-responder
- Owner: hairyhenderson
- License: mit
- Created: 2018-12-08T15:34:04.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T14:18:31.000Z (17 days ago)
- Last Synced: 2024-10-28T17:18:45.984Z (17 days ago)
- Topics: cli, devops, github, github-webhooks, gitops, go, golang-library, hacktoberfest, letsencrypt, tls
- Language: Go
- Homepage:
- Size: 4.24 MB
- Stars: 21
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# github-responder
![Build](https://github.com/hairyhenderson/github-responder/workflows/Build/badge.svg)
[![hairyhenderson/github-responder on DockerHub][dockerhub-image]][dockerhub-url]A library & CLI tool that automatically sets up GitHub WebHooks and listens for events, with automatic TLS provided by [certmagic][].
For example, if you want to run a command every time someone stars your repo (the `watch` event):
```console
$ github-responder --repo my/repo --domain myhost.example.com -e watch ./ring-the-bell.sh
...
```This will do a bunch of things:
1. Register a new Webhook at the named repo (`--repo`)
2. Start a web server to serve webhook events
3. Run the command `ring-the-bell.sh` every time a `watch` event is receivedA few more details:
- github-responder is reasonably secure:
- the webhook server is automatically protected by TLS, configured with a free automatically-renewing certificate from [Let's Encrypt][]
- the webhook listens at a randomly-generated URL - all other traffic is rejected
- incoming events must be signed by a randomly-generated secret key - every event is verified
- the command is provided with all event details:
- the event type is provided as the first flag on the command line
- the unique delivery ID is provided as the second flag on the command line (this can be used to de-duplicate events, which may be re-delivered in some cases)
- the event payload is sent to the command as standard input (in JSON format)
- logs are output as structured JSON, or in a slightly easier-to-read format when run in an interactive terminal
- github-responder can be used as a library in other Go programs## License
[The MIT License](http://opensource.org/licenses/MIT)
Copyright (c) 2018 Dave Henderson
[dockerhub-image]: https://img.shields.io/badge/docker-ready-blue.svg
[dockerhub-url]: https://hub.docker.com/r/hairyhenderson/github-responder[Let's Encrypt]: https://letsencrypt.org
[certmagic]: https://github.com/caddyserver/certmagic