Skip to content

Playground preview: re-run on label changes, fetch labels via gh CLI - #732

Open
jdevalk wants to merge 9 commits into
developfrom
jdv/smarter-playground
Open

Playground preview: re-run on label changes, fetch labels via gh CLI#732
jdevalk wants to merge 9 commits into
developfrom
jdv/smarter-playground

Conversation

@jdevalk

@jdevalk jdevalk commented Dec 19, 2025

Copy link
Copy Markdown
Member

Improves the Playground preview workflow:

  • Re-run preview when labels are added/removed (not just on commits).
  • Work around github.event.pull_request.labels being empty on opened/synchronize/reopened events by fetching labels via the gh CLI.
  • Switch to WP Playground (from prior preview backend) with extra debug output.

@github-actions

github-actions Bot commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Test on Playground
Test this pull request on the Playground
or download the zip

@github-actions

github-actions Bot commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

✅ Code Coverage Report

Metric Value
Total Coverage 31.76% 📉
Base Coverage 31.76%
Difference 📈 0.00%

⚠️ Coverage below recommended 40% threshold

🎉 Great job maintaining/improving code coverage!

ℹ️ About this report
  • All tests run in a single job with Xdebug coverage
  • Security tests excluded from coverage to prevent output issues
  • Coverage calculated from line coverage percentages

@jdevalk jdevalk changed the title Try it Playground preview: re-run on label changes, fetch labels via gh CLI May 24, 2026
@jdevalk
jdevalk requested review from aristath and ilicfilip May 29, 2026 06:41
The success-path console.log debug statements wrote to stdout, which
BLUEPRINT=$(node ...) captured along with the actual blueprint JSON.
The resulting base64 payload decoded to "PR Labels: []\nPlugin slugs:
[]\n{...}" — invalid JSON that playground.wordpress.net could not parse,
breaking the preview link. Switch the three debug logs to console.error
so only the blueprint JSON lands on stdout.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ilicfilip

Copy link
Copy Markdown
Collaborator

There was an error in the Playground link, JSON was malformed:

to fix other issues (now failed workflows), we should first merge #764 and then update this branch and see what is left

@github-actions

Copy link
Copy Markdown
Contributor

🔍 WordPress Plugin Check Report

⚠️ Status: Passed with warnings

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
10 0 10

⚠️ Warnings (10)

📁 classes/suggested-tasks/providers/class-content-review.php (4 warnings)
📍 Line 🔖 Check 💬 Message
232 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
377 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
381 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
388 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
📁 classes/suggested-tasks/data-collector/class-unpublished-content.php (1 warning)
📍 Line 🔖 Check 💬 Message
103 WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information.
📁 classes/suggested-tasks/data-collector/class-yoast-orphaned-content.php (1 warning)
📍 Line 🔖 Check 💬 Message
111 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $query used in $wpdb->get_row()\n$query assigned unsafely at line 98.
📁 classes/suggested-tasks/data-collector/class-terms-without-description.php (1 warning)
📍 Line 🔖 Check 💬 Message
108 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 106.
📁 classes/suggested-tasks/data-collector/class-terms-without-posts.php (1 warning)
📍 Line 🔖 Check 💬 Message
120 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 118.
📁 classes/activities/class-query.php (2 warnings)
📍 Line 🔖 Check 💬 Message
71 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $table_name used in $wpdb->query()\n$table_name assigned unsafely at line 58.
163 PluginCheck.Security.DirectDB.UnescapedDBParameter Unescaped parameter $where_args used in $wpdb->get_results()\n$where_args assigned unsafely at line 153.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants