Skip to content
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

Open
adamziel opened this issue Apr 16, 2024 · 4 comments
Open

Auto-post a Playground preview link on every PR #60795

adamziel opened this issue Apr 16, 2024 · 4 comments
Labels
Developer Experience Ideas about improving block and theme developer experience [Type] Enhancement A suggestion for improvement.

Comments

@adamziel
Copy link
Contributor

adamziel commented Apr 16, 2024

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:

💡 if a Gutenberg PR contains Depends on WordPress/wordpress-develop#5379 then the Playground comment includes a link drawing in both the Gutenberg and Core PRs

Implementing Dennis's idea would also require adjusting gutenberg.html

CC @ockham @jsnajdr @ellatrix – anyone interested in adding this integration?

@adamziel adamziel added [Type] Enhancement A suggestion for improvement. Developer Experience Ideas about improving block and theme developer experience labels Apr 16, 2024
@adamziel adamziel changed the title Auto-post a preview link on every PR Auto-post a Playground preview link on every PR Apr 16, 2024
@talldan
Copy link
Contributor

talldan commented Apr 17, 2024

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.

@adamziel
Copy link
Contributor Author

Aha! Or it could update the PR description and add the button/link at the bottom to save some vertical space :)

@talldan
Copy link
Contributor

talldan commented Apr 18, 2024

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 -
https://github.com/WordPress/gutenberg/blob/trunk/.github/PULL_REQUEST_TEMPLATE.md.

(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.

@adamziel
Copy link
Contributor Author

Ooh that would have saved so much effort, too bad GitHub doesn't support that indeed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience Ideas about improving block and theme developer experience [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants