Add decode of base64 string from GitHub webhook
After debugging, it's evident that GitHub delivers base64-encoded strings for its payloads.
|8 meses atrás|
|.vscode||9 meses atrás|
|config||9 meses atrás|
|hooks||8 meses atrás|
|log||8 meses atrás|
|server||8 meses atrás|
|.gitignore||9 meses atrás|
|LICENSE||9 meses atrás|
|README.md||8 meses atrás|
|main.go||8 meses atrás|
GitHookParser is a nifty server written in Go that can take a GitHub webhook, parse it according to configuration, and redirect it to another POST endpoint.
Primarily, this can be used to manage multiple webhooks for GitHub repos on the fly and send them all to a push notification service defined by the user, such as Pushover. Currently, this is the only notification service supported.
To install GitHookParser, simply
go get -u -v github.com/stormfirefox1/GitHookParser
By default, a configuration file is needed under $HOME/.config/git-hook-parser/config.yml. If there is a file there, it will read any environment variables from the respective file. You will need to set, at minimum:
After creating the configuration file, run the compiled binary, either by
go install it or by running
go build and moving the binary to your directory of choice.
Then, point GitHub’s webhook to:
and watch the magic happen.