-
Notifications
You must be signed in to change notification settings - Fork 2
Reorder command arguments in Pressable_Site_WP_CLI_Command_Run class #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -61,8 +61,8 @@ protected function configure(): void { | |||||||||
| $this->setDescription( 'Runs a given WP-CLI command on a given Pressable site.' ) | ||||||||||
| ->setHelp( 'This command allows you to run an arbitrary WP-CLI command on a Pressable site.' ); | ||||||||||
|
|
||||||||||
| $this->addArgument( 'wp-cli-command', InputArgument::REQUIRED, 'The WP-CLI command to run.' ) | ||||||||||
| ->addArgument( 'site', InputArgument::OPTIONAL, 'The domain or numeric Pressable ID of the site to open the shell to.' ); | ||||||||||
| $this->addArgument( 'site', InputArgument::REQUIRED, 'The domain or numeric Pressable ID of the site to open the shell to.' ) | ||||||||||
| ->addArgument( 'wp-cli-command', InputArgument::REQUIRED, 'The WP-CLI command to run.' ); | ||||||||||
|
|
||||||||||
| $this->addOption( 'multiple', null, InputOption::VALUE_REQUIRED, 'Determines whether the `site` argument is optional or not. Accepted values are `all` or a comma-separated list of site IDs or domains.' ) | ||||||||||
| ->addOption( 'skip-output', null, InputOption::VALUE_NONE, 'Skip outputting the response to the console.' ); | ||||||||||
|
Comment on lines
67
to
68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Update --multiple help text to reflect new semantics It still says it “Determines whether the Apply: - $this->addOption( 'multiple', null, InputOption::VALUE_REQUIRED, 'Determines whether the `site` argument is optional or not. Accepted values are `all` or a comma-separated list of site IDs or domains.' )
+ $this->addOption( 'multiple', null, InputOption::VALUE_REQUIRED, 'Run on multiple sites: `all` or a comma-separated list of site IDs/domains. When set, the single `site` argument is ignored.' )📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Argument reorder + site now REQUIRED — LGTM
Matches the PR objective and fixes the misrouting bug. This is a breaking CLI change; ensure docs/usages are updated.
Run to find and update usages/examples:
🏁 Script executed:
Length of output: 531
Update documentation and examples to reflect new argument order
Search for any external docs or example scripts referencing
pressable:run-site-wp-cli-commandorwpcom:run-site-wp-cli-command—internal code search only found the command definitions in commands/Pressable_Site_WP_CLI_Command_Run.php and commands/WPCOM_Site_WP_CLI_Command_Run.php. Ensure all user-facing documentation (READMEs, docs/cli guides, sample scripts) are updated so thesiteargument comes first.🤖 Prompt for AI Agents