diff options
author | Luca Milanesio <luca.milanesio@gmail.com> | 2024-05-13 16:29:34 +0200 |
---|---|---|
committer | Luca Milanesio <luca.milanesio@gmail.com> | 2024-05-13 16:40:01 +0200 |
commit | f1f96fc94926fc49294f347ddddd68e429e4c4fc (patch) | |
tree | 245480af4c82370ce0cf2851f6aed4d24ab1340d | |
parent | 76245a64626c922dcee74577a5894d75a7749cbc (diff) | |
parent | 82b25e54c58e9e830951326be4e823ee874578d8 (diff) |
Merge branch 'stable-3.7' into stable-3.8
* stable-3.7:
Mention who owns the change in comment emails
Release-Notes: skip
Change-Id: I29535eb95eb23576567f06337c3657a25856418e
4 files changed, 26 insertions, 24 deletions
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java b/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java index 824e01ef38..517ebd567d 100644 --- a/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java +++ b/javatests/com/google/gerrit/acceptance/rest/change/AttentionSetIT.java @@ -2629,8 +2629,8 @@ public class AttentionSetIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()).doesNotContain("\nPatch Set 2: Code-Review+2\n"); assertThat(message.body()) .contains("The change is no longer submittable: Code-Review is unsatisfied now.\n"); @@ -2715,8 +2715,8 @@ public class AttentionSetIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()).doesNotContain("\nPatch Set 2: Code-Review+2\n"); assertThat(message.body()).contains("\nPatch Set 2: Code-Review+1\n"); assertThat(message.body()) @@ -2803,8 +2803,8 @@ public class AttentionSetIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()).contains("\nPatch Set 2: Code-Review-2\n"); assertThat(message.body()) .contains("The change is no longer submittable: Code-Review is unsatisfied now.\n"); diff --git a/javatests/com/google/gerrit/acceptance/rest/change/ChangeNoLongerSubmittableIT.java b/javatests/com/google/gerrit/acceptance/rest/change/ChangeNoLongerSubmittableIT.java index 1094a4293b..5bb6dc4249 100644 --- a/javatests/com/google/gerrit/acceptance/rest/change/ChangeNoLongerSubmittableIT.java +++ b/javatests/com/google/gerrit/acceptance/rest/change/ChangeNoLongerSubmittableIT.java @@ -83,8 +83,8 @@ public class ChangeNoLongerSubmittableIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()) .contains("The change is no longer submittable: Code-Review is unsatisfied now.\n"); assertThat(message.htmlBody()) @@ -127,8 +127,8 @@ public class ChangeNoLongerSubmittableIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()) .contains("The change is no longer submittable: Code-Review is unsatisfied now.\n"); assertThat(message.htmlBody()) @@ -172,8 +172,8 @@ public class ChangeNoLongerSubmittableIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()) .contains("The change is no longer submittable: Code-Review is unsatisfied now.\n"); assertThat(message.htmlBody()) @@ -263,8 +263,8 @@ public class ChangeNoLongerSubmittableIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()) .contains( "The change is no longer submittable:" @@ -315,8 +315,8 @@ public class ChangeNoLongerSubmittableIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()).doesNotContain("The change is no longer submittable"); assertThat(message.htmlBody()).doesNotContain("The change is no longer submittable"); } @@ -361,8 +361,8 @@ public class ChangeNoLongerSubmittableIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()).doesNotContain("The change is no longer submittable"); assertThat(message.htmlBody()).doesNotContain("The change is no longer submittable"); } @@ -398,8 +398,8 @@ public class ChangeNoLongerSubmittableIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()).doesNotContain("The change is no longer submittable"); assertThat(message.htmlBody()).doesNotContain("The change is no longer submittable"); } @@ -435,8 +435,8 @@ public class ChangeNoLongerSubmittableIT extends AbstractDaemonTest { String.format( "Attention is currently required from: %s, %s.\n" + "\n" - + "%s has posted comments on this change.", - admin.fullName(), user.fullName(), approver.fullName())); + + "%s has posted comments on this change by %s.", + admin.fullName(), user.fullName(), approver.fullName(), admin.fullName())); assertThat(message.body()).doesNotContain("The change is no longer submittable"); assertThat(message.htmlBody()).doesNotContain("The change is no longer submittable"); } diff --git a/javatests/com/google/gerrit/acceptance/rest/change/ChangeReviewersIT.java b/javatests/com/google/gerrit/acceptance/rest/change/ChangeReviewersIT.java index 647e26b623..985baba067 100644 --- a/javatests/com/google/gerrit/acceptance/rest/change/ChangeReviewersIT.java +++ b/javatests/com/google/gerrit/acceptance/rest/change/ChangeReviewersIT.java @@ -402,7 +402,9 @@ public class ChangeReviewersIT extends AbstractDaemonTest { Message m = messages.get(0); assertThat(m.rcpt()).containsExactly(user.getNameEmail(), observer.getNameEmail()); - assertThat(m.body()).contains(admin.fullName() + " has posted comments on this change."); + assertThat(m.body()) + .contains( + admin.fullName() + " has posted comments on this change by " + admin.fullName() + "."); assertThat(m.body()).contains("Change subject: " + PushOneCommit.SUBJECT + "\n"); assertThat(m.body()).contains("Patch Set 1: Code-Review+2"); diff --git a/resources/com/google/gerrit/server/mail/Comment.soy b/resources/com/google/gerrit/server/mail/Comment.soy index 4b621b5670..8c1840cb2f 100644 --- a/resources/com/google/gerrit/server/mail/Comment.soy +++ b/resources/com/google/gerrit/server/mail/Comment.soy @@ -29,7 +29,7 @@ {@param unsatisfiedSubmitRequirements: ?} {@param oldSubmitRequirements: ?} {@param newSubmitRequirements: ?} - {$fromName} has posted comments on this change. + {$fromName} has posted comments on this change by {$change.ownerName}. {if $email.changeUrl} ( {$email.changeUrl} ){/if}{\n} {if $unsatisfiedSubmitRequirements} {\n} |