Skip to content

Commit

Permalink
Add RunAttempt field for WorkflowJob (#2562)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Dvoinos committed Nov 25, 2022
1 parent 593e21e commit 621c4ba
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions github/actions_workflow_jobs.go
Expand Up @@ -44,6 +44,7 @@ type WorkflowJob struct {
RunnerName *string `json:"runner_name,omitempty"`
RunnerGroupID *int64 `json:"runner_group_id,omitempty"`
RunnerGroupName *string `json:"runner_group_name,omitempty"`
RunAttempt *int64 `json:"run_attempt,omitempty"`
}

// Jobs represents a slice of repository action workflow job.
Expand Down
4 changes: 3 additions & 1 deletion github/actions_workflow_jobs_test.go
Expand Up @@ -324,6 +324,7 @@ func TestJobs_Marshal(t *testing.T) {
},
},
CheckRunURL: String("c"),
RunAttempt: Int64(2),
},
},
}
Expand Down Expand Up @@ -351,7 +352,8 @@ func TestJobs_Marshal(t *testing.T) {
"started_at": ` + referenceTimeStr + `,
"completed_at": ` + referenceTimeStr + `
}],
"check_run_url": "c"
"check_run_url": "c",
"run_attempt": 2
}]
}`

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 621c4ba

Please sign in to comment.