Githubhook Save

Github webhook parser in golang

Project README

githubhook

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

Go Report Card GoDoc

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{}
if err := json.Unmarshal(hook.Payload, &evt); err != nil {
  fmt.Println("Invalid JSON?", err)
}
Open Source Agenda is not affiliated with "Githubhook" Project. README Source: rjz/githubhook
Stars
51
Open Issues
0
Last Commit
4 months ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating