Skip to content

Commit 4bdb40a

Browse files
committed
update function name to match tool name
1 parent 42d7449 commit 4bdb40a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pkg/github/pullrequests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,8 +1151,8 @@ func CreatePendingPullRequestReview(getGQLClient GetGQLClientFn, t translations.
11511151
}
11521152
}
11531153

1154-
// AddPullRequestReviewCommentToPendingReview creates a tool to add a comment to a pull request review.
1155-
func AddPullRequestReviewCommentToPendingReview(getGQLClient GetGQLClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
1154+
// AddCommentToPendingReview creates a tool to add a comment to a pull request review.
1155+
func AddCommentToPendingReview(getGQLClient GetGQLClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
11561156
return mcp.NewTool("add_comment_to_pending_review",
11571157
mcp.WithDescription(t("TOOL_ADD_COMMENT_TO_PENDING_REVIEW_DESCRIPTION", "Add a review comment to the requester's latest pending pull request review, a pending review needs to already exist to call this (check with the user if not sure).")),
11581158
mcp.WithToolAnnotation(mcp.ToolAnnotation{

pkg/github/pullrequests_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ func TestAddPullRequestReviewCommentToPendingReview(t *testing.T) {
21372137

21382138
// Verify tool definition once
21392139
mockClient := githubv4.NewClient(nil)
2140-
tool, _ := AddPullRequestReviewCommentToPendingReview(stubGetGQLClientFn(mockClient), translations.NullTranslationHelper)
2140+
tool, _ := AddCommentToPendingReview(stubGetGQLClientFn(mockClient), translations.NullTranslationHelper)
21412141
require.NoError(t, toolsnaps.Test(tool.Name, tool))
21422142

21432143
assert.Equal(t, "add_comment_to_pending_review", tool.Name)
@@ -2222,7 +2222,7 @@ func TestAddPullRequestReviewCommentToPendingReview(t *testing.T) {
22222222

22232223
// Setup client with mock
22242224
client := githubv4.NewClient(tc.mockedClient)
2225-
_, handler := AddPullRequestReviewCommentToPendingReview(stubGetGQLClientFn(client), translations.NullTranslationHelper)
2225+
_, handler := AddCommentToPendingReview(stubGetGQLClientFn(client), translations.NullTranslationHelper)
22262226

22272227
// Create call request
22282228
request := createMCPRequest(tc.requestArgs)

pkg/github/tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG
8989
// Reviews
9090
toolsets.NewServerTool(CreateAndSubmitPullRequestReview(getGQLClient, t)),
9191
toolsets.NewServerTool(CreatePendingPullRequestReview(getGQLClient, t)),
92-
toolsets.NewServerTool(AddPullRequestReviewCommentToPendingReview(getGQLClient, t)),
92+
toolsets.NewServerTool(AddCommentToPendingReview(getGQLClient, t)),
9393
toolsets.NewServerTool(SubmitPendingPullRequestReview(getGQLClient, t)),
9494
toolsets.NewServerTool(DeletePendingPullRequestReview(getGQLClient, t)),
9595
)

0 commit comments

Comments
 (0)