Clarify asset repair commands#182
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reorganizes Craft Cloud CLI asset “repair” operations so they live under cloud/assets/repair/*, while keeping cloud/assets/replace-metadata as a deprecated alias for the metadata repair behavior.
Changes:
- Added a dedicated CLI controller for
cloud/assets/repair/*subcommands (missing,metadata) with action whitelisting. - Introduced
cloud/assets/repairas the default “missing data” repair entrypoint and refactored metadata repair into a shared helper method. - Added unit tests asserting available/unsupported CLI actions and Yii route resolution behavior for the new command structure.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/unit/AssetsControllerTest.php | Adds tests for new CLI controller/actions and routing expectations for cloud/assets/repair/* and deprecated aliases. |
| src/cli/controllers/AssetsController.php | Adds actionRepair(), refactors metadata repair into a helper, and keeps replace-metadata as a deprecated alias. |
| src/cli/controllers/assets/RepairController.php | Adds a new sub-controller to expose only missing and metadata repair actions under cloud/assets/repair/*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5105e3b68
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Compared with the latest tag (
3.6.0), this keeps the only released asset metadata repair command (cloud/assets/replace-metadata) working as a deprecated alias while grouping the new repair commands undercloud/assets/repair/*.