cli/pkg/cmd/codespace
Charlie Andrews 5ffe838dce Disallow any port operations when codespace has pending operation
Since all of the port operations require the codespace to be running, we
need to disallow these operations when there's a pending op since we
can't start the codespace in this state.

Since the API already disallows this, this is basically cleaning up the
error messages that the user sees in this state

Old error message:

```
$ gh cs ports forward 80:80
? Choose codespace: redacted
Starting codespace â£ğerror connecting to codespace: error starting codespace: HTTP 422: your codespace has an operation pending: updating to a sku with a different amount of storage; please wait until this operation is complete (https://api.github.com/user/codespaces/cwndrws-redacted/start)
```

New error message:

```
$ gh cs ports forward 80:80
? Choose codespace: redacted
codespace is disabled while it has a pending operation: Changing machine types...
exit status 1
```
2022-03-15 17:27:38 -04:00
..
code.go Ensure codespace exists and doesn't have a pending op when opening Code 2022-03-15 17:21:28 -04:00
code_test.go WIP 2022-02-15 19:35:53 -05:00
common.go Merge pull request #5211 from cli/edit_codspaces 2022-03-03 18:22:01 -05:00
common_test.go Add display name for codespaces (#5044) 2022-02-09 16:15:03 +01:00
create.go Merge pull request #5276 from markphelps/codespaces-accept-perms-wording 2022-03-15 12:55:44 -04:00
create_test.go Update wording after consulting product 2022-02-25 17:32:08 -05:00
delete.go codespace: progress indication, logging (#4555) 2021-10-21 18:04:04 +02:00
delete_test.go WIP 2022-02-15 19:35:53 -05:00
edit.go updates from review 2022-03-02 13:17:57 +00:00
list.go Mark codespace with pending op as disabled with reason instead of state 2022-03-15 17:21:24 -04:00
logs.go Disallow getting logs from codespaces with pending ops 2022-03-15 17:21:28 -04:00
mock_api.go first stab 2022-02-15 20:13:30 +00:00
mock_prompter.go Rename the cmd pkg to codespace 2021-10-04 14:16:04 -04:00
ports.go Disallow any port operations when codespace has pending operation 2022-03-15 17:27:38 -04:00
root.go first stab 2022-02-15 20:13:30 +00:00
ssh.go Disallow ssh'ing to codespace with a pending operation 2022-03-15 17:21:28 -04:00
stop.go codespace: progress indication, logging (#4555) 2021-10-21 18:04:04 +02:00