Skip to content

Add Playground PR preview workflows#911

Draft
fellyph wants to merge 1 commit into
WordPress:masterfrom
fellyph:codex/playground-pr-preview
Draft

Add Playground PR preview workflows#911
fellyph wants to merge 1 commit into
WordPress:masterfrom
fellyph:codex/playground-pr-preview

Conversation

@fellyph

@fellyph fellyph commented Jun 16, 2026

Copy link
Copy Markdown

Summary

  • Add fork-safe WordPress Playground PR Preview workflows for Two Factor pull requests.
  • Build the plugin with the existing npm run build process, package dist/ as a slug-shaped two-factor.zip, and publish a Playground preview button after the read-only build workflow succeeds.
  • Use a custom Blueprint so the preview logs in and opens the Two Factor settings page.

Why

Two Factor needs generated preview files because the release build copies the QR code dependency from node_modules into dist/. The two-workflow setup keeps pull request code in a read-only build workflow, then lets the trusted workflow_run publish workflow expose the ZIP and update the PR description.

Testing

  • Parsed both workflow files as YAML.
  • Parsed the embedded Blueprint JSON.
  • Ran npm ci.
  • Ran the configured build/ZIP steps and verified build/two-factor.zip extracts to a single two-factor/ directory.
  • Ran npm run lint:js.
  • Ran npm run lint:css.
  • Ran composer validate --strict.
  • Ran composer lint-compat.
  • Ran composer lint-phpstan.

PHPUnit was not run locally because wp-env could not connect to Docker in this environment.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant