From ec588e224ba201e026a94ebd86a5909034c57b92 Mon Sep 17 00:00:00 2001 From: Wheeler Law Date: Wed, 31 May 2023 18:03:39 -0500 Subject: [PATCH 1/2] Add workflow run display title --- github/actions_workflow_runs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/github/actions_workflow_runs.go b/github/actions_workflow_runs.go index 704048774e6..61f736be4fb 100644 --- a/github/actions_workflow_runs.go +++ b/github/actions_workflow_runs.go @@ -22,6 +22,7 @@ type WorkflowRun struct { RunNumber *int `json:"run_number,omitempty"` RunAttempt *int `json:"run_attempt,omitempty"` Event *string `json:"event,omitempty"` + DisplayTitle *string `json:"display_title,omitempty"` Status *string `json:"status,omitempty"` Conclusion *string `json:"conclusion,omitempty"` WorkflowID *int64 `json:"workflow_id,omitempty"` From 1871a368dc3e936f3216ece487ed8aec631e82a0 Mon Sep 17 00:00:00 2001 From: Wheeler Law Date: Wed, 31 May 2023 21:26:04 -0500 Subject: [PATCH 2/2] Forgot to run go generate --- github/github-accessors.go | 8 ++++++++ github/github-accessors_test.go | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/github/github-accessors.go b/github/github-accessors.go index c2d9061c174..a9aaee814ab 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -22310,6 +22310,14 @@ func (w *WorkflowRun) GetCreatedAt() Timestamp { return *w.CreatedAt } +// GetDisplayTitle returns the DisplayTitle field if it's non-nil, zero value otherwise. +func (w *WorkflowRun) GetDisplayTitle() string { + if w == nil || w.DisplayTitle == nil { + return "" + } + return *w.DisplayTitle +} + // GetEvent returns the Event field if it's non-nil, zero value otherwise. func (w *WorkflowRun) GetEvent() string { if w == nil || w.Event == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index eb0a0db42c6..a29baa0f0c4 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -26079,6 +26079,16 @@ func TestWorkflowRun_GetCreatedAt(tt *testing.T) { w.GetCreatedAt() } +func TestWorkflowRun_GetDisplayTitle(tt *testing.T) { + var zeroValue string + w := &WorkflowRun{DisplayTitle: &zeroValue} + w.GetDisplayTitle() + w = &WorkflowRun{} + w.GetDisplayTitle() + w = nil + w.GetDisplayTitle() +} + func TestWorkflowRun_GetEvent(tt *testing.T) { var zeroValue string w := &WorkflowRun{Event: &zeroValue}