diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/PipelineNotifyGenerator.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/PipelineNotifyGenerator.java index 87b2871..044df42 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/PipelineNotifyGenerator.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/service/notify/PipelineNotifyGenerator.java @@ -28,19 +28,21 @@ public class PipelineNotifyGenerator implements NotifyBoxAnswerGenerator optProjectName = projectService.getProjectNameById(notify.getProjectId()) .map(Strings::escapeMarkdown); + if (optProjectName.isPresent()) { final String projectName = optProjectName.get(); builder.append(Icons.PROJECT).append(": ").append(projectName).append("\n"); } builder - .append(Icons.TREE).append(": ").append(notify.getRefName()); + .append(Icons.TREE).append(": ").append(notify.getRefName()) + .append(Icons.HR) + .append(notify.getOldStatus().getIcon()).append(" ").append(notify.getOldStatus()).append(Icons.ARROW).append(notify.getNewStatus().getIcon()).append(" ").append(notify.getNewStatus()); + return BoxAnswer.builder() .message(builder.toString())