Commit graph

32 commits

Author SHA1 Message Date
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
35f458b853 Merge pull request #28 from github/jg/fix-ssh
Fix ssh command order
2021-07-21 14:06:18 -04:00
Jose Garcia
532ee68165 Fix ssh command order 2021-07-21 14:04:42 -04:00
Jose Garcia
345e3e1b8a Update main.go 2021-07-21 13:50:19 -04:00
Jose Garcia
f7c80c99e7 Merge pull request #27 from github/jg/code-command
ghcs code command support
2021-07-21 13:48:10 -04:00
Jose Garcia
b44355d80d Merge pull request #26 from github/jg/secrets-and-server-port
Don't overwrite .zshenv, support server port for SSH, forward X11
2021-07-21 13:30:16 -04:00
Jose Garcia
c2b136a84f ghcs code command support 2021-07-21 13:28:47 -04:00
Jose Garcia
3e50fff2c9 X11 support 2021-07-21 10:22:33 -04:00
Kristján Oddsson
aa0ef37ffc Merge pull request #25 from github/fix-error-message-wording-and-link
Update error message link and wording.
2021-07-21 13:01:07 +01:00
Kristján Oddsson
7a3e47ff3e Update error message link and wording. 2021-07-21 12:46:44 +01:00
Jose Garcia
e81bee6886 Doesn't overwrite .zshenv and supports server-port 2021-07-20 18:43:43 -04:00
Jose Garcia
8faee1e5a9 Update main.go 2021-07-20 08:09:48 -04:00
Jose Garcia
5e803aca79 Merge pull request #20 from github/jg/better-conn-handling
Bump go-liveshare w/ better connection handling and simpler ssh setup
2021-07-20 08:08:33 -04:00
Jose Garcia
6642fb520a Better connection handling and simpler ssh setup 2021-07-20 08:04:34 -04:00
Issy Long
2f8d00e0f8 Merge pull request #19 from github/version-cmd
cmd/ghcs/main: Add `--version` flag
2021-07-20 13:02:41 +01:00
Issy Long
f7e32485fc Merge pull request #18 from github/gracefully-fail-if-token-envvar-unset
cmd/ghcs/main: Fail gracefully if `GITHUB_TOKEN` entirely unset
2021-07-20 13:02:35 +01:00
Issy Long
4582fed1cc cmd/ghcs/main: Add --version flag
- This is built into Cobra the argument parser. Now `ghcs --version`
  exists.
- When we prepare to bump the version, we need to remember to update
  this value else the Homebrew formula, GitHub releases and the `ghcs
  --version` output will be mismatched.
- Fixes https://github.com/github/ghcs/issues/16.
2021-07-19 18:45:18 +01:00
Issy Long
cb29b11ab2 cmd/ghcs/main: Fail gracefully if GITHUB_TOKEN entirely unset
- I have my GitHub API token in my environment as
  `HOMEBREW_GITHUB_API_TOKEN`, so with things that need `GITHUB_TOKEN` I
  have to remember to `export GITHUB_TOKEN=$HOMEBREW_GITHUB_API_TOKEN`.
- I didn't for this tool, and got this unfriendly error message:

```
❯ ghcs list
Error: error getting user: Bad credentials
Usage:
  ghcs list [flags]

Flags:
  -h, --help   help for list

error getting user: Bad credentials
```

- This moves the "do you have a `GITHUB_TOKEN`" question to the very
  beginning (no guarantees about org SSO access, just a string that
  exists), erroring out with a nice message if users don't have that
  envvar set:

```
issyl0 in cetus in ~/repos/github/ghcs/cmd/ghcs on gracefully-fail-if-token-envvar-unset
❯ ./ghcs list
The GITHUB_TOKEN environment variable is required. Create a Personal Access Token with org SSO access at https://github.com/settings/tokens/new.

issyl0 in cetus in ~/repos/github/ghcs/cmd/ghcs on gracefully-fail-if-token-envvar-unset
❯ export GITHUB_TOKEN=$HOMEBREW_GITHUB_API_TOKEN

❯ ./ghcs list
+--------------------------------+--------------------+------------------------------------+----------+---------------------------+
|              NAME              |     REPOSITORY     |               BRANCH               |  STATE   |        CREATED AT         |
+--------------------------------+--------------------+------------------------------------+----------+---------------------------+
| issyl0-github-cat-ggrpj5fvwvr  | github/cat         | dependabot/bundler/graphql-1.12.13 | Shutdown | 2021-07-13T12:36:53+01:00 |
+--------------------------------+--------------------+------------------------------------+----------+---------------------------+
```
2021-07-19 18:10:15 +01:00
Jose Garcia
570a407bac Fix directive 2021-07-19 08:00:51 -04:00
Jose Garcia
798413848b Portfowarding private/public/forward now supported 2021-07-17 20:32:47 -04:00
Jose Garcia
3c42ab8f7a ghcs ports v1 2021-07-16 18:45:38 -04:00
Jose Garcia
349d3f382e Merge pull request #2 from github/mislav/timeout
Increase ssh command timeout and improve error message
2021-07-15 12:00:45 -04:00
Jose Garcia
44698ea1de Merge branch 'main' into mislav/timeout 2021-07-15 11:54:52 -04:00
Jose Garcia
ecea5b821a Give more time to start 2021-07-15 14:35:26 +00:00
Jose Garcia
b28b4a13b7 Merge pull request #1 from github/mislav/ssh-tweaks
Improve ssh command
2021-07-15 10:32:32 -04:00
Mislav Marohnić
d506a97419 Increase ssh command timeout and improve error message
- My `github/github` codespace failed to start within 10s
- Output more precise error message
2021-07-15 16:10:03 +02:00
Mislav Marohnić
d46420e812 Improve ssh command
- Ensure parent process exits when `ssh` sub-process is done
- Enable connections to `github/github` when `--profile` flag wasn't given
2021-07-15 16:07:23 +02:00
Jose Garcia
e108b5d18f Merge branch 'main' of github.com:github/ghcs 2021-07-15 08:49:28 -04:00
Jose Garcia
a5f558bf2a Makes secrets work 2021-07-15 08:49:18 -04:00
Jose Garcia
4a0eaa3da5 Latest and greatest 2021-07-14 16:12:30 -04:00