Commit graph

22 commits

Author SHA1 Message Date
Mislav Marohnić
8c0c7a8e19 Make GITHUB_TOKEN configurable through Go member
Co-authored-by: Jose Garcia <josebalius@github.com>
2021-09-17 16:29:35 +02:00
Mislav Marohnić
c2f3537a32 Separate "main" package from "ghcs" package
To make "ghcs" importable, this separates out the `main()` function into
its own package that lives under "cmd/ghcs/main". Typically the main
package would be called "cmd/ghcs", but we wanted to leave the current
ghcs implementation where it is to avoid causing conflicts with current
work in progress.

Co-authored-by: Jose Garcia <josebalius@github.com>
2021-09-17 16:26:20 +02:00
Mislav Marohnić
dbb4e0c177 Merge remote-tracking branch 'origin' into ruleguard 2021-09-16 11:46:50 +02:00
Alan Donovan
06719866c9 move api to internal/ 2021-09-15 13:13:10 -04:00
Mislav Marohnić
fb5a35568c Ensure original errors are wrapped with "%w" instead of "%v" 2021-09-15 13:58:41 +02:00
Jose Garcia
f5adc9e3a7 remove all deprecation messages and deprecated functionality 2021-09-13 10:58:00 -04:00
Alan Donovan
b96341a5f9 Merge branch 'main' into ask-tty 2021-09-09 12:01:55 -04:00
Alan Donovan
cbb8253544 consolidate survey functions 2021-09-09 11:57:37 -04:00
Jose Garcia
3b198c1707 switch to Errorln 2021-09-09 10:09:14 -04:00
Jose Garcia
3216cbc07f codespace flag, deprecate argument 2021-09-03 11:43:10 -04:00
Alan Donovan
49ccdd3d21 use correct correct spelling of codespace 2021-09-01 17:26:26 -04:00
Alan Donovan
bbcf2dd321 spell product names (Codespaces, Live Share) correctly 2021-08-31 11:15:26 -04:00
Alan Donovan
9f082ca887 Merge branch 'main' into main-style 2021-08-27 17:30:34 -04:00
Alan Donovan
8b395b5ab5 ghcs code: improve vscode error 2021-08-27 15:53:55 -04:00
Alan Donovan
38ff786a7d cmd/ghcs: style tweaks 2021-08-27 12:03:20 -04:00
Josh Gross
ae88091fd8 Replace options struct with variable 2021-08-23 12:01:13 -04:00
Josh Gross
530c0244f9 Add support to code for VS Code Insiders 2021-08-19 17:37:57 -04: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
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
Jose Garcia
c2b136a84f ghcs code command support 2021-07-21 13:28:47 -04:00