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)
| 144 | // Content, which has none, or 200 with the deleted artifact's number, which |
| 145 | // the caller already knows. |
| 146 | func (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 | |
| 154 | func (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") |