928e2fa182
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)
|