diff --git a/github/event_types.go b/github/event_types.go index 2340a60156f..685e46f0287 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -469,7 +469,7 @@ type InstallationEvent struct { Repositories []*Repository `json:"repositories,omitempty"` Sender *User `json:"sender,omitempty"` Installation *Installation `json:"installation,omitempty"` - // TODO key "requester" is not covered + Requester *User `json:"requester,omitempty"` } // InstallationRepositoriesEvent is triggered when a repository is added or diff --git a/github/github-accessors.go b/github/github-accessors.go index eea7518cbab..2add2ead390 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -7358,6 +7358,14 @@ func (i *InstallationEvent) GetInstallation() *Installation { return i.Installation } +// GetRequester returns the Requester field. +func (i *InstallationEvent) GetRequester() *User { + if i == nil { + return nil + } + return i.Requester +} + // GetSender returns the Sender field. func (i *InstallationEvent) GetSender() *User { if i == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 5b2054bfeb4..ee75082382a 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -8634,6 +8634,13 @@ func TestInstallationEvent_GetInstallation(tt *testing.T) { i.GetInstallation() } +func TestInstallationEvent_GetRequester(tt *testing.T) { + i := &InstallationEvent{} + i.GetRequester() + i = nil + i.GetRequester() +} + func TestInstallationEvent_GetSender(tt *testing.T) { i := &InstallationEvent{} i.GetSender()