Preflight Checklist
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 view
glab mr diff
glab 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-review command, or introducing a separate GitLab-specific command?
- Are there any concerns about adding
glab to the allowed tools alongside gh?
Happy to adjust the approach based on feedback before starting implementation.
Preflight Checklist
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 noteInline comments
Post position-based comments via
glab apiand the GitLab Discussions API, avoiding the need for a new MCP tool.Single command file
Keep a single
code-review.mdcommand that branches internally based on the detected platform.Link format
Use GitLab’s URL format for source links:
Alternative Solutions
No response
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
No response
Additional Context
code-reviewcommand, or introducing a separate GitLab-specific command?glabto the allowed tools alongsidegh?Happy to adjust the approach based on feedback before starting implementation.