Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions github/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ type ListCheckRunsOptions struct {
CheckName *string `url:"check_name,omitempty"` // Returns check runs with the specified name.
Status *string `url:"status,omitempty"` // Returns check runs with the specified status. Can be one of "queued", "in_progress", or "completed".
Filter *string `url:"filter,omitempty"` // Filters check runs by their completed_at timestamp. Can be one of "latest" (returning the most recent check runs) or "all". Default: "latest"
AppID *int64 `url:"app_id,omitempty"` // Filters check runs by GitHub App ID.

ListOptions
}
Expand Down
7 changes: 6 additions & 1 deletion github/checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ func TestChecksService_ListCheckRunsForRef(t *testing.T) {
"page": "1",
"status": "completed",
"filter": "all",
"app_id": "1",
})
fmt.Fprint(w, `{"total_count":1,
"check_runs": [{
Expand All @@ -327,14 +328,17 @@ func TestChecksService_ListCheckRunsForRef(t *testing.T) {
"status": "completed",
"conclusion": "neutral",
"started_at": "2018-05-04T01:14:52Z",
"completed_at": "2018-05-04T01:14:52Z"}]}`,
"completed_at": "2018-05-04T01:14:52Z",
"app": {
"id": 1}}]}`,
)
})

opt := &ListCheckRunsOptions{
CheckName: String("testing"),
Status: String("completed"),
Filter: String("all"),
AppID: Int64(1),
ListOptions: ListOptions{Page: 1},
}
ctx := context.Background()
Expand All @@ -352,6 +356,7 @@ func TestChecksService_ListCheckRunsForRef(t *testing.T) {
CompletedAt: &Timestamp{startedAt},
Conclusion: String("neutral"),
HeadSHA: String("deadbeef"),
App: &App{ID: Int64(1)},
}},
}

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.