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

GitHub Actions: Add task to comment on PRs with gutenberg.run link. #30149

Closed
wants to merge 2 commits into from

Conversation

iandunn
Copy link
Member

@iandunn iandunn commented Mar 23, 2021

Description

This adds a new workflow that will create a comment on new PRs, with a link to a gutenberg.run preview site.

Screen Shot 2021-03-15 at 4 39 47 PM

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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@iandunn iandunn marked this pull request as draft March 23, 2021 16:18
@iandunn iandunn force-pushed the add/pr-preview-site-workflow branch 2 times, most recently from 6f5d82d to edff18f Compare March 24, 2021 11:48
@iandunn iandunn marked this pull request as ready for review March 25, 2021 23:11
Copy link
Member

@aduth aduth left a 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 😅

iandunn and others added 2 commits March 29, 2021 12:42
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>
@iandunn iandunn force-pushed the add/pr-preview-site-workflow branch 2 times, most recently from d47376f to 11b1857 Compare March 29, 2021 19:44
@iandunn
Copy link
Member Author

iandunn commented Mar 29, 2021

wait to drop the comment until after the build is complete

🤔 , 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.

@iandunn
Copy link
Member Author

iandunn commented Mar 30, 2021

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.

@iandunn iandunn marked this pull request as draft March 30, 2021 20:36
@annezazu annezazu added [Type] Enhancement A suggestion for improvement. [Type] Project Management Meta-issues related to project management of Gutenberg labels Aug 25, 2021
@annezazu
Copy link
Contributor

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

@annezazu annezazu closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement. [Type] Project Management Meta-issues related to project management of Gutenberg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants