MCPcopy Create free account
hub / github.com/cli/cli / isAPIHost

Function isAPIHost

script/ghmock/request.go:47–50  ·  view source on GitHub ↗

isAPIHost reports whether gh sends REST and GraphQL calls to hostname, for github.com or, with --localhost, for github.localhost.

(hostname string)

Source from the content-addressed store, hash-verified

45// isAPIHost reports whether gh sends REST and GraphQL calls to hostname, for
46// github.com or, with --localhost, for github.localhost.
47func isAPIHost(hostname string) bool {
48 h := strings.ToLower(hostname)
49 return h == dotcomAPIHost || h == apiHost
50}
51
52// requestName returns the name responses are stored under: "graphql Operation"
53// for GraphQL calls and "METHOD /path" for REST calls to the API host. Calls to

Callers 4

schemaCheckFunction · 0.85
serveGitHTTPMethod · 0.85
requestNameFunction · 0.85
checkMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected