mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-11-29 17:10:26 +08:00
This adds the following CLI commands: ``` ubi gh installation list ubi gh installation installation-name list-repositories ubi gh installation-name/repository-name list-cache-entries ubi gh installation-name/repository-name remove-cache-entry cache-entry-id ``` This adds Clover.humanize_size, so the list-cache-entries CLI command can reuse the logic.
15 lines
459 B
Ruby
15 lines
459 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiCli.on("gh").run_on("remove-cache-entry") do
|
|
desc "Remove cache entry for a GitHub repository"
|
|
|
|
banner "ubi gh installation-name/repository-name remove-cache-entry cache-entry-id"
|
|
|
|
args 1
|
|
|
|
run do |id, _, cmd|
|
|
check_no_slash(id, "invalid cache entry id format, should not include /", cmd)
|
|
@repository.remove_cache_entry(id)
|
|
response("Cache entry, if it exists, is now scheduled for destruction")
|
|
end
|
|
end
|