labels= and milestone=: filter the issue and pull lists

The issue list (GET /api/v1/repos/OWNER/NAME/issues) and the pull list (…/pulls) read a fixed set of query parameters, and refuse any other.

GET /api/v1/repos/OWNER/NAME/issues?labels=P0%20Trust,bug
GET /api/v1/repos/OWNER/NAME/issues?milestone=731&state=all
GET /api/v1/repos/OWNER/NAME/pulls?labels=bug

This breaks clients that send extra parameters. Before, the forge ignored a parameter it did not read. A typo such as ?lables=bug, or a filter the forge does not have such as ?milestone= on pulls, returned the whole list as if it were filtered. Now the same request is a 422. A client that adds its own parameters (a cache-buster such as ?_=123, tracking tags) must drop them for these two lists. ?page= and ?offset= keep their own 400 invalid_query (see the API reference).

Code: listQuery in src/http/api.ts (the accepted names, labels), milestoneScope in src/http/api/issues.ts, and the labels/beneath filters of listIssues in src/core/issues.ts. Tests: test/api-list-query.test.ts.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs