-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add optional capture group to url regex in wp-env #43200
Add optional capture group to url regex in wp-env #43200
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @titusdmoore! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Overall, this looks good to me. Could you update the tests here? gutenberg/packages/env/lib/config/test/config.js Lines 522 to 581 in 6dcf85a
I would just add another entry to that array which includes some query params, and then include that entry in the |
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.
Looks good to me, thank you!
Congratulations on your first merged pull request, @titusdmoore! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
Add optional capture group to url regex in wp-env's .zip source logic to download .zip's from URLs with query parameters. Co-authored-by: Titus Moore <[email protected]>
What?
Resolve issue where urls with query parameters won't work in wp-env using
wp-env.json
to include plugins or themes.Why?
This can cause issues where adding plugins from third party developers can cause issues if they don't have their plugin added to the WordPress marketplace. My experience has been with Gravity Forms. Solves issue #43199
How?
Change the regex string that validates urls to include an optional capture group post
.zip
that will pass if the string has query parameters.Testing Instructions
wp-env.json
file with plugins attribute with url values that match old pattern[url]/zip-name.zip
and new pattern[url]/zip-name.zip?authAttr={attrValue}
wp-env start
Screenshots or screencast