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

Function getUserPublicKey

pkg/cmd/secret/set/http.go:51–57  ·  view source on GitHub ↗
(client *api.Client, host string)

Source from the content-addressed store, hash-verified

49}
50
51func getUserPublicKey(client *api.Client, host string) (*PubKey, error) {
52 u, err := safeurl.JoinPath("user", "codespaces", "secrets", "public-key")
53 if err != nil {
54 return nil, err
55 }
56 return getPubKey(client, host, u)
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")

Callers 1

setRunFunction · 0.85

Calls 2

JoinPathFunction · 0.92
getPubKeyFunction · 0.85

Tested by

no test coverage detected