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

Update mcp server with latest google/go-github API#1358

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
kerobbi merged 17 commits intomainfromstephenotalora/update-mcp-api
Nov 7, 2025

Conversation

@stephenotalora
Copy link
Contributor

@stephenotalorastephenotalora commentedNov 4, 2025
edited
Loading

Towardshttps://github.com/github/memex/issues/20995
Depends on#1357

Overview

This PR updates the MCP server to utilize the latestgoogle/go-github API for interacting with GitHub projects, more specifically the ability to perform CRUD operations introduced ingoogle/go-github@V77.

Details

  • Most API integrations have been refactored to use thegoogle/go-github library, replacing previous implementations.
  • The migration was applied across all relevant endpoints and toolsets to ensure consistent usage of the new API client.

Outstanding Work

The only toolsets that havenot yet been migrated to usegoogle/go-github are:

  • GetProjectItem and
  • UpdateProjectItem.

This is due to notable differences in parameter handling between thegoogle/go-github library and GitHub's RESTful API. Specifically, the way parameters must be passed for these endpoints does not fully align with the current library's abstractions, making a straightforward migration infeasible.

I am actively working to resolve these discrepancies and plan to make further adjustments withingoogle/go-github to support these use cases.

Update:

I have openedgoogle/go-github#3809 to resolve issues withGetProjectItem andUpdateProjectItem that came up during integration. The PR is ready for review and currently waiting on maintainers’ input.

Next Steps

  • Complete functional parity forGetProjectItem andUpdateProjectItem by contributing necessary changes upstream.
  • Monitor for any new breaking changes as GitHub's API evolves.

@stephenotalorastephenotaloraforce-pushed thestephenotalora/update-mcp-api branch frome7f625a toa6d80e1CompareNovember 4, 2025 21:22
@stephenotalorastephenotaloraforce-pushed thestephenotalora/mcp-projects-v77 branch 2 times, most recently from0a402d8 tofc1471dCompareNovember 4, 2025 21:27
@stephenotalorastephenotaloraforce-pushed thestephenotalora/update-mcp-api branch froma6d80e1 tofcf7fd5CompareNovember 4, 2025 21:30
@stephenotalorastephenotaloraforce-pushed thestephenotalora/mcp-projects-v77 branch fromfc1471d tofce10aeCompareNovember 4, 2025 21:31
@stephenotalorastephenotaloraforce-pushed thestephenotalora/update-mcp-api branch fromfcf7fd5 to5a4a278CompareNovember 4, 2025 21:32
@stephenotalorastephenotaloraforce-pushed thestephenotalora/update-mcp-api branch from5a4a278 to4d6a90aCompareNovember 4, 2025 22:09
@stephenotalorastephenotalora changed the titleStephenotalora/update mcp apiUpdate mcp server with latest google/go-github APINov 5, 2025
@stephenotalorastephenotaloraforce-pushed thestephenotalora/mcp-projects-v77 branch from4c97a67 tob1183b4CompareNovember 5, 2025 18:55
@stephenotalorastephenotaloraforce-pushed thestephenotalora/update-mcp-api branch fromeac7899 to3e3ab15CompareNovember 5, 2025 19:13
@stephenotalorastephenotalora self-assigned thisNov 5, 2025
@stephenotalorastephenotalora marked this pull request as ready for reviewNovember 6, 2025 17:56
@stephenotalorastephenotalora requested a review froma team as acode ownerNovember 6, 2025 17:56
CopilotAI review requested due to automatic review settingsNovember 6, 2025 17:56
Copy link
Contributor

CopilotAI 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 pull request refactors GitHub Projects V2 API integration by migrating from manual HTTP request construction to using the go-github SDK's native client methods, and updates field ID handling to useint64 instead of strings.

  • IntroducesRequiredBigInt andOptionalBigIntArrayParam helper functions to handle large integer field/item IDs
  • Migrates multiple project-related functions to use go-github SDK methods (ListProjectFields, GetProjectField, ListProjectItems, AddProjectItem, DeleteProjectItem)
  • Updates field ID representation from[]string to[]int64 with comma-separated URL encoding

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

