Skip to content

Commit 621c4ba

Browse files
author
Pavel Dvoinos
authored
Add RunAttempt field for WorkflowJob (#2562)
1 parent 593e21e commit 621c4ba

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

github/actions_workflow_jobs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ type WorkflowJob struct {
4444
RunnerName *string `json:"runner_name,omitempty"`
4545
RunnerGroupID *int64 `json:"runner_group_id,omitempty"`
4646
RunnerGroupName *string `json:"runner_group_name,omitempty"`
47+
RunAttempt *int64 `json:"run_attempt,omitempty"`
4748
}
4849

4950
// Jobs represents a slice of repository action workflow job.

github/actions_workflow_jobs_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ func TestJobs_Marshal(t *testing.T) {
324324
},
325325
},
326326
CheckRunURL: String("c"),
327+
RunAttempt: Int64(2),
327328
},
328329
},
329330
}
@@ -351,7 +352,8 @@ func TestJobs_Marshal(t *testing.T) {
351352
"started_at": ` + referenceTimeStr + `,
352353
"completed_at": ` + referenceTimeStr + `
353354
}],
354-
"check_run_url": "c"
355+
"check_run_url": "c",
356+
"run_attempt": 2
355357
}]
356358
}`
357359

github/github-accessors.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-accessors_test.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)