MishaKav / pytest-coverage-comment

Comments a pull request with the pytest code coverage badge and full report
MIT License
181 stars 60 forks source link

Update the previous comment with non-default github-token #106

Closed dongho-jung closed 1 year ago

dongho-jung commented 1 year ago

https://github.com/MishaKav/pytest-coverage-comment/blob/6c38c5d4c7683b4292d253822b1dc40909bc3a85/src/index.js#L216-L219

According to above snippet, pytest-coverage-comment only can find the previous comment named by github-actions

However when I give custom github-token of my app, the name of comment changes and pytest-coverage-comment can't find it so it creates new comment on every commits.

Should I give up updating comment when I using custom github-token?

MishaKav commented 1 year ago

I added support for this and release a new version, which you can use:

- name: Pytest Coverage Comment
  uses: MishaKav/pytest-coverage-comment@main

or use a specific version

- name: Pytest Coverage Comment
  uses: MishaKav/pytest-coverage-comment@v1.1.42