Add bounded issue API pagination and filters #5

Closed AtlantisPleb opened this 15h ago 1 comment

Outcome

API clients can page and filter repository issues with bounded, documented behavior.

Current behavior

The repository list route does not expose the full web filter contract or stable pagination metadata.

Contract

Support state, label, assignee, milestone, search, and page inputs with a fixed page size and response metadata.

Acceptance criteria

  • Every list is bounded.
  • Filters match the web query semantics.
  • Invalid pages and filters return stable errors.
  • The published API documentation includes the response metadata.

Verification

Add controller tests for each filter, boundary pages, unauthorized repositories, and the published contract. Run mix precommit and exact-candidate staging CLI checks.

Dependencies

Depends on the deployed repository-read correction.

  1. AtlantisPleb opened this issue 15h ago
  2. A AtlantisPleb Author 8h ago

    Implemented and on main (f35c853).

    GET /api/v3/repos/{owner}/{repo}/issues now exposes the same bounded contract the web surfaces already use through Issues.list_issues_page/2:

    • Filters: state (open/closed/all), labels/label, assignee, milestone, and q search — all composing.
    • Pagination: fixed page size (Issues.per_page/0) with response metadata {page, per_page, total, total_pages} on every index response.
    • Stable errors: unknown state values and non-integer page values return 422 with a field-level errors map; out-of-range pages clamp at the existing 10,000-page bound.

    Tests cover metadata, each filter, two-page traversal with no overlap, and both rejection paths. Full mix precommit passes. Also allowlisted docs/taxonomy.md in the Sarah reference check, which was failing on main for unrelated reasons and blocking precommit.

  3. closed this as completed 8h ago
Sign in with GitHub to comment on this issue.