diff --git a/github/event_types.go b/github/event_types.go index 40ad919be5e..373d59bad2c 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -1787,6 +1787,7 @@ type WorkflowJobEvent struct { Repo *Repository `json:"repository,omitempty"` Sender *User `json:"sender,omitempty"` Installation *Installation `json:"installation,omitempty"` + Deployment *Deployment `json:"deployment,omitempty"` } // WorkflowRunEvent is triggered when a GitHub Actions workflow run is requested or completed. diff --git a/github/github-accessors.go b/github/github-accessors.go index 7d8292a9652..ed9353d1b91 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -26574,6 +26574,14 @@ func (w *WorkflowJobEvent) GetAction() string { return *w.Action } +// GetDeployment returns the Deployment field. +func (w *WorkflowJobEvent) GetDeployment() *Deployment { + if w == nil { + return nil + } + return w.Deployment +} + // GetInstallation returns the Installation field. func (w *WorkflowJobEvent) GetInstallation() *Installation { if w == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 4d7b022e12c..4269618a2c2 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -34093,6 +34093,14 @@ func TestWorkflowJobEvent_GetAction(tt *testing.T) { w.GetAction() } +func TestWorkflowJobEvent_GetDeployment(tt *testing.T) { + tt.Parallel() + w := &WorkflowJobEvent{} + w.GetDeployment() + w = nil + w.GetDeployment() +} + func TestWorkflowJobEvent_GetInstallation(tt *testing.T) { tt.Parallel() w := &WorkflowJobEvent{}