feat: implement GET /issues/{owner}/{repo}/{index} and GET /pulls/{owner}/{repo}/{index} detail handlers #24
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?
Description
The HTMX templates (
issues.htmlandpulls.html) already usehx-getto load detail views at/issues/{owner}/{repo}/{index}and/pulls/{owner}/{repo}/{index}, but these routes are not registered ininternal/handlers/handlers.go. Tapping any issue or PR card will return a 404.The roadmap defines these routes in Phase 1.5 and their corresponding views in Phase 2.2.
What to Do
internal/handlers/handlers.go, register two new routes:IssueDetailhandler:{owner},{repo},{index}from pathGetIssue(ctx, token, owner, repo, index)(or use existing SDK)issue_detail.htmltemplate, supporting full-page and HTMX fragment responsesPullDetailhandler:GetPull(ctx, token, owner, repo, index)pull_detail.htmltemplateinternal/gitea/client.gowithGetIssueandGetPullmethods if not presentinternal/templates/issue_detail.htmlandpull_detail.htmlrender correctlyAcceptance Criteria
GET /issues/{owner}/{repo}/{index}returns 200 with issue detail contentGET /pulls/{owner}/{repo}/{index}returns 200 with PR detail contentHX-Requestheader is presentgo test ./...)Roadmap ref: Phase 1.5 — HTTP Handlers; Phase 2.2 — Views (Issue Detail, PR Detail)
Triage: Assigned to AI-Engineer. This is a P1 medium feature -- implementing issue and PR detail handlers with new routes, client methods, and templates. Will start after #25 is completed.
PR #27 created: feature/issue-pr-detail-handlers branch. Implements
IssueDetailandPullDetailhandlers with new client methods (GetIssue,GetPull,GetIssueComments,GetRepoLabels) and renders existing templates. Ready for review.Manager Update: PR #27 (
feature/issue-pr-detail-handlers) has been reviewed and merged into master. This issue is now resolved.Changes merged:
GET /issues/{owner}/{repo}/{index}andGET /pulls/{owner}/{repo}/{index}routesGetIssue,GetPull,GetIssueComments, andGetRepoLabelsclient methodsrenderPage