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

Delete fixed comments #255

Closed
marvin-bitterlich opened this issue Jul 29, 2017 · 3 comments · May be fixed by #421
Closed

Delete fixed comments #255

marvin-bitterlich opened this issue Jul 29, 2017 · 3 comments · May be fixed by #421

Comments

@marvin-bitterlich
Copy link

marvin-bitterlich commented Jul 29, 2017

One thing that happens on big pull requests is that there are many old comments made by pronto.

image

Would it be possible to add an option to delete old comments made by the bot before new ones are made? This means existing issues are reported again but fixed issues are gone.

@mmozuras
Copy link
Member

@Kostronor I'd accept a pull request adding such behavior. Or would write it one day myself. I would expect it to be optimized to minimize the numbers of requests. Meaning to delete unnecessary comments and do not repost old ones.

@gyfis
Copy link
Contributor

gyfis commented Mar 26, 2019

I'm looking into implementing this, since some of our PRs get very polluted and messy. I only checked GitHub API, but it seems that comments that are outdated are easily recognizable by position == nil && position != original_position. I think that'd be a good start; I hope both bitbucket and gitlab have something similar.

For comments that are not on line originally, it's easy as well since those cannot get outdated by line change.

This would also require us saving the comment_id in the Comment class and passing that around so that we know which comments to delete when the time comes.

@bekicot
Copy link

bekicot commented Jul 21, 2021

On hound, the way it test is:

  1. User who comment is bot
  2. line number & message is equal

https://github.com/houndci/hound/blob/fe43c074728438cae520d4f14d36926206200d2e/app/policies/commenting_policy.rb#L22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants