Skip to content

Commit

Permalink
Add created_at to WorkflowJob struct (#2671)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Lish committed Feb 23, 2023
1 parent e7e7149 commit 1f3c5a5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions github/actions_workflow_jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type WorkflowJob struct {
HTMLURL *string `json:"html_url,omitempty"`
Status *string `json:"status,omitempty"`
Conclusion *string `json:"conclusion,omitempty"`
CreatedAt *Timestamp `json:"created_at,omitempty"`
StartedAt *Timestamp `json:"started_at,omitempty"`
CompletedAt *Timestamp `json:"completed_at,omitempty"`
Name *string `json:"name,omitempty"`
Expand Down
4 changes: 4 additions & 0 deletions github/actions_workflow_jobs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ func TestWorkflowJob_Marshal(t *testing.T) {
HTMLURL: String("h"),
Status: String("s"),
Conclusion: String("c"),
CreatedAt: &Timestamp{referenceTime},
StartedAt: &Timestamp{referenceTime},
CompletedAt: &Timestamp{referenceTime},
Name: String("n"),
Expand Down Expand Up @@ -278,6 +279,7 @@ func TestWorkflowJob_Marshal(t *testing.T) {
"html_url": "h",
"status": "s",
"conclusion": "c",
"created_at": ` + referenceTimeStr + `,
"started_at": ` + referenceTimeStr + `,
"completed_at": ` + referenceTimeStr + `,
"name": "n",
Expand Down Expand Up @@ -312,6 +314,7 @@ func TestJobs_Marshal(t *testing.T) {
HTMLURL: String("h"),
Status: String("s"),
Conclusion: String("c"),
CreatedAt: &Timestamp{referenceTime},
StartedAt: &Timestamp{referenceTime},
CompletedAt: &Timestamp{referenceTime},
Name: String("n"),
Expand Down Expand Up @@ -344,6 +347,7 @@ func TestJobs_Marshal(t *testing.T) {
"html_url": "h",
"status": "s",
"conclusion": "c",
"created_at": ` + referenceTimeStr + `,
"started_at": ` + referenceTimeStr + `,
"completed_at": ` + referenceTimeStr + `,
"name": "n",
Expand Down
8 changes: 8 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f3c5a5

Please sign in to comment.