Skip to content

Repository files navigation

githubhook

Golang parser for github webhooks. Not a server, though it could be integrated with one.

Go Report CardGoDoc

Installation

$ go get gopkg.in/rjz/githubhook.v0

Usage

Given an incoming *http.Request representing a webhook signed with a secret, use githubhook to validate and parse its content:

secret:= []byte("don't tell!")
hook, err:=githubhook.Parse(secret, req)

Plays nicely with the google/go-github client!

evt:= github.PullRequestEvent{}
iferr:=json.Unmarshal(hook.Payload, &evt); err!=nil {
fmt.Println("Invalid JSON?", err)
}

About

Github webhook parser in golang

Topics

Resources

Contributing

Stars

54 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages