Skip to content

Commit dfd938a

Browse files
committed
Fetch 100 review cycles instead of default 10
1 parent ff5ceed commit dfd938a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

internal/api.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,20 @@ func (c *Client) ListUsersByURL(ctx context.Context, listURL string) ([]User, er
173173
}
174174

175175
func (c *Client) ListReviewCycles(ctx context.Context) ([]ReviewCycle, error) {
176-
req, err := c.newRequest(ctx, http.MethodGet, "/v1/reviewCycles", nil)
176+
// Build URL and append limit=100 to ensure we fetch enough cycles
177+
full, err := c.resolve("/v1/reviewCycles")
178+
if err != nil {
179+
return nil, err
180+
}
181+
u, err := url.Parse(full)
182+
if err != nil {
183+
return nil, err
184+
}
185+
q := u.Query()
186+
q.Set("limit", "100")
187+
u.RawQuery = q.Encode()
188+
189+
req, err := c.newRequest(ctx, http.MethodGet, u.String(), nil)
177190
if err != nil {
178191
return nil, err
179192
}

0 commit comments

Comments
 (0)