Skip to content

Commit ba86215

Browse files
authored
Add missing fields to the checksuite event (#3278)
Fixes: #3277.
1 parent 2359251 commit ba86215

File tree

5 files changed

+84
-18
lines changed

5 files changed

+84
-18
lines changed

github/checks.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ type CheckSuite struct {
8585
PullRequests []*PullRequest `json:"pull_requests,omitempty"`
8686

8787
// The following fields are only populated by Webhook events.
88-
HeadCommit *Commit `json:"head_commit,omitempty"`
88+
HeadCommit *Commit `json:"head_commit,omitempty"`
89+
LatestCheckRunsCount *int64 `json:"latest_check_runs_count,omitempty"`
90+
Rerequstable *bool `json:"rerequestable,omitempty"`
91+
RunsRerequstable *bool `json:"runs_rerequestable,omitempty"`
8992
}
9093

9194
func (c CheckRun) String() string {

github/checks_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,9 @@ func Test_CheckSuiteMarshal(t *testing.T) {
888888
HeadCommit: &Commit{
889889
SHA: String("s"),
890890
},
891+
LatestCheckRunsCount: Int64(1),
892+
Rerequstable: Bool(true),
893+
RunsRerequstable: Bool(true),
891894
}
892895

893896
w := fmt.Sprintf(`{
@@ -949,7 +952,10 @@ func Test_CheckSuiteMarshal(t *testing.T) {
949952
],
950953
"head_commit": {
951954
"sha": "s"
952-
}
955+
},
956+
"latest_check_runs_count": 1,
957+
"rerequestable": true,
958+
"runs_rerequestable": true
953959
}`, ts, ts)
954960

955961
testJSONMarshal(t, &c, w)

github/github-accessors.go

Lines changed: 24 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: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/github-stringify_test.go

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

0 commit comments

Comments
 (0)