diff --git a/docs/org.md b/docs/org.md index d825b370d..6d07318ac 100644 --- a/docs/org.md +++ b/docs/org.md @@ -2,34 +2,3 @@ ========= Switch organizations. - -* [`dvc org`](#dvc-org) - -## `dvc org` - -Select which organization to access through the API - -``` -USAGE - $ dvc org [--config-path ] [--auth-path ] [--repo-config-path ] [--client-id - ] [--client-secret ] [--project ] [--no-api] [--headless] [--org ] - -FLAGS - --org= The `name` of the org to sign in as (not the `display_name`) - -GLOBAL FLAGS - --auth-path= Override the default location to look for an auth.yml file - --client-id= Client ID to use for DevCycle API Authorization - --client-secret= Client Secret to use for DevCycle API Authorization - --config-path= Override the default location to look for the user.yml file - --headless Disable all interactive flows and format output for easy parsing. - --no-api Disable API-based enhancements for commands where authorization is optional. Suppresses - warnings about missing credentials. - --project= Project key to use for the DevCycle API requests - --repo-config-path= Override the default location to look for the repo config.yml file - -DESCRIPTION - Select which organization to access through the API -``` - -_See code: [dist/commands/org/index.ts](https://github.com/DevCycleHQ/cli/blob/v4.7.1/dist/commands/org/index.ts)_ diff --git a/docs/organizations.md b/docs/organizations.md index 4237a906d..a2811ccb3 100644 --- a/docs/organizations.md +++ b/docs/organizations.md @@ -4,6 +4,7 @@ List the keys of all organizations available to the current user * [`dvc organizations list`](#dvc-organizations-list) +* [`dvc organizations select`](#dvc-organizations-select) ## `dvc organizations list` @@ -28,3 +29,30 @@ GLOBAL FLAGS DESCRIPTION List the keys of all organizations available to the current user ``` + +## `dvc organizations select` + +Select which organization to access through the API + +``` +USAGE + $ dvc organizations select [--config-path ] [--auth-path ] [--repo-config-path ] [--client-id + ] [--client-secret ] [--project ] [--no-api] [--headless] [--org ] + +FLAGS + --org= The `name` of the org to sign in as (not the `display_name`) + +GLOBAL FLAGS + --auth-path= Override the default location to look for an auth.yml file + --client-id= Client ID to use for DevCycle API Authorization + --client-secret= Client Secret to use for DevCycle API Authorization + --config-path= Override the default location to look for the user.yml file + --headless Disable all interactive flows and format output for easy parsing. + --no-api Disable API-based enhancements for commands where authorization is optional. Suppresses + warnings about missing credentials. + --project= Project key to use for the DevCycle API requests + --repo-config-path= Override the default location to look for the repo config.yml file + +DESCRIPTION + Select which organization to access through the API +``` diff --git a/oclif.manifest.json b/oclif.manifest.json index 608ae5033..615077ea4 100644 --- a/oclif.manifest.json +++ b/oclif.manifest.json @@ -2259,9 +2259,9 @@ }, "args": {} }, - "org": { - "id": "org", - "description": "Select which organization to access through the API", + "organizations:list": { + "id": "organizations:list", + "description": "List the keys of all organizations available to the current user", "strict": true, "pluginName": "@devcycle/cli", "pluginAlias": "@devcycle/cli", @@ -2340,19 +2340,13 @@ "cli", "vs_code_extension" ] - }, - "org": { - "name": "org", - "type": "option", - "description": "The `name` of the org to sign in as (not the `display_name`)", - "multiple": false } }, "args": {} }, - "organizations:list": { - "id": "organizations:list", - "description": "List the keys of all organizations available to the current user", + "organizations:select": { + "id": "organizations:select", + "description": "Select which organization to access through the API", "strict": true, "pluginName": "@devcycle/cli", "pluginAlias": "@devcycle/cli", @@ -2431,6 +2425,12 @@ "cli", "vs_code_extension" ] + }, + "org": { + "name": "org", + "type": "option", + "description": "The `name` of the org to sign in as (not the `display_name`)", + "multiple": false } }, "args": {} diff --git a/src/commands/org/index.ts b/src/commands/organizations/select.ts similarity index 99% rename from src/commands/org/index.ts rename to src/commands/organizations/select.ts index b5ed367f4..12d9f24ea 100644 --- a/src/commands/org/index.ts +++ b/src/commands/organizations/select.ts @@ -1,4 +1,5 @@ import AuthCommand from '../authCommand' + export default class SelectOrganization extends AuthCommand { static description = 'Select which organization to access through the API' static hidden = false