From 6e37dab153bbeec48aa954437c1687085ee4f64a Mon Sep 17 00:00:00 2001 From: upagge Date: Wed, 16 Sep 2020 06:56:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=B2=20=D1=82=D0=B5=D0=BB=D0=B5=D0=B3=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../change/pullrequest/ReviewersPrChange.java | 2 +- .../scheduler/SchedulerNotification.java | 2 +- .../service/impl/PullRequestsServiceImpl.java | 29 ++++++++++--------- .../bot/bitbucketbot/utils/Message.java | 10 +++---- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/sadtech/bot/bitbucketbot/domain/change/pullrequest/ReviewersPrChange.java b/src/main/java/org/sadtech/bot/bitbucketbot/domain/change/pullrequest/ReviewersPrChange.java index 1723667..f6d858b 100644 --- a/src/main/java/org/sadtech/bot/bitbucketbot/domain/change/pullrequest/ReviewersPrChange.java +++ b/src/main/java/org/sadtech/bot/bitbucketbot/domain/change/pullrequest/ReviewersPrChange.java @@ -63,7 +63,7 @@ public class ReviewersPrChange extends PrChange { ); } final String createMessage = stringBuilder.toString(); - return Smile.PEN + " *Изменения ревьюверов PullRequest*" + + return Smile.PEN + " *Изменения ревьюверов | PullRequest*" + Smile.HR + "[" + title + "](" + url + ")" + Smile.HR + createMessage; diff --git a/src/main/java/org/sadtech/bot/bitbucketbot/scheduler/SchedulerNotification.java b/src/main/java/org/sadtech/bot/bitbucketbot/scheduler/SchedulerNotification.java index 12886dc..93c4917 100644 --- a/src/main/java/org/sadtech/bot/bitbucketbot/scheduler/SchedulerNotification.java +++ b/src/main/java/org/sadtech/bot/bitbucketbot/scheduler/SchedulerNotification.java @@ -26,7 +26,7 @@ import java.util.stream.Collectors; public class SchedulerNotification { private static final Set tksLoginNotify = new HashSet<>(Arrays.asList( - "mstruchkov", "drasskazov", "dganin", "emukhin", "ktorgaeva", "imescheryakov", "kkeglev" + "mstruchkov", "dganin", "emukhin", "ktorgaeva", "imescheryakov", "kkeglev" )); private static final Set statuses = Collections.singleton(PullRequestStatus.OPEN); diff --git a/src/main/java/org/sadtech/bot/bitbucketbot/service/impl/PullRequestsServiceImpl.java b/src/main/java/org/sadtech/bot/bitbucketbot/service/impl/PullRequestsServiceImpl.java index fc4f9e4..5c3de59 100644 --- a/src/main/java/org/sadtech/bot/bitbucketbot/service/impl/PullRequestsServiceImpl.java +++ b/src/main/java/org/sadtech/bot/bitbucketbot/service/impl/PullRequestsServiceImpl.java @@ -89,24 +89,12 @@ public class PullRequestsServiceImpl extends AbstractSimpleManagerService pullRequestsReviews, List pullRequestsNeedWork) { - StringBuilder message = new StringBuilder().append(Smile.SUN).append(" Доброе утро ").append(Smile.SUN).append(Smile.HR); + StringBuilder message = new StringBuilder().append(Smile.SUN).append(" *Доброе утро* ").append(Smile.SUN).append(Smile.HR); if (!pullRequestsReviews.isEmpty()) { - message.append("Сегодня тебя ждет проверка ").append(pullRequestsReviews.size()).append(" ПР!").append(Smile.TWO_BR) + message.append("Необходимо проверить ").append(pullRequestsReviews.size()).append(" ПР!").append(Smile.TWO_BR) .append("Самые старые:").append(Smile.BR); List oldPr = pullRequestsReviews.stream() .sorted(COMPARATOR) @@ -44,12 +43,11 @@ public final class Message { } if (dayX()) { message.append(Smile.BR).append(Smile.FUN).append(" Кстати, поздравляю, сегодня день З/П").append(Smile.BR) - .append(Smile.DANGEROUS).append("Спасибо всем, кто ").append(link("донатил", DONATION_LINK)).append(", мы оплатили хостинг до октября :)") - .append(Smile.BR).append("Теперь стоит ").append(link("помочь", HELP_LINK)).append(" тем, кто действительно в этом нуждается))") + .append(Smile.DANGEROUS).append("Хостинг оплачен до 5 октября! Прошу неравнодушных ").append(link("задонатить", DONATION_LINK)) .append(Smile.BR); } message - .append("Удачного дня ").append(Smile.FLOWER).append(Smile.TWO_BR); + .append(Smile.BR).append("Удачного дня ").append(Smile.FLOWER).append(Smile.TWO_BR); return message.toString(); }