From c271d4f1c61cc81155d301d15e921c9dee256a3f Mon Sep 17 00:00:00 2001 From: John Maguire Date: Wed, 17 Apr 2019 15:59:55 +0100 Subject: [PATCH] Parse SecurityAdvisory events --- github/github.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/github/github.go b/github/github.go index 9287eb5..bf0774d 100644 --- a/github/github.go +++ b/github/github.go @@ -60,6 +60,7 @@ const ( PushEvent Event = "push" ReleaseEvent Event = "release" RepositoryEvent Event = "repository" + SecurityAdvisoryEvent Event = "security_advisory" StatusEvent Event = "status" TeamEvent Event = "team" TeamAddEvent Event = "team_add" @@ -288,6 +289,10 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error) var pl RepositoryPayload err = json.Unmarshal([]byte(payload), &pl) return pl, err + case SecurityAdvisoryEvent: + var pl SecurityAdvisoryPayload + err = json.Unmarshal([]byte(payload), &pl) + return pl, err case StatusEvent: var pl StatusPayload err = json.Unmarshal([]byte(payload), &pl)