diff --git a/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/domain/notify/mergerequest/NewMrForReview.java b/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/domain/notify/mergerequest/NewMrForReview.java index 521f285..23f580b 100644 --- a/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/domain/notify/mergerequest/NewMrForReview.java +++ b/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/domain/notify/mergerequest/NewMrForReview.java @@ -10,6 +10,8 @@ public class NewMrForReview extends NewMrNotify { public static final String TYPE = "NewMrForReview"; + private final String assignee; + @Builder private NewMrForReview( String title, @@ -19,7 +21,8 @@ public class NewMrForReview extends NewMrNotify { String projectName, String targetBranch, String sourceBranch, - Set labels + Set labels, + String assignee ) { super( title, @@ -31,6 +34,7 @@ public class NewMrForReview extends NewMrNotify { sourceBranch, labels ); + this.assignee = assignee; } @Override diff --git a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/impl/MergeRequestsServiceImpl.java b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/impl/MergeRequestsServiceImpl.java index 997b56e..9933d60 100644 --- a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/impl/MergeRequestsServiceImpl.java +++ b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/impl/MergeRequestsServiceImpl.java @@ -123,6 +123,7 @@ public class MergeRequestsServiceImpl implements MergeRequestsService { .url(mergeRequest.getWebUrl()) .targetBranch(mergeRequest.getTargetBranch()) .sourceBranch(mergeRequest.getSourceBranch()) + .assignee(mergeRequest.getAssignee().getName()) .build() ); } diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewMrForReviewNotifyGenerator.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewMrForReviewNotifyGenerator.java index c142376..7c7af20 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewMrForReviewNotifyGenerator.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/NewMrForReviewNotifyGenerator.java @@ -9,6 +9,11 @@ import java.util.stream.Collectors; import static dev.struchkov.bot.gitlab.context.utils.Icons.link; import static dev.struchkov.godfather.main.domain.BoxAnswer.boxAnswer; +import static dev.struchkov.godfather.main.domain.keyboard.button.SimpleButton.simpleButton; +import static dev.struchkov.godfather.main.domain.keyboard.simple.SimpleKeyBoardLine.simpleLine; +import static dev.struchkov.godfather.telegram.domain.keyboard.InlineKeyBoard.inlineKeyBoard; +import static dev.struchkov.godfather.telegram.domain.keyboard.button.UrlButton.urlButton; +import static dev.struchkov.haiti.utils.Checker.checkNotNull; import static dev.struchkov.haiti.utils.Strings.escapeMarkdown; @Component @@ -21,7 +26,7 @@ public class NewMrForReviewNotifyGenerator implements NotifyBoxAnswerGenerator