MCPcopy
hub / github.com/cli/cli / userAndOrgs

Function userAndOrgs

pkg/cmd/repo/create/http.go:343–346  ·  view source on GitHub ↗

Returns the current username and any orgs that user is a member of.

(httpClient *http.Client, hostname string)

Source from the content-addressed store, hash-verified

341
342// Returns the current username and any orgs that user is a member of.
343func userAndOrgs(httpClient *http.Client, hostname string) (string, []string, error) {
344 client := api.NewClientFromHTTP(httpClient)
345 return api.CurrentLoginNameAndOrgs(client, hostname)
346}

Callers 2

createFromTemplateFunction · 0.85

Calls 2

NewClientFromHTTPFunction · 0.92
CurrentLoginNameAndOrgsFunction · 0.92

Tested by

no test coverage detected