diff --git a/github/event_types.go b/github/event_types.go index 8330353a3c1..50c7b567bcf 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -485,6 +485,7 @@ type IssuesEvent struct { Repo *Repository `json:"repository,omitempty"` Sender *User `json:"sender,omitempty"` Installation *Installation `json:"installation,omitempty"` + Milestone *Milestone `json:"milestone,omitempty"` } // LabelEvent is triggered when a repository's label is created, edited, or deleted. diff --git a/github/github-accessors.go b/github/github-accessors.go index 63b1079cdfd..f502995ef16 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -8390,6 +8390,14 @@ func (i *IssuesEvent) GetLabel() *Label { return i.Label } +// GetMilestone returns the Milestone field. +func (i *IssuesEvent) GetMilestone() *Milestone { + if i == nil { + return nil + } + return i.Milestone +} + // GetRepo returns the Repo field. func (i *IssuesEvent) GetRepo() *Repository { if i == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 961eba82888..8fea0bb5fd9 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -9843,6 +9843,13 @@ func TestIssuesEvent_GetLabel(tt *testing.T) { i.GetLabel() } +func TestIssuesEvent_GetMilestone(tt *testing.T) { + i := &IssuesEvent{} + i.GetMilestone() + i = nil + i.GetMilestone() +} + func TestIssuesEvent_GetRepo(tt *testing.T) { i := &IssuesEvent{} i.GetRepo()