8000 Updates README for google/go-github · rjz/githubhook@57dc829 · GitHub
[go: up one dir, main page]

Skip to content

Commit 57dc829

Browse files
committed
Updates README for google/go-github
1 parent fd12011 commit 57dc829

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@ use `githubhook` to validate and parse its content:
1818
secret := []byte("don't tell!")
1919
hook, err := githubhook.Parse(secret, req)
2020

21+
Plays nicely with the [google/go-github][gh-go-github] client!
22+
23+
evt := github.PullRequest{}
24+
if err := json.Unmarshal(hook.Payload, &evt); err != nil {
25+
fmt.Println("Invalid JSON?", err)
26+
}
27+
2128
[gh-webhook]: https://developer.github.com/webhooks/
29+
[gh-go-github]: https://github.com/google/go-github

0 commit comments

Comments
 (0)
0