diff --git a/github/event_types.go b/github/event_types.go index 2c18de6c13f..bbb25af2a7e 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -819,6 +819,9 @@ type RepositoryVulnerabilityAlertEvent struct { DismissReason *string `json:"dismiss_reason,omitempty"` DismissedAt *Timestamp `json:"dismissed_at,omitempty"` } `json:"alert,omitempty"` + + //The repository of the vulnerable dependency. + Repository *Repository `json:"repository,omitempty"` } // StarEvent is triggered when a star is added or removed from a repository. diff --git a/github/github-accessors.go b/github/github-accessors.go index ca4b2678fcb..884f1acc6de 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -11540,6 +11540,14 @@ func (r *RepositoryVulnerabilityAlertEvent) GetAction() string { return *r.Action } +// GetRepository returns the Repository field. +func (r *RepositoryVulnerabilityAlertEvent) GetRepository() *Repository { + if r == nil { + return nil + } + return r.Repository +} + // GetForkRepos returns the ForkRepos field if it's non-nil, zero value otherwise. func (r *RepoStats) GetForkRepos() int { if r == nil || r.ForkRepos == nil {