MishaKav / pytest-coverage-comment

Comments a pull request with the pytest code coverage badge and full report

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update the previous comment with non-default github-token

dongho-jung opened this issue · comments

const comment = comments.find(
(c) =>
c.user.login === 'github-actions[bot]' && c.body.startsWith(WATERMARK)
);

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?

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