Skip to content

Auto-resolve orgID from .chunk/config.json in sidecar commands#345

Closed
hanabel1 wants to merge 1 commit into
mainfrom
hm/auto-resolve-org-id-from-config
Closed

Auto-resolve orgID from .chunk/config.json in sidecar commands#345
hanabel1 wants to merge 1 commit into
mainfrom
hm/auto-resolve-org-id-from-config

Conversation

@hanabel1
Copy link
Copy Markdown
Contributor

@hanabel1 hanabel1 commented May 19, 2026

  • resolveOrgID now reads the project configs orgID field between the --org-id flag, CIRCLECI_ORG_ID env var, and the tui org picker. This removes the 'Could not select an organization prompt on chunk sidecar list/create/setup in non-tty sessions when the project has already run chunk config set orgID <id> - plumbs the working directory through sidecarSetupResolvesSidecar so chunk sidecar setup --dir <dir> honors the project config it just detected.
  • expanded the picker's failure suggestion too point at all three escape places (--org-id, CIRCLECI_ORG_ID, chunk config set orgID.

resolveOrgID now reads the project config's orgID field after the
--org-id flag and CIRCLECI_ORG_ID env var, before falling through to
the TUI org picker. This removes the "Could not select an organization"
prompt on chunk sidecar list / create / setup in non-TTY sessions when
the project has already run `chunk config set orgID <id>`.

Plumbs the directory through sidecarSetupResolveSidecar so
chunk sidecar setup --dir <dir> honors the project config it just
detected. Drops the duplicated lookup that lived in
resolveOrCreateSidecarID — resolveOrgID handles it now.

Expanded the picker's failure suggestion to mention all three escape
hatches (--org-id, env, config) so non-interactive sessions get
actionable guidance instead of "Pass --org-id instead."

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hanabel1 hanabel1 force-pushed the hm/auto-resolve-org-id-from-config branch from 9253fe4 to d0f86ab Compare May 19, 2026 23:20
@hanabel1 hanabel1 closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant