✨ feat: Add -y flag to delete-user script for non-interactive use#12241
Open
leondape wants to merge 1 commit intodanny-avila:mainfrom
Open
✨ feat: Add -y flag to delete-user script for non-interactive use#12241leondape wants to merge 1 commit intodanny-avila:mainfrom
leondape wants to merge 1 commit intodanny-avila:mainfrom
Conversation
Adds support for `-y` flags to skip interactive confirmation prompts, enabling use in CI/CD pipelines and automation scripts. - First `-y`: skips the "Really delete user?" confirmation - Second `-y`: also skips the "Delete transaction history?" prompt (defaults to yes) - Without `-y`, the script behaves exactly as before (interactive prompts) Usage: `npm run delete-user -- -y -y user@example.com` Made-with: Cursor
Contributor
There was a problem hiding this comment.
Pull request overview
Adds non-interactive confirmation flags to the config/delete-user.js admin script to support safer automation while keeping the existing interactive prompts as the default behavior.
Changes:
- Parse CLI args to support
-yconfirmation flags (repeatable). - Skip the full-deletion confirmation prompt when
-yis provided. - Skip the transaction-deletion prompt (and delete transactions) when
-yis provided twice.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-yflag support toconfig/delete-user.jsto skip interactive confirmation prompts-yskips the "Really delete user?" confirmation-yalso skips the "Delete transaction history?" prompt (defaults to yes)-yflags, the script behaves exactly as before (interactive prompts)Why
The delete-user script currently requires interactive input, making it unusable in CI/CD pipelines or automation scripts. This change enables non-interactive execution while preserving the existing interactive behavior as the default.
Usage