Skip to content
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

fix(cli): verify-reader CLI command #3660

Merged
merged 1 commit into from
Jan 9, 2025
Merged

fix(cli): verify-reader CLI command #3660

merged 1 commit into from
Jan 9, 2025

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Jan 8, 2025

All Submissions:

Changes proposed in this Pull Request:

Fixes the wp newspack verify-reader CLI command:

  • Example parameter values cannot contain spaces in the docblock synopsis
  • --user is a global flag and can't be used as an associative arg for specific commands

How to test the changes in this Pull Request:

  1. On trunk, run wp newspack verify-reader --user=<user ID or email address> and observe that it fails with an error:
Warning: The `wp newspack verify-reader` command has an invalid synopsis part: [--user=<user
Warning: The `wp newspack verify-reader` command has an invalid synopsis part: ID|email>]
Error: Please provide a user ID or email address.
  1. Check out this branch and test wp newspack verify-reader --user-id=<user ID or email address> with both a user ID and an email address and confirm that it works as expected. (Note the new flag name --user-id instead of --user)

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo added the [Status] Needs Review The issue or pull request needs to be reviewed label Jan 8, 2025
@dkoo dkoo self-assigned this Jan 8, 2025
@dkoo dkoo requested a review from a team as a code owner January 8, 2025 21:57
Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well.

Naming it user-id is not great because you can also pass the user email. I guess it's better than conflicting with a global argument, so I'm ok with it.

@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Jan 9, 2025
@dkoo
Copy link
Contributor Author

dkoo commented Jan 9, 2025

I had the same thought, but the way the command is written you could actually pass any flag and it will work...

@dkoo dkoo merged commit c639af7 into trunk Jan 9, 2025
9 checks passed
@dkoo dkoo deleted the fix/verify-cli-command branch January 9, 2025 16:19
Copy link

github-actions bot commented Jan 9, 2025

Hey @dkoo, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Jan 10, 2025
## [5.10.7-alpha.1](v5.10.6...v5.10.7-alpha.1) (2025-01-10)

### Bug Fixes

* **cli:** verify-reader CLI command ([#3660](#3660)) ([c639af7](c639af7))
* **recaptcha:** replace alerts with generic errors ([#3627](#3627)) ([44ef2d2](44ef2d2))

### Performance Improvements

* **data-events:** queue dispatches to execute on shutdown ([#3616](#3616)) ([510a1a0](510a1a0))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 5.10.7-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jan 14, 2025
# [5.12.0-alpha.1](v5.11.1...v5.12.0-alpha.1) (2025-01-14)

### Bug Fixes

* **cli:** verify-reader CLI command ([#3660](#3660)) ([c639af7](c639af7))
* **recaptcha:** replace alerts with generic errors ([#3627](#3627)) ([44ef2d2](44ef2d2))
* remove newspack_corrections_ids meta ([#3675](#3675)) ([dad258b](dad258b))

### Features

* **corrections:** add corrections and clarifications behind feature flag ([#3638](#3638)) ([ea745cf](ea745cf))

### Performance Improvements

* **data-events:** queue dispatches to execute on shutdown ([#3616](#3616)) ([510a1a0](510a1a0))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 5.12.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jan 20, 2025
# [5.12.0](v5.11.3...v5.12.0) (2025-01-20)

### Bug Fixes

* **cli:** verify-reader CLI command ([#3660](#3660)) ([c639af7](c639af7))
* **recaptcha:** replace alerts with generic errors ([#3627](#3627)) ([44ef2d2](44ef2d2))
* remove newspack_corrections_ids meta ([#3675](#3675)) ([dad258b](dad258b))
* **wcs:** migrate-expired-subscriptions handle manual subscriptions ([#3663](#3663)) ([e0f32e8](e0f32e8))

### Features

* **corrections:** add corrections and clarifications behind feature flag ([#3638](#3638)) ([ea745cf](ea745cf))

### Performance Improvements

* **data-events:** queue dispatches to execute on shutdown ([#3616](#3616)) ([510a1a0](510a1a0))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 5.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @alpha released [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants