-
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
GitHub Actions: Add task to comment on PRs with gutenberg.run link. #30149
Conversation
6f5d82d
to
edff18f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's changed or I'm imagining things, but I seem to recall the artifact build would only occur on pull requests with code changes? It looks like it's running on all pull requests now, so I'd guess it's not a problem to always comment on every pull request.
Since the build could take longer to finish and trying to load a gutenberg.run site before the build is complete would result in an error, it'd be nice if there was an easy way to wait to drop the comment until after the build is complete. Thinking if the automation is super fast enough to leave the comment that it appears right after the author submits the pull request, they might be led to click it immediately.
Alternatively, we can work to make gutenberg.run more durable to the "not yet ready" cases 😅
packages/project-management-automation/lib/tasks/pr-preview-link/test/index.js
Outdated
Show resolved
Hide resolved
Gutenberg.run automatically creates functioning WordPress sites that run the version of Gutenberg from a PR's branch. The sites are accessible to anybody, making testing much easier for many people.
Co-authored-by: Andrew Duthie <andrew@andrewduthie.com>
d47376f
to
11b1857
Compare
🤔 , I thought it was running after that task, but may have overlooked that, or made some changes to my fork that messed it up. I'll look into it. |
You're right, it does run before the build, which is bad. It seems like it should be possible to make it depend on the build workflow. I'm working on that, but testing is difficult. |
We're in more of a WordPress Playground world at this point so closing out this PR in favor of efforts to add playground preview links: #60795 |
Description
This adds a new workflow that will create a comment on new PRs, with a link to a gutenberg.run preview site.
Gutenberg.run automatically creates functioning WordPress sites that run the version of Gutenberg from a PR's branch. The sites are accessible to anybody, making testing much easier for many people.
For example, http://gutenberg.run/30255
How has this been tested?
I committed these changes to
trunk
on my fork, and then opened test PRs against my fork. It'd probably also work to open a test PR against https://github.com/iandunn/gutenberg/tree/add/pr-preview-site-workflow.I also created a unit test.
Checklist: