| 202 | } |
| 203 | |
| 204 | func deleteCacheByID(client *api.Client, repo ghrepo.Interface, id int64) error { |
| 205 | // returns HTTP 204 (NO CONTENT) on success |
| 206 | path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "actions", "caches", strconv.FormatInt(id, 10)) |
| 207 | if err != nil { |
| 208 | return err |
| 209 | } |
| 210 | return client.REST(repo.RepoHost(), "DELETE", path.String(), nil, nil) |
| 211 | } |
| 212 | |
| 213 | // deleteCacheByKey deletes cache entries by given key (and optional ref) and |
| 214 | // returns the number of deleted entries. |