-
Notifications
You must be signed in to change notification settings - Fork 505
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
feat: Add update_pull_request tool #122
feat: Add update_pull_request tool #122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
pkg/github/pullrequests.go:156
- The error message returned for missing update parameters includes a trailing period. Consider unifying the error message text (e.g. 'No update parameters provided') to match test expectations and ensure consistency.
if !updateNeeded {
pkg/github/server.go:129
- [nitpick] The error message in the optionalParamOk helper could be clarified by explicitly stating the expected and actual types, making debugging easier when a parameter has an unexpected type.
if !ok {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for your PR! ❤️
I added a few comments, mainly to the new optionalParamOk
function.
I'm not super hyped about the name, but naming is hard :)
In general, this tool has shown that the current optionalParam
falls short when you actually want to know whether the parameter actually exists.
This is probably out of the scope for this PR, but I'm going to open an issue to discuss how we can handle optional parameters better. I have the feeling that it might make sense that the optionalParam
to always return whether the param was passed. But again, that might be a separate discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monotykamary thank you for your changes, just one more thing, would you mind updating the README to list the new tool?
Oh right, forgot about that part. Should be up 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Thank you so much for your contribution!
@monotykamary can you please update your branch with latest main, and we we'll be good to merge! |
@juruen I've updated it to follow the newer named export convention, should be good 👍 |
@monotykamary I can't update your branch because you probably set |
Aha my bad. @juruen should be set. This PR was made by the MCP server, should probably note somewhere to add |
I figured that as well 😄
Agreed! |
This pull request introduces the
update_pull_request
tool to the GitHub MCP server.Changes:
UpdatePullRequest
function inpkg/github/pullrequests.go
to define the tool and its handler.OptionalParamOK
helper function inpkg/github/server.go
.pkg/github/server.go
.UpdatePullRequest
tool inpkg/github/pullrequests_test.go
.base
field during testing.The new tool allows users to update the following fields of an existing pull request:
title
body
state
(open/closed)base
branchmaintainer_can_modify
flagThis was updated through the
update_pull_request
tool GitHub MCP server (^6).