-
Notifications
You must be signed in to change notification settings - Fork 13
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
Never post the same comment twice #79
Comments
I was thinking about this, and thinking we could read all comments from our bot and delete them via the API, but if they have replies, that would mess things up. |
I do believe that we can access just the most recent commit, but since PR comments occur on the merge commit that may confuse things. Any reason we shouldn't re-comment on issues in the PR? |
My issue is that let's say a PR goes back and forth a dozen times...do we want a dozen comments for the same change for each update/commit? It's too much noise, IMO. We should at least dig for a better solution. |
We could just ignore files that haven't changed in the last commit. Those that have will loose the original; comments, so we will need to re-comment if they haven't been fixed. |
Lines that change will lose their comments, but only those lines. So re-commenting on files that have changed won't be enough. |
The latest commit should only have lines that have changed. Perhaps we use only the latest commit to determine which lines have changes, and build comments from that? Since we would still have merge commit numbers, it should only be one additional call to github to fetch the latest commit diff. |
We'll also need to handle the case where someone rewrites the history of a branch. I wonder if we might be over-thinking it. Would something as simple as not adding a comment if one already exists work? |
What if someone else made a comment on the line? I agree that it seems like there should be a simpler answer, but i'd bet that we could release a fix with what we have now. As for branch rewrites? I believe Github will clear all comments when that happens, so we use the latest commit, which should have all the changes again. This is one of the reasons I feel that rewriting history should be saved for the actual PR merge, or not executed at all, but it's definitely a problem we need to solve. |
If #89 gets completed, we can use the db to track comments easily. |
This can be triggered by a few things, including but not limited to rebasing a commit, adding a new commit to the same branch, and closing/reopening a pull request. |
Quoting @groovecoder from #151:
|
If a pull request is submitted, then another commit pushed to that branch (thus updating the PR), the entire PR is then reevaluated and commit comments duplicated.

The text was updated successfully, but these errors were encountered: