Skip to content

Add tools for one-off PR comments and replying to PR review comments #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 12, 2025
Prev Previous commit
Next Next commit
Update README to reflect the unified PR review comment tool
  • Loading branch information
ashwin-ant committed Apr 11, 2025
commit c2b2dc111d3da188ab2babf98eabd3fe76581d0b
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,28 +288,20 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
- `draft`: Create as draft PR (boolean, optional)
- `maintainer_can_modify`: Allow maintainer edits (boolean, optional)

- **add_pull_request_review_comment** - Add a review comment to a pull request
- **add_pull_request_review_comment** - Add a review comment to a pull request or reply to an existing comment

- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `pull_number`: Pull request number (number, required)
- `body`: The text of the review comment (string, required)
- `commit_id`: The SHA of the commit to comment on (string, required)
- `path`: The relative path to the file that necessitates a comment (string, required)
- `commit_id`: The SHA of the commit to comment on (string, required unless using in_reply_to)
- `path`: The relative path to the file that necessitates a comment (string, required unless using in_reply_to)
- `line`: The line of the blob in the pull request diff that the comment applies to (number, optional)
- `side`: The side of the diff to comment on (LEFT or RIGHT) (string, optional)
- `start_line`: For multi-line comments, the first line of the range (number, optional)
- `start_side`: For multi-line comments, the starting side of the diff (LEFT or RIGHT) (string, optional)
- `subject_type`: The level at which the comment is targeted (line or file) (string, optional)
- `in_reply_to`: The ID of the review comment to reply to (number, optional)

- **reply_to_pull_request_review_comment** - Reply to an existing review comment on a pull request

- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `pull_number`: Pull request number (number, required)
- `comment_id`: The unique identifier of the comment to reply to (number, required)
- `body`: The text of the reply comment (string, required)
- `in_reply_to`: The ID of the review comment to reply to (number, optional). When specified, only body is required and other parameters are ignored.

- **update_pull_request** - Update an existing pull request in a GitHub repository

Expand Down
1 change: 0 additions & 1 deletion pkg/github/pullrequests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1890,7 +1890,6 @@ func Test_AddPullRequestReviewComment(t *testing.T) {
assert.NotNil(t, result)
require.Len(t, result.Content, 1)

// Check for error message in the result
textContent := getTextResult(t, result)
if tc.expectedErrMsg != "" {
assert.Contains(t, textContent.Text, tc.expectedErrMsg)
Expand Down