MishaKav / jest-coverage-comment

Comments a pull request or commit with the jest code coverage badge, full report and tests summary
MIT License
80 stars 34 forks source link

support pull_request_target event to add comments #58

Closed chirag-madlani closed 1 year ago

chirag-madlani commented 1 year ago

Issue

Proposed changes

Allow to add comment if the event is pull_request_target or pull_request

MishaKav commented 1 year ago

Thanks for the contribution, I will check it soon and make the adoptions. A little bit more need to add to get fully work with this kind of event, I think, I rely on info that should be in pull_request, I need to check if this info is also appear when pull_request_target is triggered.

chirag-madlani commented 1 year ago

Hi @MishaKav Thanks for checking, I am using it from my fork and comment is looks like below, I am not 100% sure on changes but happy to contribute if I am missing something

Screenshot 2023-01-06 at 10 23 42 AM
MishaKav commented 1 year ago

Actually, the pull_request payload is also available when the event pull_request_target is triggered. So, I'm merging your changes )

MishaKav commented 1 year ago

I release the version that includes your changes, you can use: Thanks for the contribution!

- name: Jest coverage comment
  uses: MishaKav/jest-coverage-comment@main

or

- name: Jest coverage comment
  uses: MishaKav/jest-coverage-comment@v1.0.22