-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-post a Playground preview link on every PR #60795
Comments
I think this duplicates #60433. I love the idea, but at the same time there are a lot of bot comments on PRs right now which creates a lot of notification noise, and it'd be great if they could be consolidated. Perhaps some of these workflows can be combined into a single comment where only portions of the comment are updated. |
Aha! Or it could update the PR description and add the button/link at the bottom to save some vertical space :) |
I was thinking that you may not even need a bot if there were a way to include the PR number as a templated part of the pull request template - (granted that the PR may not always be ready to preview, but maybe that would be an acceptable trade-off) Unfortunately I don't think it's possible having had a quick look through the docs - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates. |
Ooh that would have saved so much effort, too bad GitHub doesn't support that indeed! |
@vcanales created a reusable GitHub action here: https://github.com/vcanales/action-wp-playground-pr-preview/ 🎉 I'm filing a few issues to make it configurable enough to reuse everywhere. |
Because I did a similar workflow for the GatherPress plugin, @paaljoachim motivated me on slack to do the same for Gutenberg. And I’m willing to do so. The action by @vcanales, mentioned by @adamziel, seems to be relevant and easy for a theme, but not a plugin. Anything I need to know? I’m starting working on this now. |
I opened a PR, which was kinda fun as it got much smaller than expected, because Gutenberg has so many of the necessary parts already on board. I didn't need to worry about a suitable So the only thing missing was a script that comments an updated link to a Playground. And that is what I did in #64947 . Please have a look, everybody and add your appreciated feedback. |
Similarly to wordpress-develop, the Gutenberg repo could have a preview link automatically posted at every PR.
See: How to add Pull Request previews to your repository?
Here's a GitHub action from another repo for inspiration:
https://github.com/adamziel/blueprints/blob/778ba6fad9e07cec6fa3d0803cbf589bdd5ea8b1/.github/workflows/preview-comment.yml
The Gutenberg PR previewer lives at https://playground.wordpress.net/gutenberg.html
Also, @dmsnell had this great idea:
Implementing Dennis's idea would also require adjusting gutenberg.html
CC @ockham @jsnajdr @ellatrix – anyone interested in adding this integration?
The text was updated successfully, but these errors were encountered: