- Notifications
You must be signed in to change notification settings - Fork1.4k
get_me return concise user response#638
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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.
Pull Request Overview
This PR changes theget_me
tool to return a slimmed-downMinimalUser
instead of the fullUser
object, aligning it withsearch_users
output.
- Map and return only selected fields (
Login
,ID
,ProfileURL
,AvatarURL
) inGetMe
- Update tests to unmarshal into
MinimalUser
and assert onLogin
andProfileURL
- Remove assertions for full-user fields (
Name
,Email
,Bio
,Type
)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pkg/github/context_tools.go | Build and marshal aMinimalUser with only login, ID, and URLs |
pkg/github/context_tools_test.go | Switch test to expectMinimalUser and update assertions accordingly |
Comments suppressed due to low confidence (1)
pkg/github/context_tools_test.go:126
- Add assertions to verify
returnedUser.ID
andreturnedUser.AvatarURL
against the expected values so that all fields inMinimalUser
are covered by tests.
assert.Equal(t, *tc.expectedUser.HTMLURL, returnedUser.ProfileURL)
Uh oh!
There was an error while loading.Please reload this page.
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!
e43fca1
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Update get_me tool to return a marshalled
MinimalUser
instead of a fullUser
object, and extendMinimalUser
with an optional nestedUserDetails
.github-mcp-server/pkg/github/search.go
Lines 158 to 165 indd62f8d
search_users
tool is unchanged, it omits the nested details fieldExample