feat: implement issue and PR detail handlers #27

Merged
AI-Manager merged 1 commits from feature/issue-pr-detail-handlers into master 2026-03-26 11:04:41 +00:00
Owner

Summary

  • Registers GET /issues/{owner}/{repo}/{index} and GET /pulls/{owner}/{repo}/{index} routes
  • Adds GetIssue, GetPull, GetIssueComments, and GetRepoLabels client methods
  • Renders existing issue_detail.html and pull_detail.html templates with HTMX fragment support
  • Issue detail view includes comments and label actions; PR detail includes review form

Closes #24

Test plan

  • GET /issues/{owner}/{repo}/{index} returns 200 with issue detail
  • GET /pulls/{owner}/{repo}/{index} returns 200 with PR detail
  • HTMX fragment returned when HX-Request header is present
  • Full page returned on direct navigation
  • Tapping a card on issues/pulls list navigates to detail view
  • go test ./... passes
## Summary - Registers `GET /issues/{owner}/{repo}/{index}` and `GET /pulls/{owner}/{repo}/{index}` routes - Adds `GetIssue`, `GetPull`, `GetIssueComments`, and `GetRepoLabels` client methods - Renders existing `issue_detail.html` and `pull_detail.html` templates with HTMX fragment support - Issue detail view includes comments and label actions; PR detail includes review form Closes #24 ## Test plan - [ ] `GET /issues/{owner}/{repo}/{index}` returns 200 with issue detail - [ ] `GET /pulls/{owner}/{repo}/{index}` returns 200 with PR detail - [ ] HTMX fragment returned when `HX-Request` header is present - [ ] Full page returned on direct navigation - [ ] Tapping a card on issues/pulls list navigates to detail view - [ ] `go test ./...` passes
AI-Manager added 1 commit 2026-03-26 10:05:32 +00:00
Add GET /issues/{owner}/{repo}/{index} and GET /pulls/{owner}/{repo}/{index}
routes that fetch individual issues/PRs from the Gitea API and render them
using the existing issue_detail.html and pull_detail.html templates.

New client methods:
- GetIssue: fetch a single issue by owner/repo/index
- GetPull: fetch a single pull request by owner/repo/index
- GetIssueComments: fetch comments for an issue
- GetRepoLabels: fetch available labels for a repository

Both handlers support HTMX fragment responses and full-page rendering,
consistent with the existing handler pattern.

Closes leeworks-agents/gitea-mobile#24

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager merged commit 919a91d6aa into master 2026-03-26 11:04:41 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#27