Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleted PR coverage comment is not replaced #427

Open
StevenBoutcher opened this issue May 8, 2024 · 0 comments
Open

Deleted PR coverage comment is not replaced #427

StevenBoutcher opened this issue May 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@StevenBoutcher
Copy link

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

  1. Create a PR with the action so it runs tests & generates the initial coverage comment on the PR's homepage (Conversation tab)
  2. Delete the comment from the PR
  3. Push another commit (the tests will rerun & generate a comment on the commit)
  4. 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>
@StevenBoutcher StevenBoutcher added the bug Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants