Skip to content

Commit

Permalink
Add HeadBranch field to WorkflowJob (#2764)
Browse files Browse the repository at this point in the history
Fixes: #2762.
  • Loading branch information
kkaresz-tw authored Apr 18, 2023
1 parent a888f0c commit 9385ab0
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 @@ -28,6 +28,7 @@ type WorkflowJob struct {
RunID *int64 `json:"run_id,omitempty"`
RunURL *string `json:"run_url,omitempty"`
NodeID *string `json:"node_id,omitempty"`
HeadBranch *string `json:"head_branch,omitempty"`
HeadSHA *string `json:"head_sha,omitempty"`
URL *string `json:"url,omitempty"`
HTMLURL *string `json:"html_url,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 @@ -246,6 +246,7 @@ func TestWorkflowJob_Marshal(t *testing.T) {
RunID: Int64(1),
RunURL: String("r"),
NodeID: String("n"),
HeadBranch: String("b"),
HeadSHA: String("h"),
URL: String("u"),
HTMLURL: String("h"),
Expand Down Expand Up @@ -274,6 +275,7 @@ func TestWorkflowJob_Marshal(t *testing.T) {
"run_id": 1,
"run_url": "r",
"node_id": "n",
"head_branch": "b",
"head_sha": "h",
"url": "u",
"html_url": "h",
Expand Down Expand Up @@ -309,6 +311,7 @@ func TestJobs_Marshal(t *testing.T) {
RunID: Int64(1),
RunURL: String("r"),
NodeID: String("n"),
HeadBranch: String("b"),
HeadSHA: String("h"),
URL: String("u"),
HTMLURL: String("h"),
Expand Down Expand Up @@ -342,6 +345,7 @@ func TestJobs_Marshal(t *testing.T) {
"run_id": 1,
"run_url": "r",
"node_id": "n",
"head_branch": "b",
"head_sha": "h",
"url": "u",
"html_url": "h",
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 9385ab0

Please sign in to comment.