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

Function viewRuleset

pkg/cmd/ruleset/view/http.go:28–38  ·  view source on GitHub ↗
(httpClient *http.Client, hostname string, path safeurl.SafeURL)

Source from the content-addressed store, hash-verified

26}
27
28func viewRuleset(httpClient *http.Client, hostname string, path safeurl.SafeURL) (*shared.RulesetREST, error) {
29 apiClient := api.NewClientFromHTTP(httpClient)
30 result := shared.RulesetREST{}
31
32 err := apiClient.REST(hostname, "GET", path.String(), nil, &result)
33 if err != nil {
34 return nil, err
35 }
36
37 return &result, nil
38}

Callers 2

viewRepoRulesetFunction · 0.85
viewOrgRulesetFunction · 0.85

Calls 3

NewClientFromHTTPFunction · 0.92
RESTMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected