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

Function deleteTag

pkg/cmd/release/delete/delete.go:131–140  ·  view source on GitHub ↗
(httpClient *http.Client, baseRepo ghrepo.Interface, tagName string)

Source from the content-addressed store, hash-verified

129}
130
131func deleteTag(httpClient *http.Client, baseRepo ghrepo.Interface, tagName string) error {
132 path, err := safeurl.JoinPath("repos", baseRepo.RepoOwner(), baseRepo.RepoName(), "git", "refs", fmt.Sprintf("tags/%s", tagName))
133 if err != nil {
134 return err
135 }
136 // TODO(api-client-rollout)
137 // This line of code is part of a mechanical roll out of the api client.
138 // As a follow up, consider whether the api client can be injected to this call site, rather than constructed
139 return api.NewClientFromHTTP(httpClient).REST(baseRepo.RepoHost(), http.MethodDelete, path.String(), nil, nil)
140}

Callers 2

deleteRunFunction · 0.85
Test_deleteTag_httpErrorFunction · 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

Test_deleteTag_httpErrorFunction · 0.68