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
401 B
Ruby
15 lines
401 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiCli.on("gh", "installation", "list") do
|
|
desc "List GitHub installations"
|
|
|
|
key = :github_installations_list
|
|
|
|
options("ubi gh installation list [options]", key:) do
|
|
on("-N", "--no-headers", "do not show headers")
|
|
end
|
|
|
|
run do |opts|
|
|
response(format_rows(%i[id name], sdk.github_installation.list, headers: opts[key][:"no-headers"] != false))
|
|
end
|
|
end
|