daun / playwright-report-summary

A GitHub action to report Playwright test results as pull request comments
MIT License
40 stars 8 forks source link

Display link to action run #205

Closed kevinsmith closed 4 months ago

kevinsmith commented 4 months ago

Is it possible to get the PR comment to link to the Action run itself (like this: https://github.com/daun/playwright-report-summary/actions/runs/9828037864), so the reader can dig in for more details?

daun commented 4 months ago

You can use the report-url input to make it render a Open report link to that specific url. A quick google says there's a run_id context variable, which would yield this (untested) example. Does that work for you?

- uses: daun/playwright-report-summary@v3
  with:
    report-url: 'https://github.com/org/repo/actions/runs/${{ github.run_id }}'
daun commented 4 months ago

If you need control over the link label, you can pass in your own markdown info through the custom-info input:

- uses: daun/playwright-report-summary@v3
  with:
    custom-info: '[Link label](link)'
kevinsmith commented 4 months ago

That worked perfectly, thanks!

kevinsmith commented 4 months ago

Oh heads up, I'm now getting this under annotations on the workflow run summary page.

image
daun commented 4 months ago

That sounds like you might need to upgrade the action to a version that supports the custom info input.

daun commented 4 months ago

Nevermind, this was due to a missing input parameter in the action manifest. Fixed in 3.5.2.