Automatically set patch description for message edits

This is a port-forward of https://gerrit-review.googlesource.com/c/93712,
but specific to the new PUT /changes/<id>/message API.

Bug: Issue 6502
Change-Id: I3ee5a609065d66d2d328670571355f9e4a329bb6
This commit is contained in:
Aaron Gable
2017-06-26 10:36:18 -07:00
parent d19e0df32f
commit c3bc994153
2 changed files with 2 additions and 0 deletions

View File

@@ -150,6 +150,7 @@ public class PutMessage
psInserterFactory.create(resource.getControl(), psId, newCommit);
inserter.setMessage(
String.format("Patch Set %s: Commit message was updated.", psId.getId()));
inserter.setDescription("Edit commit message");
inserter.setNotify(input.notify);
inserter.setAccountsToNotify(notifyUtil.resolveAccounts(input.notifyDetails));
bu.addOp(resource.getChange().getId(), inserter);