Убрал equals

This commit is contained in:
upagge
2020-10-12 16:41:15 +03:00
parent 0d5fc08c1f
commit 5dd2f32986
10 changed files with 5 additions and 19 deletions

View File

@@ -52,7 +52,7 @@ public class GoodMorningNotify extends Notify {
.collect(Collectors.toList()) .collect(Collectors.toList())
).ifPresent(message::append); ).ifPresent(message::append);
} else { } else {
message.append("Поздравляю, у тебя ни одного ПР на проверку!").append(Smile.BR); message.append("Поздравляю, у тебя ни одного ПР на проверку!");
} }
MessageUtils.pullRequestForNeedWork( MessageUtils.pullRequestForNeedWork(
pullRequestsNeedWork.stream() pullRequestsNeedWork.stream()

View File

@@ -1,7 +1,6 @@
package org.sadtech.bot.vcs.core.domain.notify.comment; package org.sadtech.bot.vcs.core.domain.notify.comment;
import lombok.Builder; import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import org.sadtech.bot.vcs.core.domain.Answer; import org.sadtech.bot.vcs.core.domain.Answer;
import org.sadtech.bot.vcs.core.domain.EntityType; import org.sadtech.bot.vcs.core.domain.EntityType;
@@ -14,7 +13,6 @@ import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Getter @Getter
@EqualsAndHashCode(callSuper = true)
public class AnswerCommentNotify extends Notify { public class AnswerCommentNotify extends Notify {
private final String youMessage; private final String youMessage;

View File

@@ -1,7 +1,6 @@
package org.sadtech.bot.vcs.core.domain.notify.comment; package org.sadtech.bot.vcs.core.domain.notify.comment;
import lombok.Builder; import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import org.sadtech.bot.vcs.core.domain.EntityType; import org.sadtech.bot.vcs.core.domain.EntityType;
import org.sadtech.bot.vcs.core.domain.notify.Notify; import org.sadtech.bot.vcs.core.domain.notify.Notify;
@@ -11,7 +10,6 @@ import java.text.MessageFormat;
import java.util.Set; import java.util.Set;
@Getter @Getter
@EqualsAndHashCode(callSuper = true)
public class CommentNotify extends Notify { public class CommentNotify extends Notify {
private final String authorName; private final String authorName;
@@ -36,7 +34,7 @@ public class CommentNotify extends Notify {
return MessageFormat.format( return MessageFormat.format(
"{0} *Новое упоминание* | [ПР]({1}){2}" + "{0} *Новое упоминание* | [ПР]({1}){2}" +
"*{3}*: {4}", "*{3}*: {4}",
Smile.BELL, url, Smile.HR, authorName, escapeMarkdown(message.replaceAll("@[\\w]+", "")) Smile.BELL, url, Smile.HR, authorName, escapeMarkdown(message)
); );
} }

View File

@@ -1,7 +1,6 @@
package org.sadtech.bot.vcs.core.domain.notify.pullrequest; package org.sadtech.bot.vcs.core.domain.notify.pullrequest;
import lombok.Builder; import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import org.sadtech.bot.vcs.core.utils.Smile; import org.sadtech.bot.vcs.core.utils.Smile;
@@ -9,7 +8,6 @@ import java.text.MessageFormat;
import java.util.Set; import java.util.Set;
@Getter @Getter
@EqualsAndHashCode(callSuper = true)
public class NewPrNotify extends PrNotify { public class NewPrNotify extends PrNotify {
private final String description; private final String description;

View File

@@ -1,6 +1,5 @@
package org.sadtech.bot.vcs.core.domain.notify.pullrequest; package org.sadtech.bot.vcs.core.domain.notify.pullrequest;
import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import org.sadtech.bot.vcs.core.domain.EntityType; import org.sadtech.bot.vcs.core.domain.EntityType;
import org.sadtech.bot.vcs.core.domain.notify.Notify; import org.sadtech.bot.vcs.core.domain.notify.Notify;
@@ -8,7 +7,6 @@ import org.sadtech.bot.vcs.core.domain.notify.Notify;
import java.util.Set; import java.util.Set;
@Getter @Getter
@EqualsAndHashCode(callSuper = true)
public abstract class PrNotify extends Notify { public abstract class PrNotify extends Notify {
protected final String title; protected final String title;

View File

@@ -1,7 +1,6 @@
package org.sadtech.bot.vcs.core.domain.notify.pullrequest; package org.sadtech.bot.vcs.core.domain.notify.pullrequest;
import lombok.Builder; import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import org.sadtech.bot.vcs.core.domain.util.ReviewerChange; import org.sadtech.bot.vcs.core.domain.util.ReviewerChange;
import org.sadtech.bot.vcs.core.utils.Smile; import org.sadtech.bot.vcs.core.utils.Smile;
@@ -16,7 +15,6 @@ import static org.sadtech.bot.vcs.core.domain.util.ReviewerChange.Type.NEW;
import static org.sadtech.bot.vcs.core.domain.util.ReviewerChange.Type.OLD; import static org.sadtech.bot.vcs.core.domain.util.ReviewerChange.Type.OLD;
@Getter @Getter
@EqualsAndHashCode(callSuper = true)
public class ReviewersPrNotify extends PrNotify { public class ReviewersPrNotify extends PrNotify {
private final List<ReviewerChange> reviewerChanges; private final List<ReviewerChange> reviewerChanges;

View File

@@ -27,7 +27,7 @@ public class SmartPrNotify extends PrNotify {
@Override @Override
public String generateMessage() { public String generateMessage() {
return MessageFormat.format( return MessageFormat.format(
"{0} *Напоминание о просмотре PullRequest*\n" + "{0} *Напоминание о просмотре PullRequest*" +
"{3}[{1}]({2})" + "{3}[{1}]({2})" +
"{3}" + "{3}" +
"{4} изменил свое решение на {5}\n\n", "{4} изменил свое решение на {5}\n\n",

View File

@@ -1,7 +1,6 @@
package org.sadtech.bot.vcs.core.domain.notify.pullrequest; package org.sadtech.bot.vcs.core.domain.notify.pullrequest;
import lombok.Builder; import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import org.sadtech.bot.vcs.core.domain.PullRequestStatus; import org.sadtech.bot.vcs.core.domain.PullRequestStatus;
import org.sadtech.bot.vcs.core.utils.Smile; import org.sadtech.bot.vcs.core.utils.Smile;
@@ -10,7 +9,6 @@ import java.text.MessageFormat;
import java.util.Set; import java.util.Set;
@Getter @Getter
@EqualsAndHashCode(callSuper = true)
public class StatusPrNotify extends PrNotify { public class StatusPrNotify extends PrNotify {
private final PullRequestStatus oldStatus; private final PullRequestStatus oldStatus;
@@ -33,7 +31,7 @@ public class StatusPrNotify extends PrNotify {
return MessageFormat.format( return MessageFormat.format(
"{0} *Изменился статус вашего ПР*{1}" + "{0} *Изменился статус вашего ПР*{1}" +
"[{2}]({3}){1}" + "[{2}]({3}){1}" +
"{4}{5}{6}\n\n", "{4} {5} {6}\n\n",
Smile.PEN, Smile.HR, title, url, oldStatus.name(), Smile.ARROW, newStatus.name() Smile.PEN, Smile.HR, title, url, oldStatus.name(), Smile.ARROW, newStatus.name()
); );
} }

View File

@@ -1,7 +1,6 @@
package org.sadtech.bot.vcs.core.domain.notify.pullrequest; package org.sadtech.bot.vcs.core.domain.notify.pullrequest;
import lombok.Builder; import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import org.sadtech.bot.vcs.core.utils.Smile; import org.sadtech.bot.vcs.core.utils.Smile;
@@ -9,7 +8,6 @@ import java.text.MessageFormat;
import java.util.Set; import java.util.Set;
@Getter @Getter
@EqualsAndHashCode(callSuper = true)
public class UpdatePrNotify extends PrNotify { public class UpdatePrNotify extends PrNotify {
private final String author; private final String author;

View File

@@ -74,7 +74,7 @@ public class NotificationScheduler {
.map(Person::getLogin) .map(Person::getLogin)
.collect(Collectors.toSet()) .collect(Collectors.toSet())
) )
.message("☎️ Внимание созвон" + Smile.HR + "https://meet.google.com/czs-vigu-mte") .message("☎️ Внимание созвон" + Smile.HR + "https://meet.google.com/avj-cdyy-enu")
.build() .build()
); );