GitLab Merge Request support for code-review plugin
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
The code-review plugin currently supports only GitHub pull requests via the gh CLI and mcp__github_inline_comment__create_inline_comment. I’d like to contribute support for GitLab merge requests.
Many teams use GitLab, both on gitlab.com and self-hosted instances. The plugin’s multi-agent review workflow is largely platform-agnostic in concept; the GitHub-specific logic is mostly limited to:
- fetching diffs
- checking MR/PR status
- posting review comments
Extending this to GitLab would make the plugin usable in a wider range of environments without changing its core design.
Proposed Solution
- Platform detection
Detect GitHub vs GitLab based on the git remote, using API probing to correctly handle self-hosted GitLab instances.
- GitLab CLI integration
Use glab (GitLab’s official CLI) for MR operations such as:
glab mr viewglab mr diffglab mr note
- Inline comments
Post position-based comments via glab api and the GitLab Discussions API, avoiding the need for a new MCP tool.
- Single command file
Keep a single code-review.md command that branches internally based on the detected platform.
- Link format
Use GitLab’s URL format for source links:
````
/-/blob/<sha>/<path>#L<line>
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
- Is GitLab MR support something you’d be open to accepting, or do you prefer keeping the plugin GitHub-only?
- Would you prefer extending the existing
code-reviewcommand, or introducing a separate GitLab-specific command? - Are there any concerns about adding
glabto the allowed tools alongsidegh?
Happy to adjust the approach based on feedback before starting implementation.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