8a0eed298a
CI / test (pull_request) Successful in 18s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 36s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m49s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 2m5s
Implements the Gitea adapter (gitea.Adapter) that satisfies vcs.Client. Key components: - gitea/adapter.go: Adapter struct wrapping *Client with all vcs.Client methods - gitea/position.go: BuildPositionToLineMap for diff-position → line translation - gitea/adapter_test.go: Tests for all mapping methods and event translation - gitea/position_test.go: Tests for position translation edge cases Translation details: - ReviewEvent: APPROVE → APPROVED (Gitea-native) - PostReview: fetches diff, builds position map, translates each comment - Deletion-targeted positions map to nearest non-deletion line below - All field-mapping methods tested (GetPullRequest, GetPullRequestFiles, ListReviews, GetCommitStatuses, ListContents) Also: - Added Base field to gitea.PullRequest struct - Updated conformance tests to assert Adapter (not raw Client) satisfies vcs.Client - Removed phase2 build tag from conformance tests Closes #79
12 lines
333 B
Go
12 lines
333 B
Go
package vcs_test
|
|
|
|
import (
|
|
"gitea.weiker.me/rodin/review-bot/gitea"
|
|
"gitea.weiker.me/rodin/review-bot/vcs"
|
|
)
|
|
|
|
// Compile-time assertion: the gitea.Adapter satisfies vcs.Client.
|
|
// (The raw gitea.Client does NOT satisfy vcs.Client due to signature differences;
|
|
// the Adapter bridges them.)
|
|
var _ vcs.Client = (*gitea.Adapter)(nil)
|