Skip to content

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

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

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

Conversation

@jdevalk
Copy link
Copy Markdown
Member

@jdevalk jdevalk commented Dec 19, 2025

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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 19, 2025

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 19, 2025

✅ Code Coverage Report

Metric Value
Total Coverage 31.41% 📉
Base Coverage 31.41%
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

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