feat: add inline comment support for merge requests#5
Closed
kishan0725 wants to merge 1 commit into
Closed
Conversation
Author
|
Closing the PR as updated PR is #6 |
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.
Add support for creating inline/line-level comments on merge request diffs using GitLab's Discussions API. This enables AI assistants to provide precise, line-specific code review feedback similar to human reviewers.
What's Added
New Tools
gitlab_create_merge_request_discussion: Full-featured tool for creatinginline comments with manual commit SHA specification
gitlab_create_merge_request_discussion_simple: Simplified tool thatautomatically fetches commit SHAs from the merge request
Implementation Details
src/types/repository.types.tswith proper TypeScript interfacesfor discussion positions and diff references
src/handlers/repository-handlers.tsusing GitLab'sDiscussions API endpoint
Usage Example
The simplified version makes it easy to add inline comments:
{ "project_id": "my-project", "merge_request_iid": 42, "body": "Consider using async/await here for better readability", "file_path": "src/server.ts", "line_number": 45, "line_type": "new" }