feat: add GetChangedFiles() method to Gitea client for PR detail view (prerequisite for #189) #205
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
Issue #189 (add changed files list to PR detail view) requires a client method to fetch the list of files changed in a PR via the Gitea API. Currently
internal/gitea/client.gohas no such method. This is the prerequisite client-layer task.Tasks
GetChangedFiles(ctx, token, owner, repo string, index int64) ([]ChangedFile, error)tointernal/gitea/client.goChangedFilestruct should include:Filename,Status(added/modified/deleted/renamed),Additions,DeletionsGET /repos/{owner}/{repo}/pulls/{index}/filesclient_test.gothat mocks the API response and verifies parsingAcceptance Criteria
GetChangedFiles()compiles and is exported from thegiteapackagego test ./internal/gitea/...Reference
Roadmap Phase 2.2 — PR Detail view. Prerequisite for issue #189.
Triage: Assigned to @developer. Add
GetChangedFiles()method to the Gitea client (internal/gitea/client.go) using the Gitea API endpoint for PR file diffs. This is a prerequisite for #189 (changed files list in PR detail view). No blockers. Priority: P1.