[Github] Add installation_repositories event (#55)
I've recently been using your type definitions while playing around with the Github Webhooks and I realised the `install_repositories` event was missing. I've added it and updated the tests.
This commit is contained in:
committed by
Dean Karn
parent
80aa7fa2fe
commit
bba5196bce
@@ -36,6 +36,7 @@ const (
|
||||
ForkEvent Event = "fork"
|
||||
GollumEvent Event = "gollum"
|
||||
InstallationEvent Event = "installation"
|
||||
InstallationRepositoriesEvent Event = "installation_repositories"
|
||||
IntegrationInstallationEvent Event = "integration_installation"
|
||||
IssueCommentEvent Event = "issue_comment"
|
||||
IssuesEvent Event = "issues"
|
||||
@@ -193,6 +194,10 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
|
||||
var pl InstallationPayload
|
||||
err = json.Unmarshal([]byte(payload), &pl)
|
||||
return pl, err
|
||||
case InstallationRepositoriesEvent:
|
||||
var pl InstallationRepositoriesPayload
|
||||
err = json.Unmarshal([]byte(payload), &pl)
|
||||
return pl, err
|
||||
case IssueCommentEvent:
|
||||
var pl IssueCommentPayload
|
||||
err = json.Unmarshal([]byte(payload), &pl)
|
||||
|
||||
Reference in New Issue
Block a user