preview-action icon indicating copy to clipboard operation
preview-action copied to clipboard

Update URL format for PR comment

Open gadkins opened this issue 2 years ago • 7 comments

Uffizzi https://github.com/UffizziCloud/uffizzi_platform/issues/281, of the format:

https://app.uffizzi.com/github.com/waveywaves/backstage/pull/4

This URL will redirect to a URL such as:
deployment-6562-foo-bar-x0vlpg.app.uffizzi.com

We should update the comment that gets posted to the PR with the predictable URL format.

gadkins avatar Oct 17 '22 20:10 gadkins

This should be updated in the reusable workflow

gadkins avatar Oct 17 '22 20:10 gadkins

@axisofentropy Can we format the comment with markdown to improve readability? For example, use a heading, markdown links, and emojis. Also can we add a link to our repo to learn more?

Uffizzi Preview Environment

☁️ https://app.uffizzi.com/github.com/example/example-app/pull/215

📄 View application logs

   
What is Uffizzi? Learn more

gadkins avatar Oct 18 '22 17:10 gadkins

image image

axisofentropy avatar Oct 19 '22 21:10 axisofentropy

👉 1.

  • I set up in my workflow server: https://deployment-6716-ufzi-on-ufzi-cp-internal-x0vlpg.app.uffizzi.com/
  • Workflow file: https://github.com/DbpUffizziTest/quickstart/blob/try-uffizzi/.github/workflows/uffizzi-preview.yaml
  • Create PR in my repo: https://github.com/DbpUffizziTest/quickstart/pull/16

Result: In PR was created comment with the link for production env: image

NealArw avatar Oct 24 '22 13:10 NealArw

@moklidia

  • I set up in my workflow server: https://deployment-6716-ufzi-on-ufzi-cp-internal-x0vlpg.app.uffizzi.com/
  • Workflow file: https://github.com/DbpUffizziTest/quickstart/blob/try-uffizzi/.github/workflows/uffizzi-preview.yaml
  • Create PR in my repo: https://github.com/DbpUffizziTest/quickstart/pull/16
  • Wait until the preview is created (deployment-1)
  • Close and reopen PR
  • Wait until the preview is created (deployment-2)

Result: Fix the link in the comment (change prod env to UonU env) and try to open the link. Deployment-1 opened (with 404 error). Correct link:

https://deployment-6716-ufzi-on-ufzi-cp-internal-x0vlpg.app.uffizzi.com/github.com/DbpUffizziTest/quickstart/pull/16

NealArw avatar Oct 24 '22 13:10 NealArw

Correct link:

https://deployment-6716-ufzi-on-ufzi-cp-internal-x0vlpg.app.uffizzi.com/github.com/DbpUffizziTest/quickstart/pull/16

Thanks for noticing this. I've updated the deprecate_set-output branch. Use it for testing. https://github.com/UffizziCloud/preview-action/commit/58704a26979ac4f855262a777f612026c902d970 and #35

axisofentropy avatar Oct 24 '22 21:10 axisofentropy

There is an extra slash after the hostname. But the URL is still valid. image

antlu avatar Oct 28 '22 12:10 antlu