Automattic / vip-cli

The VIP-CLI
https://docs.wpvip.com/vip-cli/
MIT License
59 stars 16 forks source link

BB8-11630: Add confirmation for production env vars setting/deleting #1985

Closed rebeccahum closed 3 months ago

rebeccahum commented 3 months ago

Description

Adds a confirmation prompt when setting or deleting an env vars on production environments:

╰─$ vip @5190.production config envvar set EXAMPLE_ENV_VAR                                                                                                                            130 ↵
? Are you sure you want to set the environment variable EXAMPLE_ENV_VAR on PRODUCTION for site rebecca-testing-2? (y/N) › false
╰─$ vip @5190.production config envvar delete EXAMPLE_ENV_VAR
? Are you sure you want to delete the environment variable EXAMPLE_ENV_VAR on PRODUCTION for site rebecca-testing-2? (y/N) › false

Pull request checklist

New release checklist

Steps to Test

Outline the steps to test and verify the PR here.

Example:

  1. Check out PR.
  2. Run npm run build
  3. Run vip @5190.production config envvar set EXAMPLE_ENV_VAR and expect confirmation prompt
  4. Run the previous step now with --skip-confirmation and expect no confirmation prompt
github-actions[bot] commented 3 months ago

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

sonarcloud[bot] commented 3 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
94.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud