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

Method Delete

pkg/cmd/issue/artifact/client/client.go:146–152  ·  view source on GitHub ↗

Delete ignores the response's body. A successful delete can get 204 No Content, which has none, or 200 with the deleted artifact's number, which the caller already knows.

(repo ghrepo.Interface, issueNumber int, number int)

Source from the content-addressed store, hash-verified

144// Content, which has none, or 200 with the deleted artifact's number, which
145// the caller already knows.
146func (c *artifactClient) Delete(repo ghrepo.Interface, issueNumber int, number int) error {
147 u, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "issues", strconv.Itoa(issueNumber), "artifacts", strconv.Itoa(number))
148 if err != nil {
149 return err
150 }
151 return c.apiClient.REST(repo.RepoHost(), "DELETE", u.String(), nil, nil)
152}
153
154func (c *artifactClient) Create(repo ghrepo.Interface, issueNumber int, artifactType, name, body string) (*Artifact, error) {
155 u, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "issues", strconv.Itoa(issueNumber), "artifacts")

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected