From 8137493f771159cbbff72b82ef92ca6717e3ce83 Mon Sep 17 00:00:00 2001 From: upagge Date: Fri, 13 Mar 2020 00:30:13 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BC=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=B8?= =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tsc/bitbucketbot/scheduler/SchedulerComments.java | 2 +- src/main/java/com/tsc/bitbucketbot/utils/Message.java | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/tsc/bitbucketbot/scheduler/SchedulerComments.java b/src/main/java/com/tsc/bitbucketbot/scheduler/SchedulerComments.java index a33c168..ffee6ac 100644 --- a/src/main/java/com/tsc/bitbucketbot/scheduler/SchedulerComments.java +++ b/src/main/java/com/tsc/bitbucketbot/scheduler/SchedulerComments.java @@ -26,7 +26,7 @@ import java.util.regex.Pattern; public class SchedulerComments { private static final Integer COUNT = 100; - private static final Integer NO_COMMENT = 100; + private static final Integer NO_COMMENT = 30; private static final Pattern PATTERN = Pattern.compile("@[\\w]+"); private final CommentService commentService; diff --git a/src/main/java/com/tsc/bitbucketbot/utils/Message.java b/src/main/java/com/tsc/bitbucketbot/utils/Message.java index a1843bd..34aee5e 100644 --- a/src/main/java/com/tsc/bitbucketbot/utils/Message.java +++ b/src/main/java/com/tsc/bitbucketbot/utils/Message.java @@ -103,7 +103,7 @@ public class Message { 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) - .append("Топ старых ПР:").append(Smile.BR); + .append("Самые старые:").append(Smile.BR); List oldPr = pullRequestsReviews.stream() .sorted(COMPARATOR) .limit(PR_COUNT) @@ -115,7 +115,7 @@ public class Message { .append("Поздравляю, у тебя ни одного ПР на проверку!").append(Smile.BR); } if (!pullRequestsNeedWork.isEmpty()) { - message.append(Smile.BR).append(Smile.DANGEROUS).append(" Так же у тебя на доработке находится ").append(pullRequestsNeedWork.size()).append(" ПР").append(Smile.BR); + message.append(Smile.BR).append(Smile.DANGEROUS).append("Требуется доработать ").append(pullRequestsNeedWork.size()).append(" ПР:").append(Smile.BR); message.append(needWorkPr(pullRequestsNeedWork)).append(Smile.BR); } if (dayX()) { @@ -162,11 +162,10 @@ public class Message { } public static String personalNotify(@NonNull CommentJson comment, @NonNull String namePr, @NonNull String urlPr) { - return Smile.BELL + " *Новое упоминание*" + Smile.BR + + return Smile.BELL + " *Новое упоминание* | " + comment.getAuthor().getName() + Smile.BR + link(namePr, urlPr) + Smile.HR + - comment.getText().replaceAll("@[\\w]+", "") + - Smile.HR + - Smile.AUTHOR + ": " + comment.getAuthor().getName(); + comment.getText().replaceAll("@[\\w]+", ""); } + }