Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/github/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"strings"
"testing"

"github.com/github/github-mcp-server/pkg/raw"
"github.com/modelcontextprotocol/go-sdk/mcp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down Expand Up @@ -637,6 +638,8 @@ func normalizeEndpointKey(endpoint any) string {
panic("nil EndpointPattern")
}
return v.Method + " " + v.Pattern
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

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

The normalizeEndpointKey function now handles raw.EndpointPattern type, but there's potential confusion between the local EndpointPattern (defined at line 582) and raw.EndpointPattern. Consider adding a comment to clarify that raw.EndpointPattern is specifically for raw content API endpoints to improve code clarity.

Suggested change
return v.Method + " " + v.Pattern
return v.Method + " " + v.Pattern
// raw.EndpointPattern is used for raw content API endpoints (via the pkg/raw helpers),
// which is distinct from the local EndpointPattern used for standard REST API tests.

Copilot uses AI. Check for mistakes.

Choose a reason for hiding this comment

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

Thanks

case raw.EndpointPattern:
return v.Method + " " + v.Pattern
default:
panic("unsupported endpoint type")
}
Expand Down
Loading
Loading