feat: add changed files list to PR detail view #189
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?
The roadmap (Phase 2.2, PR Detail section) specifies a file list in the pull request detail view. Currently the PullRequest struct only includes additions and deletions counts, but does not fetch or display the list of changed files.
What to do:
Acceptance Criteria:
Reference: Roadmap Phase 2.2 PR Detail: diff stat summary, file list, review form
Triage (2026-04-20): Assigned to @AI-Engineer. Medium-complexity feature: add GetPullFiles() API method, PullFile struct, handler update, and template rendering. Has a unit test requirement. P2 priority — can proceed independently. Recommended: implement client method first, then handler, then template.
Prerequisite #205 (GetChangedFiles client method) has been merged via PR #208. This issue is now unblocked and ready for implementation. The
GetChangedFiles()method is available ininternal/gitea/client.go.Sprint planning update (2026-04-20): The Gitea client already has
GetChangedFiles()ininternal/gitea/client.go(closed via #205). The remaining work is narrower:PullDetailhandler ininternal/handlers/handlers.goto callh.Client.GetChangedFiles()and pass the result to the template data structinternal/templates/pull_detail.htmlto render a collapsible changed-files section using the dataStep 1 in the original description (GetPullFiles client method) is already done as GetChangedFiles.
Sprint planning update (2026-04-20): Step 1 of this issue is already done —
GetChangedFiles()was added to the Gitea client in PR #208 (merged). The struct isChangedFile(notPullFile). The remaining work is steps 3 and 4 only:GetChangedFiles()into thePullDetailhandlerpull_detail.htmlUse the existing
GetChangedFiles(ctx, token, owner, repo, index)signature.