This was using the incorrect GitHub endpoint prior, which fetched a team
by slug. Any user in a GitHub organization can view all teams, so this
didn't block signups like intended.
I've verified this API returns an error when the calling user is not a
member of the team requested.
Fixes#3105.
* fix: Remove use of `require` in `require.Eventually` in tests
Because require uses `t.FailNow()` and `require.Eventually` runs the
function in a goroutine, which is not allowed.
* feat: Add ruleguard for require.Eventually
Co-authored-by: Cian Johnston <cian@coder.com>
Some contexts were moved closer to use so that test setup doesn't affect
timeout. And timeout was increased for some others to avoid flakyness
due to slow test runners.
* return parameters from Terraform provisioner in sorted order
* persist parameter indices in database and return them in correct order from API
* don't re-sort parameters by name when creating templates
* fix: Show schedule commands in help, improve template
* chore: Remove schedule long help, fixed by listing missing commands
* chore: Clean up annotation usage with template function
* fix: Drive-by fix for trailing whitespace for flags
Introduced in c7681370b5.
- make default template max TTL 24 hours (still less than 168)
- make default workspace autostop 2 hours unless specified otherwise
- add instance type selector to aws templates
* prompt for confirmation before deleting templates (#2830)
* populate templateNames from the interactive picker too
* allow skipping delete confirmation prompt with --yes flag
* eliminate unnecessary newline
* test both confirmation of delete and `--yes` with no confirmation
* fix failing test that needed --yes
* remove unnecessary empty line the linter disliked
* make the tests correct
Because the actual flags take quite a bit of space, wrapping at 80
characters creates a very cramped output for e.g. `coder server`, for
this reasons, flags are wrapped at 100 chars (vs. standard 80).
The `Consumes $ENV_FLAG` message was put on a newline for consistency,
this should allow users to learn where to look for the informations.
Side note: we should perhaps stop adding period (`.`) at the end of flag
descriptions to be consistent, for instance, command helps usually don't
have one.
This change fixes the biggest issue in #2363, but not all `--help`
output is guaranteed (yet) to wrap at 80-100 chars.
Fixes#2363
* fix CLI help text for logout
"log out" is verb, "logout" is a noun
* add CLI help for port-forward command (#2802)
* found another noun where a verb should be
- If the name is not specified the current working directory
name is used or the name specified by "--directory". This
reflects 'templates create" behavior.
* test: Use a template to prevent migrations from running for every test
* Create a single makefile target
* Fix built-in race
* Extend timeout of built-in PostgreSQL fetch