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

Function deleteDeployKey

pkg/cmd/repo/deploy-key/delete/http.go:11–20  ·  view source on GitHub ↗
(httpClient *http.Client, repo ghrepo.Interface, id string)

Source from the content-addressed store, hash-verified

9)
10
11func deleteDeployKey(httpClient *http.Client, repo ghrepo.Interface, id string) error {
12 path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "keys", id)
13 if err != nil {
14 return err
15 }
16 // TODO(api-client-rollout)
17 // This line of code is part of a mechanical roll out of the api client.
18 // As a follow up, consider whether the api client can be injected to this call site, rather than constructed
19 return api.NewClientFromHTTP(httpClient).REST(repo.RepoHost(), "DELETE", path.String(), nil, nil)
20}

Callers 2

deleteRunFunction · 0.85

Calls 7

JoinPathFunction · 0.92
NewClientFromHTTPFunction · 0.92
RepoOwnerMethod · 0.65
RepoNameMethod · 0.65
RESTMethod · 0.65
RepoHostMethod · 0.65
StringMethod · 0.65

Tested by 1