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

pkg/github: fix use of per page parameter#137

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
williammartin merged 3 commits intogithub:mainfromAlexanderYastrebov:fix-per_page
Apr 7, 2025

Conversation

AlexanderYastrebov
Copy link
Contributor

@AlexanderYastrebovAlexanderYastrebov commentedApr 6, 2025
edited
Loading

Page size tool parameter names were changed toperPage within#90 while GitHub API usesper_page parameter name.

This change fixes overlooked inconsistencies.

Follow up on#90
Follow up on#129
Fixes#136

bocytko reacted with hooray emojivanshavenger reacted with heart emoji
@CopilotCopilotAI review requested due to automatic review settingsApril 6, 2025 17:01
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.

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

@AlexanderYastrebov
Copy link
ContributorAuthor

Tested with code-insiders that list_commits now returns one item.

@@ -86,7 +86,7 @@ func searchCode(client *github.Client, t translations.TranslationHelperFunc) (to
mcp.Description("Sort order ('asc' or 'desc')"),
mcp.Enum("asc", "desc"),
),
mcp.WithNumber("per_page",
mcp.WithNumber("perPage",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not totally opposed to this, but the reason some of these existed in snake case form was because that'swhat the anthropic server exposed, and initially we just wanted to provide parity before moving forwards.

Obviously I introduced a few silly bugs in doing that last minute 😅

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Hm, they actually use a mix:

IMO, if that's not crucial it would be better to revert all toper_page because that's what GitHub API uses and to reduce confusion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hm, they actually use a mix

Right, so in#90 I changed the tool schemas to match the mix (but messed up the implementation).

I think for the moment let's keep this asperPage, and then we can talk about broader design principles at another time, looking at the entire API surface area. There's definitely a bit of tension between consistency within github-mcp-server, with the JSON-RPC envelope (all camel cased) with the GitHub API (mostly/all snake cased?).

I talked to the team and we're happy to get this in, I'm just going to take a closer look and maybe add some tests to avoid this in future. Thanks!

AlexanderYastrebov reacted with thumbs up emoji
@williammartin
Copy link
Collaborator

Thanks for this, let me just run#137 (comment) by the others maintainers. I'd be in favour of it, because as seen, very easy to make mistakes.

AlexanderYastrebov reacted with thumbs up emoji

SamMorrowDrums
SamMorrowDrums previously approved these changesApr 7, 2025
@williammartin
Copy link
Collaborator

Hey@AlexanderYastrebov, I've pushed a couple of commits on top of your branch to hopefully avoid these kind of shenanigans in the future. Please have a glance and let me know if anything looks surprising to you. Thanks for your contribution!

AlexanderYastrebov reacted with thumbs up emoji

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.

Amazing! Thanks both, this is a nice improvement.

AlexanderYastrebov reacted with thumbs up emoji
@AlexanderYastrebov
Copy link
ContributorAuthor

AlexanderYastrebov commentedApr 7, 2025
edited
Loading

Please have a glance and let me know if anything looks surprising to you.

All good, thank you for the prompt review 🚀

Copy link
Collaborator

@juruenjuruen left a comment

Choose a reason for hiding this comment

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

Awesome! Thank you everyone for fixing this so quickly! 🚀

AlexanderYastrebov reacted with thumbs up emoji
AlexanderYastrebovand others added3 commitsApril 7, 2025 16:43
Page size tool parameter names were changed to `perPage` withingithub#90while GitHub API uses `per_page` parameter name.This change fixes overlooked inconsistencies.Follow up ongithub#90Follow up ongithub#129Fixesgithub#136Signed-off-by: Alexander Yastrebov <yastrebov.alex@gmail.com>
@williammartinwilliammartin merged commit0f9ef6e intogithub:mainApr 7, 2025
9 checks passed
@AlexanderYastrebovAlexanderYastrebov deleted the fix-per_page branchApril 7, 2025 15:34
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@williammartinwilliammartinwilliammartin left review comments

Copilot code reviewCopilotCopilot left review comments

@juruenjuruenjuruen approved these changes

@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.

list_commits returns 30 commits despiteperPage set to 1
4 participants
@AlexanderYastrebov@williammartin@juruen@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp