ubicloud/cli-commands/gh/installation/list.rb
Jeremy Evans 4d68fa2831 Add support for managing github installations/repositories/cache entries to the CLI
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.
2025-11-01 02:46:00 +09:00

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