Skip to content

Conversation

@adamziel
Copy link
Collaborator

@adamziel adamziel commented Nov 5, 2025

Motivation for the change, related issues

Adds support for previewing branches, not just PRs in the Import PR modal:

CleanShot 2025-11-05 at 15 13 58@2x

@SirLouen asked how to preview the latest trunk trunk, not a PR, and I didn't have a good answer. This change makes it easy.

Implementation details

  • Website: adds ?core-branch and ?gutenberg-branch Query API params to indicate which branch to preview.
  • Plugin proxy: Adds a ?branch= query API param that's an alternative to ?pr=.

There's no artifact validation when previewing a branch. If the build for the most recent commit is not ready yet, the next available build is used.

Testing Instructions (or ideally a Blueprint)

Try these locally and confirm they do the right thing. You can see the WordPress version number at the bottom of wp-admin and also use the file browser to confirm the files changed in specific PRs are present in the filesystem:

@adamziel adamziel marked this pull request as ready for review November 12, 2025 14:44
@adamziel
Copy link
Collaborator Author

@copilot Let's update the Query API documentation to list these new parameters

Copy link
Contributor

Copilot AI commented Nov 12, 2025

@adamziel I've opened a new pull request, #2885, to work on those changes. Once the pull request is ready, I'll request review from you.

The feature PR added `?core-branch` and `?gutenberg-branch` query
parameters to preview branches (not just PRs), but the Query API
documentation wasn't updated.

## Changes

- Added `core-branch` parameter documentation - accepts branch names
like `trunk` to preview WordPress core branches
- Added `gutenberg-branch` parameter documentation - accepts branch
names like `trunk` to preview Gutenberg branches

Both parameters are positioned directly after their corresponding PR
parameters (`core-pr` and `gutenberg-pr`) in the documentation table for
logical grouping.

## Example Usage

```
https://playground.wordpress.net/?core-branch=trunk
https://playground.wordpress.net/?gutenberg-branch=trunk
```

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: adamziel <205419+adamziel@users.noreply.github.com>
@adamziel adamziel merged commit 517a4a8 into trunk Nov 12, 2025
28 checks passed
@adamziel adamziel deleted the support-gutenberg-and-wp-branches branch November 12, 2025 15:36
@SirLouen
Copy link
Member

SirLouen commented Nov 14, 2025

@adamziel I'm still trying to get the hang of how this works, and I'm not into how things are done here

But basically I spun the image, but if I open

http://127.0.0.1:5400/website-server/?core-branch=trunk

I can only see a 6.8.3 installation, not a 7.0-alpha.

When I run http://127.0.0.1:5400/website-server/?gutenberg-branch=trunk
On the other hand, I can see a 6.8.3 installation, but with Gutenberg latest (now 22.1.0-rc1)

For the PR, they are working as expected.

Also wondering if combinations would be possible like (gutenberg-branch=trunk&core-branch=trunk).

Since the core-branch is not working for me, I have not tested further

Envs:

  • Windows 11 with WSL2 (Ubuntu 24)
  • node v20.19.5

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants