Merge "Automatically set patch description for message edits"

This commit is contained in:
Dave Borowitz 2017-06-27 19:19:50 +00:00 committed by Gerrit Code Review
commit ab646cb4f7
2 changed files with 2 additions and 0 deletions

View File

@ -2926,6 +2926,7 @@ public class ChangeIT extends AbstractDaemonTest {
RevisionApi rApi = gApi.changes().id(r.getChangeId()).current();
assertThat(rApi.files().keySet()).containsExactly("/COMMIT_MSG", "a.txt");
assertThat(getCommitMessage(r.getChangeId())).isEqualTo(newMessage);
assertThat(rApi.description()).isEqualTo("Edit commit message");
}
}

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);