Merge "Fix: SSH abandon or restore adds the cover message twice"
This commit is contained in:
commit
fe7060bbc1
@ -195,9 +195,11 @@ public class ReviewCommand extends SshCommand {
|
||||
|
||||
private void applyReview(final ChangeControl ctl, final PatchSet.Id patchSetId,
|
||||
final PostReview.Input review) throws Exception {
|
||||
reviewProvider.get().apply(new RevisionResource(
|
||||
new ChangeResource(ctl),
|
||||
db.patchSets().get(patchSetId)), review);
|
||||
if (!review.labels.isEmpty()) {
|
||||
reviewProvider.get().apply(new RevisionResource(
|
||||
new ChangeResource(ctl),
|
||||
db.patchSets().get(patchSetId)), review);
|
||||
}
|
||||
}
|
||||
|
||||
private void approveOne(final PatchSet.Id patchSetId) throws Exception {
|
||||
@ -218,6 +220,13 @@ public class ReviewCommand extends SshCommand {
|
||||
}
|
||||
}
|
||||
|
||||
// If review labels are being applied, the comment will be included
|
||||
// on the review note. We don't need to add it again on the abandon
|
||||
// or restore comment.
|
||||
if (!review.labels.isEmpty()) {
|
||||
changeComment = null;
|
||||
}
|
||||
|
||||
try {
|
||||
ChangeControl ctl =
|
||||
changeControlFactory.controlFor(patchSetId.getParentKey());
|
||||
|
Loading…
Reference in New Issue
Block a user