Skip to content

chore: remove org context switcher in the cli #13674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jul 1, 2024
Merged

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jun 26, 2024

What this does

Removes the cli organization switcher. All commands that require an organization context default to an organization if the user is only in 1 org. Multi org users require setting CODER_ORGANIZATION=<org> or --org=<organization> (-O=<organization> shorthand)

Future Work

Ideally we could remove the organization context required from many of the template related commands if the template name is unambiguous. At present, the organization ID is required for the fetching template API.

  • Remove from templates list command
  • Add organization columns to relevant resources for cli listing

@Emyrk Emyrk force-pushed the stevenmasley/unified_org_cli branch from d0e9124 to 2917474 Compare June 26, 2024 18:01
@Emyrk Emyrk marked this pull request as ready for review June 26, 2024 21:25
@Emyrk Emyrk requested review from aslilac June 28, 2024 15:01
cli/root.go Outdated
// Otherwise, we can assume a default value.
Required: false,
Flag: "org",
FlagShorthand: "z",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-z is a really weird choice here imo. I know -o is used, but what about -O? just doesn't feel like there is very clear connection.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking organiZation lol. I can switch to -O

Copy link
Member

@aslilac aslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you 😄

@Emyrk Emyrk merged commit 5bf46f3 into main Jul 1, 2024
29 checks passed
@Emyrk Emyrk deleted the stevenmasley/unified_org_cli branch July 1, 2024 21:04
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants