feat(mrs): implement GitLab Suggestions API integration#70
Merged
Conversation
Extend manage_mr_discussion with two new actions for code review workflow: - Single suggestion commit via REST API - Batch suggestions commit via REST API Closes #66
📊 Test Coverage ReportOverall Coverage: 89.58% Coverage Details
Coverage Report: View detailed coverage report
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR adds GitLab Suggestions API integration to enable applying code review suggestions directly through the MCP server, completing the code review workflow.
Changes:
- Added two new actions to
manage_mr_discussiontool:apply_suggestion(single) andapply_suggestions(batch) - Both actions support optional custom commit messages
- Comprehensive unit test coverage with 4 new test cases
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/entities/mrs/schema.ts | Added Zod schemas for apply_suggestion and apply_suggestions actions with validation |
| src/entities/mrs/registry.ts | Implemented handler logic for both new actions with proper API endpoint calls |
| tests/unit/entities/mrs/registry.test.ts | Added comprehensive unit tests covering both actions with and without commit messages |
sw-release-bot bot
pushed a commit
that referenced
this pull request
Jan 21, 2026
## [6.18.0](v6.17.0...v6.18.0) (2026-01-21) ### Features * **errors:** add structured error handling with tier awareness ([#75](#75)) ([2b5088c](2b5088c)), closes [#50](#50) [#50](#50) * **mrs:** implement GitLab Suggestions API integration ([#70](#70)) ([b9ca090](b9ca090)), closes [#66](#66) * **tiers:** add action-level tier requirements for consolidated tools ([#77](#77)) ([8e5ae0e](8e5ae0e)), closes [#48](#48)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add suggestion apply functionality to complete code review workflow. This closes the gap compared to specialized code review MCP servers.
New actions in
manage_mr_discussion:apply_suggestion- Apply a single code suggestion by IDapply_suggestions- Batch apply multiple suggestions in one commitBoth actions support optional custom commit messages.
GitLab API
PUT /projects/:id/merge_requests/:iid/suggestions/:suggestion_id/applyPUT /projects/:id/merge_requests/:iid/suggestions/batch_applyTest plan
Closes #66