Parse SecurityAdvisory events
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user