From d09e464e63068e84183ebf865f5184b62bda2f2a Mon Sep 17 00:00:00 2001 From: noble-varghese Date: Mon, 8 Jan 2024 23:35:53 +0530 Subject: [PATCH 1/2] feat: Adding 'repo' and 'action' in issues_event --- github/issues_events.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/github/issues_events.go b/github/issues_events.go index 23a16bcdc72..bba3b180311 100644 --- a/github/issues_events.go +++ b/github/issues_events.go @@ -18,6 +18,9 @@ type IssueEvent struct { // The User that generated this event. Actor *User `json:"actor,omitempty"` + // The action corresponding to the event. + Action string `json:"action,omitempty"` + // Event identifies the actual type of Event that occurred. Possible // values are: // @@ -74,6 +77,7 @@ type IssueEvent struct { Issue *Issue `json:"issue,omitempty"` // Only present on certain events; see above. + Repository *Repository `json:"repository,omitempty"` Assignee *User `json:"assignee,omitempty"` Assigner *User `json:"assigner,omitempty"` CommitID *string `json:"commit_id,omitempty"` From 33b4d6ee4ef887b2147139926583a8cd86c062a8 Mon Sep 17 00:00:00 2001 From: noble-varghese Date: Tue, 9 Jan 2024 00:10:53 +0530 Subject: [PATCH 2/2] feat: Add support for repo events in issue events --- github/github-accessors.go | 8 ++++++++ github/github-accessors_test.go | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/github/github-accessors.go b/github/github-accessors.go index 3f24a795e5c..256bfacfb50 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -9510,6 +9510,14 @@ func (i *IssueEvent) GetRename() *Rename { return i.Rename } +// GetRepository returns the Repository field. +func (i *IssueEvent) GetRepository() *Repository { + if i == nil { + return nil + } + return i.Repository +} + // GetRequestedReviewer returns the RequestedReviewer field. func (i *IssueEvent) GetRequestedReviewer() *User { if i == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index e575fea2526..461ce8ed7eb 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -11096,6 +11096,13 @@ func TestIssueEvent_GetRename(tt *testing.T) { i.GetRename() } +func TestIssueEvent_GetRepository(tt *testing.T) { + i := &IssueEvent{} + i.GetRepository() + i = nil + i.GetRepository() +} + func TestIssueEvent_GetRequestedReviewer(tt *testing.T) { i := &IssueEvent{} i.GetRequestedReviewer()