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

Function getRepoPubKey

pkg/cmd/secret/set/http.go:59–65  ·  view source on GitHub ↗
(client *api.Client, repo ghrepo.Interface, app shared.App)

Source from the content-addressed store, hash-verified

57}
58
59func getRepoPubKey(client *api.Client, repo ghrepo.Interface, app shared.App) (*PubKey, error) {
60 u, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), string(app), "secrets", "public-key")
61 if err != nil {
62 return nil, err
63 }
64 return getPubKey(client, repo.RepoHost(), u)
65}
66
67func getEnvPubKey(client *api.Client, repo ghrepo.Interface, envName string) (*PubKey, error) {
68 u, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "environments", envName, "secrets", "public-key")

Callers 1

setRunFunction · 0.85

Calls 5

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

Tested by

no test coverage detected