-
Notifications
You must be signed in to change notification settings - Fork 36
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
Improve logic for posted comments filter #455
Comments
I like the proposal; @carlosms should we consider it, or do you have any other idea? |
I agree with the fact that the same comment posted twice on different pushes is annoying, but only if it was resolved on the first push. If the issues was not resolved and in the next push that issue was not addressed, then there's the risk that it was simply ignored or forgotten. I'm also thinking of another scenario. Let's suppose that the first push contains this code:
with the second line commented by the bot. Now let's say that another push occurs and now the code contains:
Given that the two marked lines are identical what should we do in this case? Should we skip the comment for both lines? Should we comment both liens? In my opinion we should skip in the first case and notify in the second case. But still only if in the first case it was resolved as I previously said. I know that this is an artificial example and it could actually never happen and that the strategy of remembering the line number is already an improvement, and maybe there are also other not too complex improvements that we could apply. I'm just want to say that we should consider a trade-off between false positives and false negatives. |
From your first answer:
That's also true. It can be risky to skip comments placed in different lines, without knowing what happened with the first comment (if it was addressed, manually marked as resolved...). From your example:
(from store/db.go::L236) |
Ok, yes I understood that (but thanks for pointing where it's being done 👍). But I was referring to what should we do in case that in the secondo push both lines are in different position than the first push. |
Currently, we filter out comments with the same text posted on the same line. It works great most of the time. But not in case of sequential commits which "move" changes from the previous commits.
Good example: #442
I propose to improve this logic by also checking:
Example in screenshots:
First comment:
We can skip this one if apply logic from above:
The text was updated successfully, but these errors were encountered: