Fix extra period in comment message
This fixes the comment message, which contains an extra period when pushing a patch set which is either rebased or commit message update. Bug: Issue 4137 Change-Id: I4291c1f07601adc2250e70e998743ccd8e5a7c4a
This commit is contained in:
committed by
David Pursehouse
parent
c42ca4d5ac
commit
ca55c005b9
@@ -351,6 +351,6 @@ public class ApprovalsUtil {
|
|||||||
.append(LabelVote.create(e.getKey(), e.getValue()).format());
|
.append(LabelVote.create(e.getKey(), e.getValue()).format());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return msgs.append('.').toString();
|
return msgs.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1799,6 +1799,7 @@ public class ReceiveCommits {
|
|||||||
ApprovalsUtil.renderMessageWithApprovals(
|
ApprovalsUtil.renderMessageWithApprovals(
|
||||||
psId.get(), approvals,
|
psId.get(), approvals,
|
||||||
Collections.<String, PatchSetApproval> emptyMap()));
|
Collections.<String, PatchSetApproval> emptyMap()));
|
||||||
|
msg.append('.');
|
||||||
if (!Strings.isNullOrEmpty(magicBranch.message)) {
|
if (!Strings.isNullOrEmpty(magicBranch.message)) {
|
||||||
msg.append("\n").append(magicBranch.message);
|
msg.append("\n").append(magicBranch.message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,10 +263,12 @@ public class ReplaceOp extends BatchUpdate.Op {
|
|||||||
|
|
||||||
String approvalMessage = ApprovalsUtil.renderMessageWithApprovals(
|
String approvalMessage = ApprovalsUtil.renderMessageWithApprovals(
|
||||||
patchSetId.get(), approvals, scanLabels(ctx, approvals));
|
patchSetId.get(), approvals, scanLabels(ctx, approvals));
|
||||||
StringBuilder message = new StringBuilder(approvalMessage);
|
|
||||||
String kindMessage = changeKindMessage(changeKind);
|
String kindMessage = changeKindMessage(changeKind);
|
||||||
|
StringBuilder message = new StringBuilder(approvalMessage);
|
||||||
if (!Strings.isNullOrEmpty(kindMessage)) {
|
if (!Strings.isNullOrEmpty(kindMessage)) {
|
||||||
message.append(kindMessage);
|
message.append(kindMessage);
|
||||||
|
} else {
|
||||||
|
message.append('.');
|
||||||
}
|
}
|
||||||
if (!Strings.isNullOrEmpty(reviewMessage)) {
|
if (!Strings.isNullOrEmpty(reviewMessage)) {
|
||||||
message.append("\n").append(reviewMessage);
|
message.append("\n").append(reviewMessage);
|
||||||
@@ -293,9 +295,9 @@ public class ReplaceOp extends BatchUpdate.Op {
|
|||||||
case MERGE_FIRST_PARENT_UPDATE:
|
case MERGE_FIRST_PARENT_UPDATE:
|
||||||
case TRIVIAL_REBASE:
|
case TRIVIAL_REBASE:
|
||||||
case NO_CHANGE:
|
case NO_CHANGE:
|
||||||
return ": Patch Set " + priorPatchSetId.get() + " was rebased";
|
return ": Patch Set " + priorPatchSetId.get() + " was rebased.";
|
||||||
case NO_CODE_CHANGE:
|
case NO_CODE_CHANGE:
|
||||||
return ": Commit message was updated";
|
return ": Commit message was updated.";
|
||||||
case REWORK:
|
case REWORK:
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user