10ef451c20
CI / test (pull_request) Successful in 18s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 42s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m23s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m38s
Wire up the new GitHub API methods to the review-bot CLI via VCS
type detection. review-bot can now review PRs on both Gitea and
GitHub (including GitHub Enterprise Server).
Changes:
- vcs.go: define vcsClient interface with all PR operations
- giteaVCSAdapter: wraps gitea.Client, satisfies vcsClient + giteaExtClient
- githubVCSAdapter: wraps github.Client, satisfies vcsClient
- giteaExtClient: Gitea-specific extension (supersede, comment resolution)
- main.go: detect VCS type via VCS_TYPE env var (auto-detects github.com URLs)
- Creates appropriate client (gitea or github) based on vcs_type
- GitHub API URL derived from server URL (github.com → api.github.com,
GHES → /api/v3)
- All main flow uses vcsClient interface
- Gitea-specific supersede operations gated via giteaExtClient type assertion
- GitHub: logs info when skipping supersede (not supported)
- Removes old giteaClientAdapter (replaced by giteaVCSAdapter in vcs.go)
- giteaVCSAdapter satisfies review.GiteaClient for persona loading
GitHub limitations handled gracefully:
- Review supersede skipped (GitHub doesn't allow editing submitted reviews)
- DeleteReview returns error for non-pending reviews (documented in adapter)
- Inline comments use absolute line + side='RIGHT' instead of diff position
Closes #130.
Co-authored-by: Rodin <rodin@forgedthought.ai>