-
Notifications
You must be signed in to change notification settings - Fork 359
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 automated JSON schema validation #8039
Conversation
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.
Thanks @ajlende for the changes. It is amazing 🥇
I dropped few comments inline.
0c21163
to
69ac8fe
Compare
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.
Excellent work! 🙇
The new table format looks neat and is very helpful to quickly fix the changes.
Changes looks good to me. 🚀
@vcanales Bot posted preview links even though there are no relevant changes for these themes. (or may be one of the commit had those changes). Edit: Hmm, I did a quick test of the script, and it seems to be removing links based on the latest push. Created an issue here: WordPress/action-wp-playground-pr-preview#19 |
Changes proposed in this Pull Request:
Adds an npm script and GitHub action for validating JSON for themes.
$schema
version doesn't match the minimum WP version.Validation script
I may have had a bit too much fun with building the tables and adding colors, so the code exploded a bit. 😅
But I think the new result is really nice. ✨
And it works with pagers.
Or without if you only have a theme or two to validate.
And the added
--format=json
option is also super helpful when combined withjq
to drill down into the data.For example, this is the breakdown of all the current themes and a count of the types of problems that they have:
GitHub Action
The GitHub action only runs on the modified themes.
It can be tested by committing some modifications to a theme and running like this:
Related issue(s):