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

[Project Automation] Add artifact url and live gutenberg.run url #54304

Open
bangank36 opened this issue Sep 8, 2023 · 0 comments
Open

[Project Automation] Add artifact url and live gutenberg.run url #54304

bangank36 opened this issue Sep 8, 2023 · 0 comments
Labels
[Package] Project management automation /packages/project-management-automation [Type] Enhancement A suggestion for improvement.

Comments

@bangank36
Copy link
Contributor

What problem does this address?

A comment should be added to each new PR with the link to live preview sites gutenberg.run
When the preview site is set up, Gutenberg is installed by downloading the ARTIFACT_DOWNLOAD_URL, is it the generated zip from Build Gutenberg Plugin Zip workflow.
So we should create the comment based on the build status of Gutenberg plugin zip

  • Last commit
  • Status: the artifact build status
  • Preview URL: gutenberg.run URL for the PR, in format http://gutenberg.run/${ pr_number }
  • Gutenberg plugin zip: the URL of the built file, currently the file is downloaded by accessing Checks tab on the PR

Something like

success failure in_progress
image image image

What is your proposed solution?

Since the preview site has relied on the Build process , I decided to use workflow_run event to trigger the workflow Pull request automation which will run tasks on Gutenberg project management automation

How the comment is made

What is the build status

  • There will be 3 status:
    1. in_progress: is when the build workflow has started aka when new PR is made or new commit is pushed to the PR
    2. success: when the workflow_run event has completed and the artifact is available on the API
    3. failure: when the workflow complete but the artifact is not available on the API

How is the plugin file URL is made

  • From the Checks tab, the artifact URL is made of ${ repoHtmlUrl }/suites/${ checkSuiteId }/artifacts/${artifact.id}, we can grab those via event payload and from the API
  • There is no straightforward way to grab the artifact URL quickly in upload-artifact, as mentioned here or in the action discussions

Reference

@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Package] Project management automation /packages/project-management-automation labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Project management automation /packages/project-management-automation [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants