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

Function CheckHost

pkg/cmd/issue/artifact/shared/shared.go:222–227  ·  view source on GitHub ↗

CheckHost refuses GitHub Enterprise Server, which doesn't support issue artifacts. Callers run it before any request, so the user gets this reason instead of an API error. ghe.com hosts pass.

(host string)

Source from the content-addressed store, hash-verified

220// artifacts. Callers run it before any request, so the user gets this reason
221// instead of an API error. ghe.com hosts pass.
222func CheckHost(host string) error {
223 if ghauth.IsEnterprise(host) {
224 return errors.New("issue artifacts are not supported on GitHub Enterprise Server")
225 }
226 return nil
227}
228
229// CheckIssue refuses a pull request, since artifacts are only supported on
230// issues. It makes one lookup, and callers run it before any artifact request.

Callers 7

deleteRunFunction · 0.92
viewRunFunction · 0.92
listRunFunction · 0.92
createRunFunction · 0.92
downloadRunFunction · 0.92
editRunFunction · 0.92
TestCheckHostFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCheckHostFunction · 0.68