fix(cli): rename --skip-secret, --disable-security-scanner, --disable-release-bump to --no-* convention; fix docs gaps#40822
Conversation
H1: Rename --skip-secret to --no-secret in add-wizard (deprecated alias kept)
H2: Rename --disable-security-scanner to --no-security-scanner and
--disable-release-bump to --no-release-bump in add/deploy/update/trial
(deprecated aliases kept for backward compatibility)
H3: Fix audit --artifacts default in docs (usage -> all)
H4: Add logs --report-file flag to docs options
H5: Add outcomes history subcommand documentation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot keep skip as undocumented command variants |
…precation warning) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done — switched all legacy flag aliases ( |
There was a problem hiding this comment.
Pull request overview
This pull request standardizes several CLI boolean “suppress” flags onto the --no-* convention while preserving backward-compatible hidden aliases, and closes a few documentation gaps around audit, logs, and outcomes.
Changes:
- Renamed
--skip-secret→--no-secret(add-wizard), and--disable-security-scanner/--disable-release-bump→--no-security-scanner/--no-release-bump(with hidden legacy aliases preserved). - Updated CLI tests to assert the new canonical flag names (and in one case, that the legacy alias remains registered).
- Fixed/expanded docs: corrected
audit --artifactsdefault, addedlogs --report-file, and documentedoutcomes history.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/update_integration_test.go | Updates help-text expectations to the new canonical flag name. |
| pkg/cli/update_command.go | Adds --no-release-bump / --no-security-scanner flags and keeps hidden legacy aliases wired through. |
| pkg/cli/update_command_test.go | Updates the flag registration test to validate --no-security-scanner and legacy alias presence. |
| pkg/cli/trial_command.go | Renames the security-scanner suppress flag to --no-security-scanner with hidden legacy alias support. |
| pkg/cli/deploy_command.go | Renames the security-scanner suppress flag to --no-security-scanner with hidden legacy alias support. |
| pkg/cli/deploy_command_test.go | Updates expected deploy flags to include the new canonical flag name. |
| pkg/cli/add_wizard_tuistory_integration_test.go | Updates add-wizard integration invocation to use --no-secret. |
| pkg/cli/add_wizard_command.go | Introduces --no-secret and preserves --skip-secret as a hidden alias. |
| pkg/cli/add_interactive_engine.go | Updates user-facing messaging/commentary to reference the new --no-secret flag. |
| pkg/cli/add_command.go | Introduces --no-security-scanner and preserves --disable-security-scanner as a hidden alias. |
| docs/src/content/docs/setup/cli.md | Aligns docs with new canonical flags; fixes audit --artifacts default; adds logs --report-file; documents outcomes history. |
| docs/src/content/docs/guides/reusing-workflows.mdx | Updates --skip-secret references to --no-secret. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 12/12 changed files
- Comments generated: 3
|
|
||
| flag := cmd.Flags().Lookup("disable-security-scanner") | ||
| require.NotNil(t, flag, "update command should register --disable-security-scanner") | ||
| flag := cmd.Flags().Lookup("no-security-scanner") |
| opt := constants.GetEngineOption(engine) | ||
| if opt != nil { | ||
| fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skipping %s secret setup (--skip-secret flag set).", opt.SecretName))) | ||
| fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skipping %s secret setup (--no-secret flag set).", opt.SecretName))) |
| fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("Skipping %s secret setup (--no-secret flag set).", opt.SecretName))) | ||
| } else { | ||
| fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Skipping secret setup (--skip-secret flag set).")) | ||
| fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Skipping secret setup (--no-secret flag set).")) |
CLI inspection identified 5 high-severity consistency issues:
--skip-secretwas the sole outlier among 12 boolean-suppress flags,--disable-security-scannerand--disable-release-bumpviolated the--no-*convention, and the docs had a wrong default foraudit --artifacts, a missinglogs --report-fileflag, and an entirely undocumentedoutcomes historysubcommand.Flag renames (undocumented aliases preserved)
--skip-secret→--no-secret(add-wizard)--disable-security-scanner→--no-security-scanner(add,deploy,update,trial)--disable-release-bump→--no-release-bump(update)Each old flag is kept as a hidden undocumented alias (cobra
MarkHidden) so existing scripts continue to work silently without any deprecation warning.Docs fixes
audit --artifacts: corrected default from`usage`→`all`(was copy-pasted fromlogs)logs: added missing--report-fileto options listoutcomes: addedoutcomes historysubsection with description, examples, and flag list (--limit,--source,--json/-j,--repo/-r)Tests
Updated
update_command_test.go,update_integration_test.go, anddeploy_command_test.goto assert on the new canonical flag names; added assertion that the undocumented alias is still registered.