Move git pull URL to bottom of email notifications
Andy pointed out that Gmail was making the git pull URL a hyperlink, which made clicking the review URL error prone as the two targets were really close to each other. By moving the git pull URL to the bottom of the email, just above the footer, we make it less likely that the target is confused. Change-Id: Ibd03e4f9b3fa9d54358a2f2ec2853c61e3e00b48 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -59,18 +59,19 @@ public abstract class NewChangeSender extends OutgoingEmail {
|
||||
protected void format() {
|
||||
formatSalutation();
|
||||
formatChangeDetail();
|
||||
|
||||
appendText("\n");
|
||||
appendText(" " + getPullUrl() + "\n");
|
||||
}
|
||||
|
||||
private void formatSalutation() {
|
||||
final String changeUrl = getChangeUrl();
|
||||
final String pullUrl = getPullUrl();
|
||||
|
||||
if (reviewers.isEmpty()) {
|
||||
formatDest();
|
||||
if (changeUrl != null) {
|
||||
appendText("\n");
|
||||
appendText(" " + changeUrl + "\n");
|
||||
appendText(" " + pullUrl + "\n");
|
||||
appendText("\n");
|
||||
}
|
||||
appendText("\n");
|
||||
@@ -90,14 +91,6 @@ public abstract class NewChangeSender extends OutgoingEmail {
|
||||
appendText(" Please visit\n");
|
||||
appendText("\n");
|
||||
appendText(" " + changeUrl + "\n");
|
||||
appendText(" " + pullUrl + "\n");
|
||||
appendText("\n");
|
||||
appendText("to review the following change:\n");
|
||||
|
||||
} else {
|
||||
appendText(" Please execute\n");
|
||||
appendText("\n");
|
||||
appendText(" " + pullUrl + "\n");
|
||||
appendText("\n");
|
||||
appendText("to review the following change:\n");
|
||||
}
|
||||
|
||||
@@ -68,20 +68,19 @@ public class ReplacePatchSetSender extends ReplyToChangeSender {
|
||||
protected void format() {
|
||||
formatSalutation();
|
||||
formatChangeDetail();
|
||||
|
||||
appendText("\n");
|
||||
appendText(" " + getPullUrl() + "\n");
|
||||
}
|
||||
|
||||
private void formatSalutation() {
|
||||
final String changeUrl = getChangeUrl();
|
||||
final String pullUrl = getPullUrl();
|
||||
|
||||
if (reviewers.isEmpty()) {
|
||||
formatDest();
|
||||
if (changeUrl != null || pullUrl != null) {
|
||||
if (changeUrl != null) {
|
||||
appendText("\n");
|
||||
if (changeUrl != null) {
|
||||
appendText(" " + changeUrl + "\n");
|
||||
}
|
||||
appendText(" " + pullUrl + "\n");
|
||||
appendText(" " + changeUrl + "\n");
|
||||
appendText("\n");
|
||||
}
|
||||
appendText("\n");
|
||||
@@ -102,15 +101,6 @@ public class ReplacePatchSetSender extends ReplyToChangeSender {
|
||||
appendText(" Please visit\n");
|
||||
appendText("\n");
|
||||
appendText(" " + changeUrl + "\n");
|
||||
appendText(" " + pullUrl + "\n");
|
||||
appendText("\n");
|
||||
appendText("to look at patch set " + patchSet.getPatchSetId());
|
||||
appendText(":\n");
|
||||
|
||||
} else {
|
||||
appendText(" Please execute\n");
|
||||
appendText("\n");
|
||||
appendText(" " + pullUrl + "\n");
|
||||
appendText("\n");
|
||||
appendText("to look at patch set " + patchSet.getPatchSetId());
|
||||
appendText(":\n");
|
||||
|
||||
Reference in New Issue
Block a user