Skip to content

Commit 6663165

Browse files
committed
Bump default per page to 100
Looking in the codebase, I can see 100 is used as a default value, so replicating that. Bumps test to 100, to ensure it passes still.
1 parent 9a505b0 commit 6663165

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/buildkite/buildkite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type PaginatedResult[T any] struct {
1818

1919
func optionalPaginationParams(r mcp.CallToolRequest) (buildkite.ListOptions, error) {
2020
page := r.GetInt("page", 1)
21-
perPage := r.GetInt("perPage", 1)
21+
perPage := r.GetInt("perPage", 100)
2222
return buildkite.ListOptions{
2323
Page: page,
2424
PerPage: perPage,

pkg/buildkite/buildkite_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ func Test_optionalPaginationParams(t *testing.T) {
2828
expectErr: false,
2929
},
3030
{
31-
name: "missing pagination parameters should use new defaults (1 per page)",
31+
name: "missing pagination parameters should use new defaults (100 per page)",
3232
args: map[string]any{
3333
"name": "test-name",
3434
},
3535
expected: buildkite.ListOptions{
3636
Page: 1,
37-
PerPage: 1,
37+
PerPage: 100,
3838
},
3939
expectErr: false,
4040
},

0 commit comments

Comments
 (0)