Skip to content

Commit 66ef214

Browse files
committed
Add get_comments method
1 parent db71d80 commit 66ef214

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/github/pullrequests.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ Possible options:
3333
2. get_diff - Get the diff of a pull request.
3434
3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.
3535
4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.
36-
5. get_review_comments - Get the review comments on a pull request. They are comments made on a portion of the unified diff during a pull request review. These are different from commit comments and issue comments in a pull request. Use with pagination parameters to control the number of results returned.
36+
5. get_review_comments - Get the review comments on a pull request. They are comments made on a portion of the unified diff during a pull request review. Use with pagination parameters to control the number of results returned.
3737
6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.
38+
7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.
3839
`),
3940

40-
mcp.Enum("get", "get_diff", "get_status", "get_files", "get_review_comments", "get_reviews"),
41+
mcp.Enum("get", "get_diff", "get_status", "get_files", "get_review_comments", "get_reviews", "get_comments"),
4142
),
4243
mcp.WithString("owner",
4344
mcp.Required(),
@@ -95,6 +96,8 @@ Possible options:
9596
return GetPullRequestReviewComments(ctx, client, owner, repo, pullNumber, pagination)
9697
case "get_reviews":
9798
return GetPullRequestReviews(ctx, client, owner, repo, pullNumber)
99+
case "get_comments":
100+
return GetIssueComments(ctx, client, owner, repo, pullNumber, pagination)
98101
default:
99102
return nil, fmt.Errorf("unknown method: %s", method)
100103
}

0 commit comments

Comments
 (0)