[Website] Support previewing WordPress and Gutenberg branches, not just PRs #2868
+160
−107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for the change, related issues
Adds support for previewing branches, not just PRs in the Import PR modal:
@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
?core-branchand?gutenberg-branchQuery API params to indicate which branch to preview.?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: