Description
Describe a bug
When the coverage comment on the PR's Conversation tab is deleted, it is never replaced by a new one. Only commits receive new comments. This is a problem if the user mistakenly deletes the PR comment, or if they change test coverage on a new commit and the PR comment doesn't reflect that new coverage information.
Steps to Reproduce
- Create a PR with the action so it runs tests & generates the initial coverage comment on the PR's homepage (Conversation tab)
- Delete the comment from the PR
- Push another commit (the tests will rerun & generate a comment on the commit)
- Check the Conversation tab of the PR after the new commit's coverage comment is published
Expected behavior
The Conversation tab of the PR has the comment that belongs to the latest commit.
This is a better UX than only publishing on a commit, because anyone who clicks on a PR to review it will first be taken to the Conversation tab. This is where they can tell at a glance how Jest coverage is affected. If we don't replace a deleted comment, or update an old comment to reflect the latest commit, the Conversation tab's coverage information will be either missing or out of date.
Details
-
Action version: v2 (latest?)
-
Device Model / OS: Macbook Air (Apple M2 chip) / macOS Sonoma v14.4.1
-
action.yml file
jobs: jest: runs-on: ubuntu-latest ... *sensitive* ... steps: - uses: actions/checkout@v4 ...*sensitive*... - uses: ArtiomTr/jest-coverage-report-action@v2 # Increases nodejs memory limit to 4GB # # This is needed because the test suite is very memory intensive. # Without this, the test suite will fail with an out of memory error. env: NODE_OPTIONS: --max-old-space-size=4096 with: output: comment annotations: none ``` </details>