Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

rjz/githubhook

Repository files navigation

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)
}

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.