Skip to content

Commit ab9c99e

Browse files
committed
docs(cache delete): remove redundant comment
Signed-off-by: Babak K. Shandiz <babakks@github.com>
1 parent d574873 commit ab9c99e

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

pkg/cmd/cache/delete/delete.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,6 @@ func deleteCaches(opts *DeleteOptions, client *api.Client, repo ghrepo.Interface
167167

168168
totalDeleted := 0
169169
for _, cache := range toDelete {
170-
// We use two different endpoints with different response schemas:
171-
//
172-
// 1. /repos/OWNER/REPO/actions/caches/ID (for deleting by cache ID)
173-
// - returns HTTP 204 (NO CONTENT) on success
174-
// 2. /repos/OWNER/REPO/actions/caches?key=KEY[&ref=REF] (for deleting by cache key, and optionally a ref)
175-
// - returns HTTP 200 on success including information about the deleted caches
176-
//
177-
// The API calls are split into separate functions to handle the different response handling.
178-
179170
var count int
180171
var err error
181172
if id, ok := parseCacheID(cache); ok {
@@ -215,6 +206,7 @@ func deleteCaches(opts *DeleteOptions, client *api.Client, repo ghrepo.Interface
215206
}
216207

217208
func deleteCacheByID(client *api.Client, repo ghrepo.Interface, id int) error {
209+
// returns HTTP 204 (NO CONTENT) on success
218210
path := fmt.Sprintf("repos/%s/actions/caches/%d", ghrepo.FullName(repo), id)
219211
return client.REST(repo.RepoHost(), "DELETE", path, nil, nil)
220212
}

0 commit comments

Comments
 (0)