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

Fix handling of multi path resources#1458

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

Conversation

@omgitsads
Copy link
Member

Follow up to#1457, as I missed thaturitemplate.Value separates the capture group andString() doesn't work.

CopilotAI review requested due to automatic review settingsNovember 20, 2025 15:07
@omgitsadsomgitsads requested a review froma team as acode ownerNovember 20, 2025 15:07
Copilot finished reviewing on behalf ofomgitsadsNovember 20, 2025 15:08
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 PR fixes the handling of multi-path resources in URI templates by properly extracting path components fromuritemplate.Value. The issue was thatString() doesn't work for multi-segment paths with capture groups - the proper approach is to check if the value is a list and handle both cases accordingly.

Key Changes:

  • Fixed path extraction logic inRepositoryResourceContentsHandler to handle both single path values and multi-segment paths usingList() andString() methods
  • Added new utility functions for creating tool results inpkg/utils/result.go
  • Migrated frommark3labs/mcp-go tomodelcontextprotocol/go-sdk throughout the codebase
  • Updated third-party license files to reflect dependency changes

Reviewed Changes

Copilot reviewed 90 out of 91 changed files in this pull request and generated 14 comments.

Show a summary per file
FileDescription
pkg/github/repository_resource.goFixed multi-path URI template handling by checking for list values and joining path components
pkg/github/repository_resource_test.goRefactored tests to use new SDK patterns and added multi-path test case
pkg/utils/result.goAdded utility functions for creating MCP tool results
pkg/toolsets/toolsets.goMigrated to new MCP SDK with updated type definitions
pkg/log/io.goAdded Close method to IOLogger
pkg/github/*.goLarge-scale migration from old MCP SDK to new one
Third-party license filesUpdated to reflect dependency changes (removed old deps, added new ones)

returnmcp.NewToolResultError(err.Error()),nil
}
funcGetDependabotAlert(getClientGetClientFn,t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any,any]) {
tool:= mcp.Tool{

Choose a reason for hiding this comment

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

This definition of tool is never used.

Copilot uses AI. Check for mistakes.
returnmcp.NewToolResultError(err.Error()),nil
}
funcListDependabotAlerts(getClientGetClientFn,t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any,any]) {
tool:= mcp.Tool{

Choose a reason for hiding this comment

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

This definition of tool is never used.

Copilot uses AI. Check for mistakes.
returnmcp.NewToolResultError(err.Error()),nil
}
funcListGists(getClientGetClientFn,t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any,any]) {
tool:= mcp.Tool{

Choose a reason for hiding this comment

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

This definition of tool is never used.

Copilot uses AI. Check for mistakes.
returnmcp.NewToolResultError(err.Error()),nil
}
funcGetGist(getClientGetClientFn,t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any,any]) {
tool:= mcp.Tool{

Choose a reason for hiding this comment

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

This definition of tool is never used.

Copilot uses AI. Check for mistakes.
returnmcp.NewToolResultError(err.Error()),nil
}
funcCreateGist(getClientGetClientFn,t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any,any]) {
tool:= mcp.Tool{

Choose a reason for hiding this comment

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

This definition of tool is never used.

Copilot uses AI. Check for mistakes.
@omgitsadsomgitsads changed the base branch frommain toomgitsads/go-sdkNovember 20, 2025 15:16
Copy link
Contributor

@mattdhollowaymattdholloway left a comment

Choose a reason for hiding this comment

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

lgtm!

@omgitsadsomgitsads merged commit948fe76 intogithub:omgitsads/go-sdkNov 20, 2025
14 of 17 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@mattdhollowaymattdhollowaymattdholloway approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@omgitsads@mattdholloway

[8]ページ先頭

©2009-2025 Movatter.jp