diff options
author | Anita Stanisz <106669481+anita-stanisz-sonarsource@users.noreply.github.com> | 2024-11-29 15:43:07 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-11-29 20:03:08 +0000 |
commit | 170f39121421b369abf7fda95fb1b47f57e1362a (patch) | |
tree | 7d67d30f9b920cd498048137799877db61ebf120 /server/sonar-server-common | |
parent | 4661c2a6d14d3b473ba4441b05f46b76e9cf18eb (diff) | |
download | sonarqube-170f39121421b369abf7fda95fb1b47f57e1362a.tar.gz sonarqube-170f39121421b369abf7fda95fb1b47f57e1362a.zip |
SQRP-119 (#12446)
Diffstat (limited to 'server/sonar-server-common')
6 files changed, 16 insertions, 16 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/email/EmailSmtpConfiguration.java b/server/sonar-server-common/src/main/java/org/sonar/server/email/EmailSmtpConfiguration.java index d6acaead6e7..883b5ce0e49 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/email/EmailSmtpConfiguration.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/email/EmailSmtpConfiguration.java @@ -38,9 +38,9 @@ public class EmailSmtpConfiguration { public static final String EMAIL_CONFIG_FROM = "email.from"; public static final String EMAIL_CONFIG_FROM_DEFAULT = "noreply@nowhere"; public static final String EMAIL_CONFIG_FROM_NAME = "email.fromName"; - public static final String EMAIL_CONFIG_FROM_NAME_DEFAULT = "SonarQube Server"; + public static final String EMAIL_CONFIG_FROM_NAME_DEFAULT = "SonarQube"; public static final String EMAIL_CONFIG_PREFIX = "email.prefix"; - public static final String EMAIL_CONFIG_PREFIX_DEFAULT = "[SONARQUBE SERVER]"; + public static final String EMAIL_CONFIG_PREFIX_DEFAULT = "[SONARQUBE]"; // Auth selection public static final String EMAIL_CONFIG_SMTP_AUTH_METHOD = "email.smtp.auth.method"; public static final String EMAIL_CONFIG_SMTP_AUTH_METHOD_DEFAULT = "BASIC"; diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/IssueChangesEmailTemplate.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/IssueChangesEmailTemplate.java index f24ddfccca5..8debc1f4c1e 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/IssueChangesEmailTemplate.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/IssueChangesEmailTemplate.java @@ -244,7 +244,7 @@ public abstract class IssueChangesEmailTemplate implements EmailTemplate { s.append("<small>"); s.append("You received this email because you are subscribed to ") .append('"').append(i18n.message(Locale.ENGLISH, notificationI18nKey, notificationI18nKey)).append('"') - .append(" notifications from SonarQube Server."); + .append(" notifications from SonarQube."); s.append(" Click "); link(s, s1 -> s1.append(settings.getServerBaseURL()).append("/account/notifications"), s1 -> s1.append("here")); s.append(" to edit your email preferences."); diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java b/server/sonar-server-common/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java index 37e837106b2..f4005480631 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/notification/email/EmailNotificationChannel.java @@ -287,7 +287,7 @@ public class EmailNotificationChannel extends NotificationChannel { email.addHeader(REFERENCES_HEADER, messageId); } // Set headers for proper filtering - email.addHeader(LIST_ID_HEADER, "SonarQube Server <sonar." + host + ">"); + email.addHeader(LIST_ID_HEADER, "SonarQube <sonar." + host + ">"); email.addHeader(LIST_ARCHIVE_HEADER, server.getPublicRootUrl()); } } diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssuesEmailTemplateTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssuesEmailTemplateTest.java index b2c18994f20..009ed3c2d2d 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssuesEmailTemplateTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssuesEmailTemplateTest.java @@ -329,7 +329,7 @@ public class ChangesOnMyIssuesEmailTemplateTest { // skip content HtmlListAssert htmlListAssert = skipContent.apply(htmlAssert); - String footerText = "You received this email because you are subscribed to \"" + wordingNotification + "\" notifications from SonarQube Server." + String footerText = "You received this email because you are subscribed to \"" + wordingNotification + "\" notifications from SonarQube." + " Click here to edit your email preferences."; htmlListAssert.hasEmptyParagraph() .hasParagraph(footerText) diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FpPrAcceptedEmailTemplateTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FpPrAcceptedEmailTemplateTest.java index df3912a4e56..967e5955cd8 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FpPrAcceptedEmailTemplateTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FpPrAcceptedEmailTemplateTest.java @@ -148,7 +148,7 @@ public class FpPrAcceptedEmailTemplateTest { EmailMessage emailMessage = underTest.format(new FPOrAcceptedNotification(change, Collections.emptySet(), fpPrAccepted)); - String footerText = "You received this email because you are subscribed to \"" + wordingNotification + "\" notifications from SonarQube Server." + String footerText = "You received this email because you are subscribed to \"" + wordingNotification + "\" notifications from SonarQube." + " Click here to edit your email preferences."; HtmlFragmentAssert.assertThat(emailMessage.getMessage()) .hasParagraph("Hi,") diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/notification/email/EmailNotificationChannelTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/notification/email/EmailNotificationChannelTest.java index 26b7ad0f615..750fdff9f10 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/notification/email/EmailNotificationChannelTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/notification/email/EmailNotificationChannelTest.java @@ -64,7 +64,7 @@ import static org.mockito.Mockito.when; @RunWith(DataProviderRunner.class) public class EmailNotificationChannelTest { - private static final String SUBJECT_PREFIX = "[SONARQUBE SERVER]"; + private static final String SUBJECT_PREFIX = "[SONARQUBE]"; @Rule public LogTester logTester = new LogTester(); @@ -122,9 +122,9 @@ public class EmailNotificationChannelTest { MimeMessage email = messages.get(0).getMimeMessage(); assertThat(email.getHeader("Content-Type", null)).isEqualTo("text/plain; charset=UTF-8"); - assertThat(email.getHeader("From", ",")).isEqualTo("SonarQube Server from NoWhere <server@nowhere>"); + assertThat(email.getHeader("From", ",")).isEqualTo("SonarQube from NoWhere <server@nowhere>"); assertThat(email.getHeader("To", null)).isEqualTo("<user@nowhere>"); - assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE SERVER] Test Message from SonarQube"); + assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE] Test Message from SonarQube"); assertThat((String) email.getContent()).startsWith("This is a test message from SonarQube.\r\n\r\nMail sent from: http://nemo.sonarsource.org"); } @@ -184,12 +184,12 @@ public class EmailNotificationChannelTest { assertThat(email.getHeader("In-Reply-To", null)).isEqualTo("<reviews/view/1@nemo.sonarsource.org>"); assertThat(email.getHeader("References", null)).isEqualTo("<reviews/view/1@nemo.sonarsource.org>"); - assertThat(email.getHeader("List-ID", null)).isEqualTo("SonarQube Server <sonar.nemo.sonarsource.org>"); + assertThat(email.getHeader("List-ID", null)).isEqualTo("SonarQube <sonar.nemo.sonarsource.org>"); assertThat(email.getHeader("List-Archive", null)).isEqualTo("http://nemo.sonarsource.org"); - assertThat(email.getHeader("From", ",")).isEqualTo("\"Full Username (SonarQube Server from NoWhere)\" <server@nowhere>"); + assertThat(email.getHeader("From", ",")).isEqualTo("\"Full Username (SonarQube from NoWhere)\" <server@nowhere>"); assertThat(email.getHeader("To", null)).isEqualTo("<user@nowhere>"); - assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE SERVER] Review #3"); + assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE] Review #3"); assertThat((String) email.getContent()).startsWith("I'll take care of this violation."); assertThat(delivered).isTrue(); } @@ -213,12 +213,12 @@ public class EmailNotificationChannelTest { assertThat(email.getHeader("In-Reply-To", null)).isNull(); assertThat(email.getHeader("References", null)).isNull(); - assertThat(email.getHeader("List-ID", null)).isEqualTo("SonarQube Server <sonar.nemo.sonarsource.org>"); + assertThat(email.getHeader("List-ID", null)).isEqualTo("SonarQube <sonar.nemo.sonarsource.org>"); assertThat(email.getHeader("List-Archive", null)).isEqualTo("http://nemo.sonarsource.org"); - assertThat(email.getHeader("From", null)).isEqualTo("SonarQube Server from NoWhere <server@nowhere>"); + assertThat(email.getHeader("From", null)).isEqualTo("SonarQube from NoWhere <server@nowhere>"); assertThat(email.getHeader("To", null)).isEqualTo("<user@nowhere>"); - assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE SERVER] Foo"); + assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE] Foo"); assertThat((String) email.getContent()).startsWith("Bar"); assertThat(delivered).isTrue(); } @@ -380,7 +380,7 @@ public class EmailNotificationChannelTest { when(configuration.getSmtpPort()).thenReturn(smtpServer.getServer().getPort()); when(configuration.getSecureConnection()).thenReturn("NONE"); when(configuration.getFrom()).thenReturn("server@nowhere"); - when(configuration.getFromName()).thenReturn("SonarQube Server from NoWhere"); + when(configuration.getFromName()).thenReturn("SonarQube from NoWhere"); when(configuration.getPrefix()).thenReturn(SUBJECT_PREFIX); when(server.getPublicRootUrl()).thenReturn("http://nemo.sonarsource.org"); } |