Allow user-defined pull request number
Closed this issue · 5 comments
Hi,
We are using this Github Action to report the test coverage in our pipeline. However, the actions are not always triggered by pull_request
, but push
instead. As a result, in the context there is no pull request number:
let pullRequestNumber = github.context.payload.pull_request?.number;
Therefore a user-defined pull request number as an input would be helpful (suppose the prNumber
is given by the user):
let pullRequestNumber = github.context.payload.pull_request?.number || prNumber;
There are other test coverage GitHub Actions which allow this, for example https://github.com/ArtiomTr/jest-coverage-report-action/tree/main.
I could also submit a pull request if needed.
Hey @xli12,
thank you for opening up the issue!
Definitely something I would like to support, and I would welcome a PR for this very much! 👍
Hi @davelosert ,
Thank you for your quick reply! A pull request #369 has been submitted. Please let me know if you have further questions.
@xli12: I just merged the PR and this feature got released in version 2.4.0
.
Feel free to chime in here and let me know if it works as expected, then we can close the issue.
Thank you again for contributing! ❤
@davelosert Thank you for all the assistance with this feature. Just tested using the latest version v2.4.0
in our repository, it works really well 👍
@xli12 : Thank you so much for the feedback - glad to see it works and already provides value to you! ❤
I will close this issue then!