API: project column issues endpoint lacks state filter
#4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The user/org/repo project column-issues endpoint returns issues regardless of state. There's no way to ask "open only" — open and closed are intermixed in the response.
Example:
GET /api/v1/users/{username}/-/projects/{id}/{column_id}/issues(and the analogous org / repo routes) returns every issue ever linked to that column, including closed ones.Impact
state == "open"client-side after pulling the full list, including any closed cards that drifted into a non-Closed column or were closed without being moved.Proposed fix
Add a
statequery parameter on the column-issues endpoint matching the convention used elsewhere in the API:state=open(default),state=closed,state=all.This mirrors
GET /repos/{owner}/{repo}/issues?state=…and the project-list endpoint that already acceptsstate.Workaround
Filter client-side on
state == "open"after fetching.PR up: #6 — adds
?state=open|closed|all(defaultopen) on all three column-issues endpoints (user / org / repo), wired at theIssuesOptions.IsClosedlayer viacommon.ParseIssueFilterStateIsClosed. Integration tests in all three suites verify default-open hides closed cards,state=closedreturns them, andstate=allreturns both.Not merging yet — the patched Gitea is the same instance hosting this issue, so a redeploy would interrupt the active session.