-
Notifications
You must be signed in to change notification settings - Fork 3k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+146
−119
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
97023fb
licences update from required CI build
stephenotalora 615f158
fixes licences
stephenotalora 4e56fee
implements new helpers to support google/go-github v77 API
stephenotalora ed4f294
upgrades toolset to leverage google/go-github v77 with the exception …
stephenotalora 0d9504b
refactor string conversion helpers
stephenotalora f3cbb05
reverts migration google/go-github GetProjectItem due to bug with the…
stephenotalora 773d1d7
additional refactoring for server helpers based on recent updates to …
stephenotalora 38afee8
test updates based on underlying lib requirements
stephenotalora 5563823
resolves licences conflicts with script/licenses
stephenotalora 2a6dc42
cleanup
stephenotalora e2f723d
reduce change diff
stephenotalora 2971d2b
updates helper docs to reflect to methods
stephenotalora b0f7bbf
upgrades delete projects item to google/go-github
stephenotalora 9323240
returns error from parsing string to int64
stephenotalora e3db2d1
improved OptionalBigIntArrayParam doc
stephenotalora 641b3ab
improves implementation for RequiredBigInt
stephenotalora 7cb55a6
improves documentation for temporary fieldSelectionOptions struct
stephenotalora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -653,8 +653,8 @@ func Test_ListProjectItems(t *testing.T) { | |
| mock.EndpointPattern{Pattern: "/orgs/{org}/projectsV2/{project}/items", Method: http.MethodGet}, | ||
| http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
| q := r.URL.Query() | ||
| fieldParams := q["fields"] | ||
| if len(fieldParams) == 3 && fieldParams[0] == "123" && fieldParams[1] == "456" && fieldParams[2] == "789" { | ||
| fieldParams := q.Get("fields") | ||
| if fieldParams == "123,456,789" { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see this comment in relation to this change. |
||
| w.WriteHeader(http.StatusOK) | ||
| _, _ = w.Write(mock.MustMarshal(orgItems)) | ||
| return | ||
|
|
@@ -852,8 +852,8 @@ func Test_GetProjectItem(t *testing.T) { | |
| mock.EndpointPattern{Pattern: "/orgs/{org}/projectsV2/{project}/items/{item_id}", Method: http.MethodGet}, | ||
| http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
| q := r.URL.Query() | ||
| fieldParams := q["fields"] | ||
| if len(fieldParams) == 2 && fieldParams[0] == "123" && fieldParams[1] == "456" { | ||
| fieldParams := q.Get("fields") | ||
| if fieldParams == "123,456" { | ||
| w.WriteHeader(http.StatusOK) | ||
| _, _ = w.Write(mock.MustMarshal(orgItem)) | ||
| return | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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:
github.com/google/go-querystringlibrary using the,commatag optionprojects_test.goconfirm the comma format works correctly:fieldParams == "123,456,789"Technical details: The
fieldSelectionOptionsstruct now usesurl:"fields,omitempty,comma"which leverages go-querystring's built-in comma support rather than custom array parameter logic.See ListProjectItemsOptions struct
I have also updated this internally to align the MCP server with the underlying
google/go-githubdependency since we're not quite ready to migrateGetProjectItemyet as per this PR's description.