Skip to content

Commit c271d4f

Browse files
committed
Parse SecurityAdvisory events
1 parent 067e3f1 commit c271d4f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

github/github.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const (
6060
PushEvent Event = "push"
6161
ReleaseEvent Event = "release"
6262
RepositoryEvent Event = "repository"
63+
SecurityAdvisoryEvent Event = "security_advisory"
6364
StatusEvent Event = "status"
6465
TeamEvent Event = "team"
6566
TeamAddEvent Event = "team_add"
@@ -288,6 +289,10 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
288289
var pl RepositoryPayload
289290
err = json.Unmarshal([]byte(payload), &pl)
290291
return pl, err
292+
case SecurityAdvisoryEvent:
293+
var pl SecurityAdvisoryPayload
294+
err = json.Unmarshal([]byte(payload), &pl)
295+
return pl, err
291296
case StatusEvent:
292297
var pl StatusPayload
293298
err = json.Unmarshal([]byte(payload), &pl)

0 commit comments

Comments
 (0)