Multiple comments on the PR - is this by design? #229
-
jest-coverage-report-action is generating a new comment every time the action is run (on a new push to the branch). Is this by design? Is there a way to configure it to update the existing comment? It is cluttering up our PR timelines quite a bit! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hello @grahammcculloch 👋, Action automatically updates comment, if comment "tags" match. Tag is a To verify, that your comment "tags" match, you can check the source of comments. At the beginning of each comment, there is a line: Here is the value to verify ↓
<!-- jest coverage report action for options with hash "md5 hash" --> Here is a screenshot how to view comment source: Could you please check your comments tags? I need this information to verify, if it is a bug or not. |
Beta Was this translation helpful? Give feedback.
-
I have also noticed something similar happening on a project where I am getting new comments every time I push a new commit. I created a test pr on my fork to verify this and here is what I noticed:
This is just a simple test but it seems like the logic that updates the previous comment only works after the first successful report. I think that if I kept pushing test-breaking commits, I would have got more and more comments on that PR Here is a screenshot to show the matching tags: |
Beta Was this translation helpful? Give feedback.
-
TL;DR name: My workflow
on:
push:
jobs: [...] @ArtiomTr I tried to do what you suggested and the logs show this: Interestingly, I also tried to open another PR to try and recreate my previous scenario, but this time using So I started thinking what did I do differently this time, and I remembered that when I opened my first PR on my fork, the actions didn't trigger initially because they were not enabled for the forked repo and I think I accidentally triggered one manually; this should explain why the commend was attached to the commit and not the PR. By looking at the wokflow posted by @grahammcculloch I now realize that this is happening because he had it trigger on |
Beta Was this translation helpful? Give feedback.
TL;DR
I don't think this is a bug. This happens when you have a workflow that triggers on push instead of pull_request:
@ArtiomTr I tried to do what you suggested and the logs show this:
Interestingly, I also tried to open another PR to try and recreate my previous scenario, but this time using
Debug-action
from the start... and I couldn't reproduce it: the one comment kept getting update regularly.So I started thinking what did I do differently this time, and I remembered that when I opened my first PR on my fork, the actions didn't trigger initially because they were not enabled for the forked repo and I think I accidentally triggered one m…