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
11 lines
281 B
Go
11 lines
281 B
Go
package gitea_test
|
|
|
|
import (
|
|
"gitea.weiker.me/rodin/review-bot/gitea"
|
|
"gitea.weiker.me/rodin/review-bot/vcs"
|
|
)
|
|
|
|
// Compile-time interface conformance assertion.
|
|
// The Adapter (not the raw Client) satisfies the full vcs.Client interface.
|
|
var _ vcs.Client = (*gitea.Adapter)(nil)
|