Commit graph

39 commits

Author SHA1 Message Date
Jose Garcia
10ad85486f Merge pull request #154 from github/jg/fix-ctx-error
ghcs create/ssh: fix ctx cancellation errors & fix todo for X11 forwarding
2021-09-15 15:45:35 -04:00
Jose Garcia
0f72e3d886 defer stopPolling and docs 2021-09-15 14:29:16 -04:00
Alan Donovan
06719866c9 move api to internal/ 2021-09-15 13:13:10 -04:00
Jose Garcia
547c629220 fix ctx cancellation errors & fix todo for X11 forwarding 2021-09-15 10:38:19 -04:00
Alan Donovan
cbb8253544 consolidate survey functions 2021-09-09 11:57:37 -04:00
Alan Donovan
c31fc05746 more typo fixes 2021-09-02 09:09:05 -04:00
Alan Donovan
49ccdd3d21 use correct correct spelling of codespace 2021-09-01 17:26:26 -04:00
Jose Garcia
2163aba3d5 pass branch for sku selection, pre-select if only one is returned 2021-09-01 13:54:45 -04:00
Alan Donovan
bbcf2dd321 spell product names (Codespaces, Live Share) correctly 2021-08-31 11:15:26 -04:00
Jose Garcia
634796e8a8 merge main 2021-08-27 18:18:30 -04:00
Jose Garcia
adc1ee5e2d merge main 2021-08-27 17:43:43 -04:00
Jose Garcia
368e8c6110 simplify contract for state polling 2021-08-27 17:34:06 -04:00
Alan Donovan
9f082ca887 Merge branch 'main' into main-style 2021-08-27 17:30:34 -04:00
Jose Garcia
e5f45d4bfa docs and improvement to the showStatus implementation 2021-08-27 16:41:22 -04:00
Jose Garcia
1e8a8370fe initial round of PR feedback 2021-08-27 16:29:02 -04:00
Alan Donovan
e423cb0ef9 display colon and cursor in survey prompts 2021-08-27 16:09:02 -04:00
Alan Donovan
d8f1baa519 more SKU renames. 2021-08-27 15:36:45 -04:00
Jose Garcia
da8655209b make things private 2021-08-27 12:52:30 -04:00
Jose Garcia
cb6552f4ca more efficient impl for processing states 2021-08-27 12:50:32 -04:00
Alan Donovan
38ff786a7d cmd/ghcs: style tweaks 2021-08-27 12:03:20 -04:00
Jose Garcia
e4e77a4294 merge upstream 2021-08-26 08:55:38 -04:00
Jose Garcia
151eb2b656 fix linter 2021-08-26 08:35:30 -04:00
Jose Garcia
2ef6e95982 show status under a flag 2021-08-24 20:15:21 -04:00
Jose Garcia
46ee45bcdd simplify the state iteration 2021-08-24 17:46:24 -04:00
Gabriel Ramirez
30be4c98f9 Send codespace name to Stdout to enable scripting 2021-08-24 13:12:18 -05:00
Jose Garcia
55f0dad3db merge upstream 2021-08-19 18:30:10 +00:00
Mislav Marohnić
517aae2805 Merge remote-tracking branch 'origin' into docs 2021-08-17 14:42:09 +02:00
Mislav Marohnić
5e472bc0e5 Improve command descriptions and argument assertions 2021-08-16 23:24:11 +02:00
Mislav Marohnić
20d75f0ff9 Normalize logging, output, and error reporting
- 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
2021-08-12 14:37:23 +02:00
Jose Garcia
76aca39f5b Create status support 2021-08-04 17:35:11 +00:00
Jose Garcia
e57b390d4a dotfiles status spike 2021-08-03 13:42:34 +00:00
CamiloGarciaLaRotta
89cf916e23 Merge branch 'main' into feat/promptless-create 2021-07-22 10:09:21 -04:00
Camilo Garcia La Rotta
3ef0226e20 fix: output available machine names on --machine error 2021-07-22 10:07:09 -04:00
Issy Long
b66d65379f cmd/ghcs/*.go: Better short descriptions of what commands do
- 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
```
2021-07-22 11:07:23 +01:00
Camilo Garcia La Rotta
a68cda1469 refactor: break down Create() into smaller funcs 2021-07-21 20:54:18 -04:00
Camilo Garcia La Rotta
3db217fef0 feat: make sku survey optional 2021-07-21 20:27:22 -04:00
Camilo Garcia La Rotta
aab98ccc18 feat: break out repo and branch surveys 2021-07-21 20:06:05 -04:00
Camilo Garcia La Rotta
c751e88120 feat: introduce repo, branch and machine flags for ghcs create 2021-07-21 19:56:08 -04:00
Jose Garcia
4a0eaa3da5 Latest and greatest 2021-07-14 16:12:30 -04:00