load test
- 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 | +--------------------------------+--------------------+------------------------------------+----------+---------------------------+ ``` |
||
|---|---|---|
| api | ||
| cmd/ghcs | ||
| internal/codespaces | ||