- It was possible to delete Codespaces for repo `SomePerson/foo` but not
`someperson/foo`, despite the fact that the GitHub APIs don't actually
care about casing - `SomePerson` and `someperson` is the same account.
- This fixes that by lowercasing both the user-provided repo name, and
the repository that is attached to the Codespace for a match.
- Fixes#76.
- Return errors as errors, not print to stdout and return nil
- Ensure errors and warnings are always written to stderr, not stout
- Do not print progress to stdout unless stdout is a terminal
- Currently the flow to delete a single Codespace is `gh cs list`, copy
and paste the Codespace name onto the end of `gh cs delete`.
- This improves consistency with other commands by letting the user
choose which Codespace they want to delete, interactively. A Codespace
name on the command-line still works too.
- This adds a `-c`, `--codespace` parameter to `ghcs ssh` to allow for
non-interactively specifying a Codespace to SSH into, for instance if
a user has recently done `ghcs list` and already knows which Codespace
they want to access. Without a value for the `-c` parameter, the
interactive prompt appears as usual.
- I ran `--help` on `ghcs code` and saw `ghcs code` and that was it,
which was surprising. I expected a description.
- Here's a fix for all of the commands thus far to give them longer
descriptions.
- I've only done "short" descriptions in Cobra terms, and removed the
"long" descriptions as they seemed like they needed to be
unnecessarily verbose.
Before:
```
❯ ghcs --help
Codespaces
Usage:
ghcs [command]
Available Commands:
code code
create Create
delete delete
help Help about any command
list list
ports ports
ssh ssh
Flags:
-h, --help help for ghcs
-v, --version version for ghcs
Use "ghcs [command] --help" for more information about a command.
❯ ghcs ssh --help
ssh
Usage:
ghcs ssh [flags]
Flags:
-h, --help help for ssh
--profile string SSH Profile
--server-port int SSH Server Port
```
After:
```
❯ ./ghcs --help
Codespaces
Usage:
ghcs [command]
Available Commands:
code Open a GitHub Codespace in VSCode.
create Create a GitHub Codespace.
delete Delete a GitHub Codespace.
help Help about any command
list List GitHub Codespaces you have on your account.
ports Forward ports from a GitHub Codespace.
ssh SSH into a GitHub Codespace, for use with running tests/editing in vim, etc.
Flags:
-h, --help help for ghcs
-v, --version version for ghcs
Use "ghcs [command] --help" for more information about a command.
❯ ./ghcs ssh --help
SSH into a GitHub Codespace, for use with running tests/editing in vim, etc.
Usage:
ghcs ssh [flags]
Flags:
-h, --help help for ssh
--profile string SSH Profile
--server-port int SSH Server Port
```