Describe the feature or problem you’d like to solve
To cleanup caches from PR branches once they are merged, the current approach is to create a script that list all the caches for the PR ref, gets the IDs, and then iterate through each ID to delete the cache. This approach is also used in the official GitHub documentation. Having to do this scripting and choosing some number for the limit of caches to fetch, which might not include everything, seems needlessly complex.
Proposed solution
Add ability to combine the --all and --ref flags for deleting all caches for a particular ref. For example: gh cache delete --all --ref refs/pull/<PR-number>/merge.
Additional context
Add any other context like screenshots or mockups are helpful, if applicable.
Describe the feature or problem you’d like to solve
To cleanup caches from PR branches once they are merged, the current approach is to create a script that list all the caches for the PR ref, gets the IDs, and then iterate through each ID to delete the cache. This approach is also used in the official GitHub documentation. Having to do this scripting and choosing some number for the limit of caches to fetch, which might not include everything, seems needlessly complex.
Proposed solution
Add ability to combine the
--alland--refflags for deleting all caches for a particular ref. For example:gh cache delete --all --ref refs/pull/<PR-number>/merge.Additional context
Add any other context like screenshots or mockups are helpful, if applicable.