Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
SamMorrowDrums merged 4 commits intomainfromlulu/get-me
Jul 4, 2025
Merged

Conversation

LuluBeatson
Copy link
Contributor

@LuluBeatsonLuluBeatson commentedJul 4, 2025
edited
Loading

Update get_me tool to return a marshalledMinimalUser instead of a fullUser object, and extendMinimalUser with an optional nestedUserDetails.

Example

image
{"login":"LuluBeatson","id":59149422,"profile_url":"https://github.com/LuluBeatson","avatar_url":"https://avatars.githubusercontent.com/u/59149422?v=4","details": {"name":"Lulu","blog":"lulubeatson.com","location":"London, UK","public_repos":31,"public_gists":1,"followers":0,"following":5,"created_at":"2019-12-22T21:15:47Z","updated_at":"2025-06-05T06:41:06Z"    }}

@LuluBeatsonLuluBeatson changed the titleOmit site_admin from get_me outputget_me return MinimalUserJul 4, 2025
@LuluBeatsonLuluBeatson marked this pull request as ready for reviewJuly 4, 2025 11:15
@CopilotCopilotAI review requested due to automatic review settingsJuly 4, 2025 11:15
@LuluBeatsonLuluBeatson requested a review froma team as acode ownerJuly 4, 2025 11:15
Copy link
Contributor

@CopilotCopilotAI left a 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 intoMinimalUser 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.

FileDescription
pkg/github/context_tools.goBuild and marshal aMinimalUser with only login, ID, and URLs
pkg/github/context_tools_test.goSwitch test to expectMinimalUser and update assertions accordingly
Comments suppressed due to low confidence (1)

pkg/github/context_tools_test.go:126

  • Add assertions to verifyreturnedUser.ID andreturnedUser.AvatarURL against the expected values so that all fields inMinimalUser are covered by tests.
assert.Equal(t, *tc.expectedUser.HTMLURL, returnedUser.ProfileURL)

@LuluBeatsonLuluBeatson changed the titleget_me return MinimalUserget_me return concise user responseJul 4, 2025
Copy link
Collaborator

@SamMorrowDrumsSamMorrowDrums left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you!

@SamMorrowDrumsSamMorrowDrums merged commite43fca1 intomainJul 4, 2025
16 checks passed
@SamMorrowDrumsSamMorrowDrums deleted the lulu/get-me branchJuly 4, 2025 12:58
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@SamMorrowDrumsSamMorrowDrumsSamMorrowDrums approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@LuluBeatson@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp