Commit Graph

2 Commits

Author SHA1 Message Date
claw 2dedab1ad3 feat(#130): add VCS routing in cmd/review-bot via --vcs-type flag
CI / test (pull_request) Successful in 18s
CI / review (anthropic--claude-4.6-sonnet, sonnet, SONNET_REVIEW_TOKEN) (pull_request) Successful in 41s
CI / review (gpt-5, gpt, GPT_REVIEW_TOKEN) (pull_request) Successful in 1m20s
CI / review (gpt-5, security, ., rodin/security-patterns, SECURITY_REVIEW.md, SECURITY_REVIEW_TOKEN) (pull_request) Successful in 1m52s
- Add vcs_client.go with vcsClient interface, giteaClientVCSAdapter, githubClientVCSAdapter
- Add giteaExtendedClient interface for Gitea-specific operations (supersede, resolve, etc.)
- Add --vcs-type flag (gitea|github, default: gitea) with VCS_TYPE env var support
- Replace direct giteaClient usage with vcsClient interface in main.go
- Add verdictToVCSEvent() to map LLM verdict to vcs.ReviewEvent
- Gitea adapter translates vcs.ReviewEvent back to Gitea API format (APPROVE->APPROVED)
- Guard Gitea-specific ops (RequestReviewer, supersede, resolve) with type assertion
- Guard fetchPatterns GetAllFilesInPath with Gitea-only type assertion
- Replace reviewClientAdapter (giteaClientAdapter) for review.GiteaClient interface
- Update main_test.go to use reviewInfo/commitStatusInfo instead of gitea types
2026-05-14 13:53:56 -07:00
claw 5704d167a5 feat(#130): implement GitHub API methods and vcs types
- Add vcs package with shared review types (ReviewEvent, Review, ReviewRequest, ReviewComment, UserInfo)
- Add GetPullRequest, GetPullRequestDiff, GetPullRequestFiles, GetCommitStatuses to github/client.go
- Add GetFileContent, GetFileContentRef, ListContents to github/client.go
- Add doRequestWithBody helper for POST/PUT/DELETE operations
- Add review.go with PostReview, ListReviews, DeleteReview, DismissReview
- Add identity.go with GetAuthenticatedUser
- Remove TODO comment from github/client.go
- Add escapePath helper for URL path construction
- Add comprehensive tests for all new methods using httptest.NewServer
2026-05-14 13:45:36 -07:00