PR #83: vcs interfaces and PullRequest type missing fields required by issue #78 #86

Closed
opened 2026-05-12 19:16:41 +00:00 by rodin · 0 comments
Owner

What was missed

Issue #78 specified the exact interface signatures and PullRequest fields to deliver. Three omissions were made:

1. vcs.PRReader missing two methods:

  • GetFileContentAtRef(ctx context.Context, owner, repo, path, ref string) (string, error) — needed to fetch file content at a specific commit ref (distinct from vcs.FileReader.GetFileContent which uses the default branch)
  • GetCommitStatuses(ctx context.Context, owner, repo, sha string) ([]CommitStatus, error) — needed by downstream issues (#80, #82) to check CI status before posting reviews

2. vcs.Reviewer missing one method:

  • DismissReview(ctx context.Context, owner, repo string, number int, reviewID int64, message string) error — required to dismiss stale reviews when HEAD moves

3. vcs.PullRequest missing two fields:

  • Number int — issue #78 notes this is absent from gitea.PullRequest and was explicitly added to the vcs type so downstream code doesn't thread the CLI flag through every helper
  • Base struct { Ref string } — needed for branch-targeting logic in the GitHub client (#80)

Source

  • PR: #83 — feat(vcs): extract interfaces and types from gitea/ (Phase 1)
  • Linked issue: #78 — feat(vcs): extract interfaces and types from gitea/ (Phase 1)
  • Files: vcs/interfaces.go, vcs/types.go

What needs to happen

  • Add GetFileContentAtRef and GetCommitStatuses to vcs.PRReader
  • Add DismissReview to vcs.Reviewer
  • Add Number int and Base struct { Ref string } fields to vcs.PullRequest
  • CommitStatus type is already defined in vcs/types.go — no new type needed
  • Update vcs/check_test.go compile-time check gaps documentation if the gitea.Client gaps change
  • go build ./... and go test ./... pass

References

## What was missed Issue #78 specified the exact interface signatures and `PullRequest` fields to deliver. Three omissions were made: **1. `vcs.PRReader` missing two methods:** - `GetFileContentAtRef(ctx context.Context, owner, repo, path, ref string) (string, error)` — needed to fetch file content at a specific commit ref (distinct from `vcs.FileReader.GetFileContent` which uses the default branch) - `GetCommitStatuses(ctx context.Context, owner, repo, sha string) ([]CommitStatus, error)` — needed by downstream issues (#80, #82) to check CI status before posting reviews **2. `vcs.Reviewer` missing one method:** - `DismissReview(ctx context.Context, owner, repo string, number int, reviewID int64, message string) error` — required to dismiss stale reviews when HEAD moves **3. `vcs.PullRequest` missing two fields:** - `Number int` — issue #78 notes this is absent from `gitea.PullRequest` and was explicitly added to the vcs type so downstream code doesn't thread the CLI flag through every helper - `Base struct { Ref string }` — needed for branch-targeting logic in the GitHub client (#80) ## Source - PR: #83 — feat(vcs): extract interfaces and types from gitea/ (Phase 1) - Linked issue: #78 — feat(vcs): extract interfaces and types from gitea/ (Phase 1) - Files: `vcs/interfaces.go`, `vcs/types.go` ## What needs to happen - Add `GetFileContentAtRef` and `GetCommitStatuses` to `vcs.PRReader` - Add `DismissReview` to `vcs.Reviewer` - Add `Number int` and `Base struct { Ref string }` fields to `vcs.PullRequest` - `CommitStatus` type is already defined in `vcs/types.go` — no new type needed - Update `vcs/check_test.go` compile-time check gaps documentation if the gitea.Client gaps change - `go build ./...` and `go test ./...` pass ## References - [PR #83](https://gitea.weiker.me/rodin/review-bot/pulls/83) - [Issue #78](https://gitea.weiker.me/rodin/review-bot/issues/78)
rodin added the bugai-review labels 2026-05-12 19:16:41 +00:00
rodin self-assigned this 2026-05-12 19:23:52 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rodin/review-bot#86