Skip to content

Commit 9385ab0

Browse files
authored
Add HeadBranch field to WorkflowJob (#2764)
Fixes: #2762.
1 parent a888f0c commit 9385ab0

4 files changed

+23
-0
lines changed

github/actions_workflow_jobs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type WorkflowJob struct {
2828
RunID *int64 `json:"run_id,omitempty"`
2929
RunURL *string `json:"run_url,omitempty"`
3030
NodeID *string `json:"node_id,omitempty"`
31+
HeadBranch *string `json:"head_branch,omitempty"`
3132
HeadSHA *string `json:"head_sha,omitempty"`
3233
URL *string `json:"url,omitempty"`
3334
HTMLURL *string `json:"html_url,omitempty"`

github/actions_workflow_jobs_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ func TestWorkflowJob_Marshal(t *testing.T) {
246246
RunID: Int64(1),
247247
RunURL: String("r"),
248248
NodeID: String("n"),
249+
HeadBranch: String("b"),
249250
HeadSHA: String("h"),
250251
URL: String("u"),
251252
HTMLURL: String("h"),
@@ -274,6 +275,7 @@ func TestWorkflowJob_Marshal(t *testing.T) {
274275
"run_id": 1,
275276
"run_url": "r",
276277
"node_id": "n",
278+
"head_branch": "b",
277279
"head_sha": "h",
278280
"url": "u",
279281
"html_url": "h",
@@ -309,6 +311,7 @@ func TestJobs_Marshal(t *testing.T) {
309311
RunID: Int64(1),
310312
RunURL: String("r"),
311313
NodeID: String("n"),
314+
HeadBranch: String("b"),
312315
HeadSHA: String("h"),
313316
URL: String("u"),
314317
HTMLURL: String("h"),
@@ -342,6 +345,7 @@ func TestJobs_Marshal(t *testing.T) {
342345
"run_id": 1,
343346
"run_url": "r",
344347
"node_id": "n",
348+
"head_branch": "b",
345349
"head_sha": "h",
346350
"url": "u",
347351
"html_url": "h",

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)