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

Function checkHost

internal/attachments/client.go:64–69  ·  view source on GitHub ↗

checkHost rejects a host that cannot serve the upload endpoint. IsEnterprise is false for ghe.com tenants, so data residency keeps working.

(host string)

Source from the content-addressed store, hash-verified

62// checkHost rejects a host that cannot serve the upload endpoint. IsEnterprise
63// is false for ghe.com tenants, so data residency keeps working.
64func checkHost(host string) error {
65 if auth.IsEnterprise(host) {
66 return errors.New("attaching files is not supported on GitHub Enterprise Server")
67 }
68 return nil
69}
70
71// uploadTokenTypes lists the credentials that can attach a file.
72var uploadTokenTypes = []gh.TokenType{

Callers 2

TestCheckHostFunction · 0.85
NewUploaderFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCheckHostFunction · 0.68