feat(cli): add --no-tips flag to disable tip hints - #1414
feat(cli): add --no-tips flag to disable tip hints#1414jared-outpost[bot] wants to merge 2 commits into
Conversation
Adds a global `--no-tips` flag and `SENTRY_DISABLE_TIPS` environment variable to suppress the "Tip: ..." footer hints printed by commands like `sentry issue view`. The cache-age footer is unaffected. Fixes #1412
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
fix-ci: attempt 1 — the new |
The new global --no-tips flag added --tips/--no-tips to the top-level flag allow-list; update the exact-match assertion in global-flags.test.ts accordingly.
|
come ON jared, I TOLD YOU. |
|
ack, the defaults subcommand route makes sense for a persistent toggle. the flag+env approach was for immediate off-switch without extra setup. happy to pivot the impl to (and wire the same suppression logic) if you want that instead — just say the word. |
|
ack, the defaults subcommand route makes sense for a persistent toggle. the flag+env approach was for immediate off-switch without extra setup. happy to pivot the impl to |
Closes #1412
What
Adds a way to disable the
Tip: ...footer hints that commands likesentry issue viewprint below their output.--no-tipsflag (accepted by every command, hidden from per-command--helplike other global flags).SENTRY_DISABLE_TIPSenvironment variable for turning tips off globally. Uses the same truthy-env semantics asSENTRY_PLAIN_OUTPUT(0/false/""are falsy). An explicit--no-tipsalways wins.cached · 3m ago · use -f to refresh) is a staleness indicator, not a tip, so it is left untouched.Implementation
packages/cli/src/lib/tips.ts—tipsSuppressed(tipsFlag)decides suppression from the flag + env var.packages/cli/src/lib/global-flags.ts— registerstipsas a global boolean flag so Stricli recognizes the--no-tipsnegation token at any argv position.packages/cli/src/lib/command.ts— hiddenTIPS_FLAG(default true) injected into every command;buildCommanddrops the command'shintwhen suppressed before appending the cache footer.packages/cli/script/generate-command-docs.ts— excludestipsfrom per-command flag tables (documented at CLI level).apps/cli-docs/src/fragments/configuration.md— documents--no-tipsandSENTRY_DISABLE_TIPS.Testing
packages/cli/test/lib/tips.test.ts— covers flag/env precedence.vitest run test/lib/tips.test.ts test/lib/command.test.ts test/lib/cache-hint.test.ts— pass.tsc --noEmit— clean.