FileDescription
pkg/github/server.goAdds helper functions for handling large integers (RequiredBigInt, OptionalBigIntArrayParam) and conversion utilities for string-to-int64 conversion
pkg/github/projects.goMigrates project API calls to use go-github SDK methods, updates data structures to use int64 for IDs, and removes obsolete custom types now replaced by SDK types
pkg/github/projects_test.goUpdates test assertions to check for comma-separated field parameters instead of array-style parameters

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

@stephenotalorastephenotalora marked this pull request as draftNovember 6, 2025 18:48
}
projectItems:= []projectV2Item{}
varresp*github.Response
varprojectItems []*github.ProjectV2Item
Copy link
ContributorAuthor

@stephenotalorastephenotaloraNov 6, 2025
edited
Loading

Choose a reason for hiding this comment

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

Standardized field parameters has changed from array notation (fields[]=123&fields[]=456) to comma-separated format (fields=123,456,789).

Why this change was needed:

  • The comma-separated format is handled natively by thegithub.com/google/go-querystring library using the,comma tag option
  • Eliminates manual URL encoding complexity in our code
  • Better aligns with Go's standard query parameter handling patterns
  • Our tests inprojects_test.go confirm the comma format works correctly:fieldParams == "123,456,789"

Technical details: ThefieldSelectionOptions struct now usesurl:"fields,omitempty,comma" which leverages go-querystring's built-in comma support rather than custom array parameter logic.

SeeListProjectItemsOptions struct

// ListProjectItemsOptions specifies optional parameters when listing project items.// Note: Pagination uses before/after cursor-style pagination similar to ListProjectsOptions.// "Fields" can be used to restrict which field values are returned (by their numeric IDs).typeListProjectItemsOptionsstruct {// Embed ListProjectsOptions to reuse pagination and query parameters.ListProjectsOptions// Fields restricts which field values are returned by numeric field IDs.Fields []int64`url:"fields,omitempty,comma"`}

I have also updated this internally to align the MCP server with the underlyinggoogle/go-github dependency since we're not quite ready to migrateGetProjectItem yet as per this PR's description.

fieldParams:=q["fields"]
iflen(fieldParams)==3&&fieldParams[0]=="123"&&fieldParams[1]=="456"&&fieldParams[2]=="789" {
fieldParams:=q.Get("fields")
iffieldParams=="123,456,789" {
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

see thiscomment in relation to this change.

@stephenotalorastephenotalora marked this pull request as ready for reviewNovember 6, 2025 19:56
@stephenotalorastephenotaloraforce-pushed thestephenotalora/mcp-projects-v77 branch fromb1183b4 tofab59ebCompareNovember 6, 2025 20:02
@stephenotalorastephenotaloraforce-pushed thestephenotalora/update-mcp-api branch from0743dcb tofd09a4aCompareNovember 6, 2025 20:03
@jm809jm809 mentioned this pull requestNov 6, 2025
Base automatically changed fromstephenotalora/mcp-projects-v77 tomainNovember 7, 2025 16:06
stephenotaloraand others added14 commitsNovember 7, 2025 16:59
@stephenotalorastephenotaloraforce-pushed thestephenotalora/update-mcp-api branch fromfd09a4a to7cb55a6CompareNovember 7, 2025 17:01
Copy link
Contributor

@kerobbikerobbi left a comment

Choose a reason for hiding this comment

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

Lgtm!

@kerobbikerobbi merged commitb68bec0 intomainNov 7, 2025
16 checks passed
@kerobbikerobbi deleted the stephenotalora/update-mcp-api branchNovember 7, 2025 17:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@kerobbikerobbikerobbi approved these changes

@stevesstevesAwaiting requested review from steves

@tmelliottjrtmelliottjrAwaiting requested review from tmelliottjr

@JoannaaKLJoannaaKLAwaiting requested review from JoannaaKL

Assignees

@stephenotalorastephenotalora

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@stephenotalora@kerobbi

[8]ページ先頭

©2009-2025 Movatter.jp