Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is possible to edit/change/delete a published comment in Gerrit?

Tags:

gerrit

I have added a comment in Gerrit and I have published it. I would like to edit it after publishing. Is that possible?

like image 328
JoseF Avatar asked Jan 20 '16 13:01

JoseF


1 Answers

No, Gerrit does not support editing comments that have been published. You can edit (or discard) them before publishing, whey they're in the "Draft" status.

However, if you desperately need to do it, you must have access to the Gerrit's database. You can find comments (and do whatever you want to with them) in the patch_comments table.


31.05.2018: Since Gerrit v2.15, published comments' text can be deleted by Gerrit's administrators. This does not delete the whole comment, but its contents only.

There is more info in the delete endpoint docs:

Instead of deleting the whole comment, [it] just replaces the comment’s message with a new message, which contains the name of the user who deletes the comment and the reason why it’s deleted. [...] Note that only users with the Administrate Server global capability are permitted to delete a comment.

This feature is available only in the new PolyGerrit UI.

like image 56
fracz Avatar answered Oct 04 '22 21:10

fracz