Add bounded issue API pagination and filters #5
- AtlantisPleb opened this issue 15h ago
-
A Author 8h ago Implemented and on main (f35c853).
GET /api/v3/repos/{owner}/{repo}/issuesnow exposes the same bounded contract the web surfaces already use throughIssues.list_issues_page/2:- Filters:
state(open/closed/all),labels/label,assignee,milestone, andqsearch — 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
statevalues and non-integerpagevalues 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 precommitpasses. Also allowlisteddocs/taxonomy.mdin the Sarah reference check, which was failing on main for unrelated reasons and blocking precommit. - Filters:
- closed this as completed 8h ago
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
Verification
Add controller tests for each filter, boundary pages, unauthorized repositories, and the published contract. Run
mix precommitand exact-candidate staging CLI checks.Dependencies
Depends on the deployed repository-read correction.