Skip to content

Rps 10094 show account and project information#103

Merged
az-smartling merged 4 commits into
masterfrom
RPS-10094_Show_account_and_project_information
May 19, 2026
Merged

Rps 10094 show account and project information#103
az-smartling merged 4 commits into
masterfrom
RPS-10094_Show_account_and_project_information

Conversation

@az-smartling
Copy link
Copy Markdown
Contributor

Adds a global --show-config flag that prints the resolved account, project, user, and config-file path to stdout before any command runs, and prompts Continue? [y/N] on an interactive terminal so operators can confirm they're targeting the right project.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a --show-config flag to the Smartling CLI, which displays the resolved configuration (User, Account, Project, and Config File) and its source origins (env, flag, or file) before a command runs. In interactive terminals, it also prompts the user for confirmation. The projects info command was refactored to utilize this new shared logic. Review feedback highlights that the current implementation of PersistentPreRunE in subcommands like jobs and mt overrides the root command's initialization, potentially skipping logger setup and state variable assignment. Additionally, it is recommended to redirect the configuration banner to stderr to avoid polluting stdout and to make the API-based project detail fetching optional for commands that do not target a specific project.

Comment thread cmd/jobs/cmd_jobs.go
Comment thread cmd/mt/cmd_mt.go
Comment thread cmd/config_banner.go
Comment thread cmd/config_banner.go
@az-smartling az-smartling requested review from dimitrystd and junky May 18, 2026 12:00
@az-smartling az-smartling merged commit 478208c into master May 19, 2026
@az-smartling az-smartling deleted the RPS-10094_Show_account_and_project_information branch May 19, 2026 10:16
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.

2 participants