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
## 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)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What was missed
Issue #78 specified the exact interface signatures and
PullRequestfields to deliver. Three omissions were made:1.
vcs.PRReadermissing two methods:GetFileContentAtRef(ctx context.Context, owner, repo, path, ref string) (string, error)— needed to fetch file content at a specific commit ref (distinct fromvcs.FileReader.GetFileContentwhich 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 reviews2.
vcs.Reviewermissing one method:DismissReview(ctx context.Context, owner, repo string, number int, reviewID int64, message string) error— required to dismiss stale reviews when HEAD moves3.
vcs.PullRequestmissing two fields:Number int— issue #78 notes this is absent fromgitea.PullRequestand was explicitly added to the vcs type so downstream code doesn't thread the CLI flag through every helperBase struct { Ref string }— needed for branch-targeting logic in the GitHub client (#80)Source
vcs/interfaces.go,vcs/types.goWhat needs to happen
GetFileContentAtRefandGetCommitStatusestovcs.PRReaderDismissReviewtovcs.ReviewerNumber intandBase struct { Ref string }fields tovcs.PullRequestCommitStatustype is already defined invcs/types.go— no new type neededvcs/check_test.gocompile-time check gaps documentation if the gitea.Client gaps changego build ./...andgo test ./...passReferences
rodin referenced this issue2026-05-12 19:39:02 +00:00