How to delete robot comments?

263 views
Skip to first unread message

Peter Bruin

unread,
Jan 28, 2021, 8:11:18 AM1/28/21
to Repo and Gerrit Discussion
A bot generated a lot of lint warnings due to some errors in the commit. The errors are fixed but now the bot can not post anymore comments as the total would exceed 5000.

Is there a way to delete the comments from the previous patch-sets?

Thanks, 
Peter

Edwin Kempin

unread,
Jan 28, 2021, 8:21:57 AM1/28/21
to Peter Bruin, Repo and Gerrit Discussion
On Thu, Jan 28, 2021 at 2:11 PM Peter Bruin <peterb...@gmail.com> wrote:
A bot generated a lot of lint warnings due to some errors in the commit. The errors are fixed but now the bot can not post anymore comments as the total would exceed 5000.

Is there a way to delete the comments from the previous patch-sets?

If these are Gerrit robot comments (as opposed to normal comments posted by a robot) you can simply drop the refs/changes/<sharded-change-id>/robot-comments ref in the repo to delete all robot comments on the change.

Deleting normal comments requires rewriting the change meta ref and is possible via the Delete Comment REST endpoint [1], but doing it for that many comments might not be efficient. Maybe rather delete the change and create it newly.


Thanks, 
Peter

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/7e91e3bd-79f2-42ad-b9e3-94cfcb336bbcn%40googlegroups.com.

Peter Bruin

unread,
Jan 28, 2021, 8:01:19 PM1/28/21
to Repo and Gerrit Discussion
Thanks Edwin,
I tried to delete the reference but ran into some access rights. As I didn't want to tinkle with the access rights I went for the easy way out and deleted the whole change and asked the user to push again. This resolved the issue.
Thanks!

Reply all
Reply to author
Forward
0 new messages