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

Function viewRepoRuleset

pkg/cmd/ruleset/view/http.go:12–18  ·  view source on GitHub ↗
(httpClient *http.Client, repo ghrepo.Interface, databaseId string)

Source from the content-addressed store, hash-verified

10)
11
12func viewRepoRuleset(httpClient *http.Client, repo ghrepo.Interface, databaseId string) (*shared.RulesetREST, error) {
13 path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "rulesets", databaseId)
14 if err != nil {
15 return nil, err
16 }
17 return viewRuleset(httpClient, repo.RepoHost(), path)
18}
19
20func viewOrgRuleset(httpClient *http.Client, orgLogin string, databaseId string, host string) (*shared.RulesetREST, error) {
21 path, err := safeurl.JoinPath("orgs", orgLogin, "rulesets", databaseId)

Callers 1

viewRunFunction · 0.85

Calls 5

JoinPathFunction · 0.92
viewRulesetFunction · 0.85
RepoOwnerMethod · 0.65
RepoNameMethod · 0.65
RepoHostMethod · 0.65

Tested by

no test coverage detected