-
Notifications
You must be signed in to change notification settings - Fork 81
CLI: Add command to add follower for testing #1938
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
Conversation
I see this in the same category as #1075 We should not add test/debug/dev cli commands, because this could confuse users. |
Introduces the `add_follower` WP-CLI command to add a follower to a user's followers list for testing purposes. The command accepts an actor URL and an optional user argument, defaulting to the blog actor if not specified.
Co-authored-by: Copilot <[email protected]>
800bbab
to
48cc294
Compare
Refactors the WP-CLI command implementation by moving development and testing commands (such as add_follower and generate comments) from includes/class-cli.php to a new development/class-cli.php. Updates development/load.php to register the new CLI command class for development environments, and removes the add_follower method from the main CLI class. This separation improves maintainability and organization of development tooling.
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.
Pull Request Overview
This PR introduces WP-CLI development commands for testing ActivityPub functionality, specifically adding the ability to manually add followers to users for testing purposes. The changes create a separate development CLI namespace to distinguish testing commands from production ones.
- Adds a new
add_follower
WP-CLI command for testing follower functionality - Creates a development-specific CLI command structure separate from production commands
- Includes additional development tooling for generating test comments and reactions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
includes/class-cli.php | Adds necessary imports for Actors and Followers collections |
development/load.php | Registers development CLI commands and autoloader for development namespace |
development/class-cli.php | New file implementing development CLI commands including add_follower and generate commands |
activitypub.php | Minor cleanup removing unused WP_CLI import and fixing namespace reference |
Co-authored-by: Copilot <[email protected]>
Oh nice, you also brought over my comment generator 😍 |
How do I best test this PR? When running ![]() |
Ah, I should have added that to the testing steps. I use |
yes, docker was running. you can see the error message above. something because of security concerns. ...but it works with the command you provided! 👍 |
Proposed changes:
add_follower
WP-CLI command to add a follower to a user's followers list for testing purposes. The command accepts an actor URL and an optional user argument, defaulting to the blog actor if not specified.