Input PR id as input parameter
Maybe this is already supported, but i'm running a workflow from a slack bot (api triggered). I want to update a PR that was created in a different workflow and comment my playwright results in that PR. I'm using a few other actions and input a pr_id that associates the action with the results. Does your action do this or something similar?
thank you!
Hi! No, this isn't currently supported, I'm afraid.
It would involve two distinct steps I think:
- Get the playwright report data, which would be somewhat difficult from outside the action triggering the tests
- Find the current PR and comment on it, which would be the easy part.
I'm currently pretty busy with client work, but if you come up with a PR, I'm happy to take a look!
in my scenario, the report data is in the same triggered action, so i just need to leverage a defined PR id. I tried to submit a branch so i can test, can you give me access to do so?
@awolfson2 Okay, that sounds doable.
How would I give you access? PRs are open I think, but let me know if it needs anything else!
I have this issue as well, I'm triggering the build on something other that the PR action, so I need a variable I cause use to pass in the PR number.
See https://github.com/thombashi/pytest-md-report/issues/21 for a similar issue, and a way to get the PR with another action, to pass it into a different action that has the same issue.
Nice, that way of using it looks fine. I'm not sure I'll get to it very quickly. Appreciate a helping hand in the form of a PR, otherwise I'll get to it when the client work lets up a bit.
Made an attempt... completely untested though. https://github.com/daun/playwright-report-summary/pull/290
Thanks @darmbrust, this is released as version 3.10. I've renamed the input pr-number for clarity.
This is how it would look for this action:
- uses: jwalton/gh-find-current-pr@v1
id: pr
- uses: daun/playwright-report-summary@v3
with:
report-file: results.json
pr-number: ${{ steps.pr.outputs.number }}
awesome - thanks!