From 643e79dcaab4b8e9deac58d4113ce2cd6a4e7816 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Wed, 25 Jan 2023 15:59:47 +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=D0=BF=D0=B0=D1=80=D1=81=D0=B8=D0=BD=D0=B3=D0=B0?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=BE=D0=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../context/domain/entity/AppSetting.java | 6 +- .../context/service/AppSettingService.java | 6 +- .../service/impl/AppSettingServiceImpl.java | 14 +- .../core/service/parser/ProjectParser.java | 15 +- .../gitlab/scheduler/SchedulerService.java | 6 +- .../v.2.0.0/2022-12-03-create-tables.xml | 4 +- .../telegram/unit/flow/InitSettingFlow.java | 346 +++++++++--------- .../bot/gitlab/telegram/utils/UnitName.java | 6 +- 8 files changed, 209 insertions(+), 194 deletions(-) diff --git a/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/domain/entity/AppSetting.java b/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/domain/entity/AppSetting.java index b0ab5f4..ec68dfd 100644 --- a/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/domain/entity/AppSetting.java +++ b/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/domain/entity/AppSetting.java @@ -28,10 +28,10 @@ public class AppSetting { @Column(name = "enable_notify") private boolean enableNotify; + @Column(name = "project_owner_scan") + private boolean projectOwnerScan; + @Column(name = "project_private_scan") private boolean projectPrivateScan; - @Column(name = "project_public_scan") - private boolean projectPublicScan; - } diff --git a/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/service/AppSettingService.java b/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/service/AppSettingService.java index 87db744..ed05533 100644 --- a/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/service/AppSettingService.java +++ b/bot-context/src/main/java/dev/struchkov/bot/gitlab/context/service/AppSettingService.java @@ -27,10 +27,10 @@ public interface AppSettingService { void privateProjectScan(boolean enable); - void publicProjectScan(boolean enable); + void ownerProjectScan(boolean enable); + + boolean isOwnerProjectScan(); boolean isPrivateProjectScan(); - boolean isPublicProjectScan(); - } diff --git a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/impl/AppSettingServiceImpl.java b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/impl/AppSettingServiceImpl.java index 16487f5..483e84c 100644 --- a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/impl/AppSettingServiceImpl.java +++ b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/impl/AppSettingServiceImpl.java @@ -64,9 +64,14 @@ public class AppSettingServiceImpl implements AppSettingService { @Override @Transactional - public void publicProjectScan(boolean enable) { + public void ownerProjectScan(boolean enable) { final AppSetting appSetting = getAppSetting(); - appSetting.setProjectPublicScan(enable); + appSetting.setProjectOwnerScan(enable); + } + + @Override + public boolean isOwnerProjectScan() { + return getAppSetting().isProjectOwnerScan(); } @Override @@ -74,11 +79,6 @@ public class AppSettingServiceImpl implements AppSettingService { return getAppSetting().isProjectPrivateScan(); } - @Override - public boolean isPublicProjectScan() { - return getAppSetting().isProjectPublicScan(); - } - private AppSetting getAppSetting() { return appSettingRepository.findById(KEY) .orElseThrow(NOT_FOUND_SETTINGS); diff --git a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/parser/ProjectParser.java b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/parser/ProjectParser.java index 73b96e0..b7b719c 100644 --- a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/parser/ProjectParser.java +++ b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/parser/ProjectParser.java @@ -36,8 +36,9 @@ import static dev.struchkov.haiti.utils.Checker.checkNotEmpty; @RequiredArgsConstructor public class ProjectParser { + public static final String OWNER = "&owned=true"; public static final String PRIVATE = "&visibility=private"; - public static final String OWNER = "&visibility=public&owned=true"; + public static final String PUBLIC_OWNER = "&visibility=public&owned=true"; private final ProjectService projectService; private final PersonService personService; @@ -47,18 +48,18 @@ public class ProjectParser { private final GitlabProperty gitlabProperty; private final PersonProperty personProperty; + public void parseAllProjectOwner() { + log.debug("Старт обработки всех проектов, где пользователь владелец"); + parseProjects(OWNER); + log.debug("Конец обработки всех проектов, где пользователь владелец"); + } + public void parseAllPrivateProject() { log.debug("Старт обработки приватных проектов"); parseProjects(PRIVATE); log.debug("Конец обработки приватных проектов"); } - public void parseAllProjectOwner() { - log.debug("Старт обработки публичных проектов, в которых пользователь хозяин"); - parseProjects(OWNER); - log.debug("Конец обработки публичных проектов, в которых пользователь хозяин"); - } - private void parseProjects(String param) { int page = 1; List projectJsons = getProjectJsons(page, param); diff --git a/gitlab-app/src/main/java/dev/struchkov/bot/gitlab/scheduler/SchedulerService.java b/gitlab-app/src/main/java/dev/struchkov/bot/gitlab/scheduler/SchedulerService.java index bc26b18..ae4648a 100644 --- a/gitlab-app/src/main/java/dev/struchkov/bot/gitlab/scheduler/SchedulerService.java +++ b/gitlab-app/src/main/java/dev/struchkov/bot/gitlab/scheduler/SchedulerService.java @@ -36,12 +36,12 @@ public class SchedulerService { public void newMergeRequest() { log.info("Запуск процесса обновления данных c GitLab"); if (!settingService.isFirstStart()) { + if (settingService.isOwnerProjectScan()) { + projectParser.parseAllProjectOwner(); + } if (settingService.isPrivateProjectScan()) { projectParser.parseAllPrivateProject(); } - if (settingService.isPublicProjectScan()) { - projectParser.parseAllProjectOwner(); - } mergeRequestParser.parsingOldMergeRequest(); mergeRequestParser.parsingNewMergeRequest(); pipelineParser.scanOldPipeline(); diff --git a/gitlab-app/src/main/resources/liquibase/v.2.0.0/2022-12-03-create-tables.xml b/gitlab-app/src/main/resources/liquibase/v.2.0.0/2022-12-03-create-tables.xml index adfb8be..1d9369f 100644 --- a/gitlab-app/src/main/resources/liquibase/v.2.0.0/2022-12-03-create-tables.xml +++ b/gitlab-app/src/main/resources/liquibase/v.2.0.0/2022-12-03-create-tables.xml @@ -14,10 +14,10 @@ - + - + diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/flow/InitSettingFlow.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/flow/InitSettingFlow.java index 1d5ab7c..6906a76 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/flow/InitSettingFlow.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/unit/flow/InitSettingFlow.java @@ -25,18 +25,18 @@ import java.util.Set; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.AUTO_PARSE_OWNER_PROJECT; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.AUTO_PARSE_PRIVATE_PROJECT; -import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.AUTO_PARSE_PUBLIC_PROJECT; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.CHECK_PARSER_PRIVATE_PROJECT_NO; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.CHECK_PARSER_PRIVATE_PROJECT_YES; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.CHECK_PARSE_OWNER_PROJECT_NO; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.CHECK_PARSE_OWNER_PROJECT_YES; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.END_SETTING; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.FIRST_START; +import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_AUTO_PARSE_OWNER_PROJECT; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_AUTO_PARSE_PRIVATE_PROJECT; -import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_AUTO_PARSE_PUBLIC_PROJECT; +import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_PARSER_OWNER_PROJECT; import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_PARSER_PRIVATE_PROJECT; -import static dev.struchkov.bot.gitlab.telegram.utils.UnitName.TEXT_PARSE_OWNER_PROJECT; import static dev.struchkov.godfather.main.core.unit.UnitActiveType.AFTER; import static dev.struchkov.godfather.main.domain.BoxAnswer.boxAnswer; import static dev.struchkov.godfather.main.domain.BoxAnswer.replaceBoxAnswer; @@ -77,7 +77,8 @@ public class InitSettingFlow { @Unit(value = FIRST_START, main = true) public AnswerText firstStart( - @Unit(value = TEXT_PARSER_PRIVATE_PROJECT) MainUnit textParserPrivateProject + @Unit(value = TEXT_PARSER_OWNER_PROJECT) MainUnit textParserOwnerProject +// @Unit(GUIDE_START) MainUnit guideStart ) { return AnswerText.builder() .triggerCheck(mail -> { @@ -95,19 +96,188 @@ public class InitSettingFlow { Press start to start initial setup 👇 """, - inlineKeyBoard(simpleButton("start", TEXT_PARSER_PRIVATE_PROJECT)) + inlineKeyBoard( + simpleButton("start setting", TEXT_PARSER_PRIVATE_PROJECT) +// simpleButton("see guide", GUIDE_START) + ) ) ) + .next(textParserOwnerProject) +// .next(guideStart) + .build(); + } + + @Unit(value = TEXT_PARSER_OWNER_PROJECT) + public AnswerText textParserOwnerProject( + @Unit(CHECK_PARSE_OWNER_PROJECT_YES) MainUnit checkParseOwnerProjectYes, + @Unit(CHECK_PARSE_OWNER_PROJECT_NO) MainUnit checkParseOwnerProjectNo + ) { + return AnswerText.builder() + .answer(() -> replaceBoxAnswer( + """ + First of all, I suggest tracking changes in all repositories in which you are the creator. + + Find such repositories and set up notifications for them? + """, + inlineKeyBoard( + simpleLine( + simpleButton("Yes", "YES"), + simpleButton("No", "NO") + ) + ) + ) + ) + .next(checkParseOwnerProjectYes) + .next(checkParseOwnerProjectNo) + .build(); + } + + @Unit(CHECK_PARSE_OWNER_PROJECT_NO) + public AnswerText checkParseOwnerProjectNo( + @Unit(TEXT_AUTO_PARSE_OWNER_PROJECT) MainUnit textAutoParsePublicProject + ) { + return AnswerText.builder() + .triggerCheck(clickButtonRaw("NO")) + .answer(replaceBoxAnswer("Okay, I won't scan public projects.")) + .callBack( + sentBox -> scheduledExecutorService.schedule(() -> sending.deleteMessage(sentBox.getPersonId(), sentBox.getMessageId()), 10, TimeUnit.SECONDS) + ) + .next(textAutoParsePublicProject) + .build(); + } + + @Unit(CHECK_PARSE_OWNER_PROJECT_YES) + public AnswerText checkParseOwnerProjectYes( + @Unit(TEXT_AUTO_PARSE_OWNER_PROJECT) MainUnit textAutoParseOwnerProject + ) { + final String step1 = """ + 🔘 Started searching for your repositories. + ⌛ Wait... + """; + + final String step2 = """ + 🟢 {0} projects found. + 🔘 Scanning merge requests in found projects. + ⌛ Wait... + """; + final String step3 = """ + 🟢 {0} projects found. + 🟢 {1} merge requests found. + 🔘 Scanning pipelines in found merge requests. + ⌛ Wait... + """; + + final String step4 = """ + 🟢 {0} projects found. + 🟢 {1} merge requests found. + 🟢 {2} pipelines found. + 🔘 Scanning threads in merge requests. + ⌛ Wait... + """; + + final String finalAnswer = """ + 🟢 {0} projects found. + 🟢 {1} merge requests found. + 🟢 {2} pipelines found. + 🟢 {3} threads found. + """; + + return AnswerText.builder() + .triggerCheck(clickButtonRaw("YES")) + .answer(mail -> { + final String personId = mail.getPersonId(); + final String messageId = Attachments.findFirstButtonClick(mail.getAttachments()) + .map(ButtonClickAttachment::getMessageId) + .orElseThrow(); + sending.replaceMessage(personId, messageId, boxAnswer(step1)); + + final int oldCountProjects = projectService.getAllIds().size(); + + projectParser.parseAllProjectOwner(); + final Set projectIds = projectService.getAllIds(); + + projectService.notification(true, projectIds); + projectService.processing(true, projectIds); + + final int projectCount = projectIds.size() - oldCountProjects; + sending.replaceMessage(personId, messageId, boxAnswer(format(step2, projectCount))); + + final int oldCountMr = mergeRequestsService.getAllIds().size(); + mergeRequestParser.parsingNewMergeRequest(); + final int mrCount = mergeRequestsService.getAllIds().size() - oldCountMr; + sending.replaceMessage(personId, messageId, boxAnswer(format(step3, projectCount, mrCount))); + + final int oldCountPipelines = pipelineService.getAllIds().size(); + + pipelineParser.scanNewPipeline(); + final int pipelineCount = pipelineService.getAllIds().size() - oldCountPipelines; + sending.replaceMessage(personId, messageId, boxAnswer(format(step4, projectCount, mrCount, pipelineCount))); + + final int oldCountThreads = discussionService.getAllIds().size(); + discussionParser.scanNewDiscussion(); + final int discussionCount = discussionService.getAllIds().size() - oldCountThreads; + + return replaceBoxAnswer(format(finalAnswer, pipelineCount, mrCount, pipelineCount, discussionCount)); + }) + .callBack( + sentBox -> scheduledExecutorService.schedule(() -> sending.deleteMessage(sentBox.getPersonId(), sentBox.getMessageId()), 10, TimeUnit.SECONDS) + ) + .next(textAutoParseOwnerProject) + .build(); + } + + @Unit(TEXT_AUTO_PARSE_OWNER_PROJECT) + public AnswerText textAutoParsePublicProject( + @Unit(AUTO_PARSE_OWNER_PROJECT) MainUnit autoParseOwnerProject + ) { + return AnswerText.builder() + .activeType(AFTER) + .answer( + boxAnswer( + """ + By default, I do not notify about events in repositories that are not tracked. But you can turn on notifications for new repositories in which you are the creator. + + To do this? + """, + inlineKeyBoard( + simpleLine( + simpleButton("Yes", "YES"), + simpleButton("No", "NO") + ) + ) + ) + ) + .next(autoParseOwnerProject) + .build(); + } + + @Unit(AUTO_PARSE_OWNER_PROJECT) + public AnswerText autoParseOwnerProject( + @Unit(TEXT_PARSER_PRIVATE_PROJECT) MainUnit textParserPrivateProject + ) { + return AnswerText.builder() + .triggerCheck(isClickButton()) + .answer(mail -> { + final ButtonClickAttachment buttonClick = Attachments.findFirstButtonClick(mail.getAttachments()).orElseThrow(); + if ("YES".equals(buttonClick.getRawCallBackData())) { + projectParser.parseAllProjectOwner(); + settingService.ownerProjectScan(true); + } else { + settingService.ownerProjectScan(false); + } + }) .next(textParserPrivateProject) .build(); } + @Unit(value = TEXT_PARSER_PRIVATE_PROJECT) public AnswerText textParserPrivateProject( @Unit(CHECK_PARSER_PRIVATE_PROJECT_YES) MainUnit checkParserPrivateProjectYes, @Unit(CHECK_PARSER_PRIVATE_PROJECT_NO) MainUnit checkParserPrivateProjectNo ) { return AnswerText.builder() + .activeType(AFTER) .answer(() -> replaceBoxAnswer( """ I can scan all your private projects and put them on tracking. This will notify you of new merge requests and other events. Or you can add only the projects you want later manually one by one. @@ -127,6 +297,7 @@ public class InitSettingFlow { .build(); } + @Unit(CHECK_PARSER_PRIVATE_PROJECT_YES) public AnswerText checkParserPrivateProjectYes( @Unit(TEXT_AUTO_PARSE_PRIVATE_PROJECT) MainUnit textAutoParsePrivateProject @@ -238,166 +409,6 @@ public class InitSettingFlow { @Unit(AUTO_PARSE_PRIVATE_PROJECT) public AnswerText autoParsePrivateProject( - @Unit(TEXT_PARSE_OWNER_PROJECT) MainUnit textParseOwnerProject - ) { - return AnswerText.builder() - .triggerCheck(isClickButton()) - .answer(mail -> { - final ButtonClickAttachment buttonClick = Attachments.findFirstButtonClick(mail.getAttachments()).orElseThrow(); - if ("YES".equals(buttonClick.getRawCallBackData())) { - settingService.privateProjectScan(true); - } else { - settingService.privateProjectScan(false); - } - }) - .next(textParseOwnerProject) - .build(); - } - - @Unit(TEXT_PARSE_OWNER_PROJECT) - public AnswerText textParseOwnerProject( - @Unit(CHECK_PARSE_OWNER_PROJECT_YES) MainUnit checkParseOwnerProjectYes, - @Unit(CHECK_PARSE_OWNER_PROJECT_NO) MainUnit checkParseOwnerProjectNo - ) { - return AnswerText.builder() - .activeType(AFTER) - .answer( - replaceBoxAnswer( - """ - Now do you want to track all available public projects *where you are the creator*? - - (The process is similar to private projects) - """, - inlineKeyBoard( - simpleLine( - simpleButton("Yes", "YES"), - simpleButton("No", "NO") - ) - ) - ) - ) - .next(checkParseOwnerProjectYes) - .next(checkParseOwnerProjectNo) - .build(); - } - - @Unit(CHECK_PARSE_OWNER_PROJECT_YES) - public AnswerText checkParseOwnerProjectYes( - @Unit(TEXT_AUTO_PARSE_PUBLIC_PROJECT) MainUnit textAutoParsePublicProject - ) { - final String step1 = """ - 🔘 Scanning of public projects has begun. - ⌛ Wait... - """; - - final String step2 = """ - 🟢 {0} public projects found. - 🔘 Scanning merge requests in found projects. - ⌛ Wait... - """; - final String step3 = """ - 🟢 {0} public projects found. - 🟢 {1} merge requests found. - 🔘 Scanning pipelines in found merge requests. - ⌛ Wait... - """; - - final String step4 = """ - 🟢 {0} public projects found. - 🟢 {1} merge requests found. - 🟢 {2} pipelines found. - 🔘 Scanning threads in merge requests. - ⌛ Wait... - """; - - final String finalAnswer = """ - 🟢 {0} public projects found. - 🟢 {1} merge requests found. - 🟢 {2} pipelines found. - 🟢 {3} threads found. - """; - - return AnswerText.builder() - .triggerCheck(clickButtonRaw("YES")) - .answer(mail -> { - final String personId = mail.getPersonId(); - final String messageId = Attachments.findFirstButtonClick(mail.getAttachments()) - .map(ButtonClickAttachment::getMessageId) - .orElseThrow(); - sending.replaceMessage(personId, messageId, boxAnswer(step1)); - - final int oldCountProjects = projectService.getAllIds().size(); - - projectParser.parseAllProjectOwner(); - final Set projectIds = projectService.getAllIds(); - - projectService.notification(true, projectIds); - projectService.processing(true, projectIds); - - final int projectCount = projectIds.size() - oldCountProjects; - sending.replaceMessage(personId, messageId, boxAnswer(format(step2, projectCount))); - - final int oldCountMr = mergeRequestsService.getAllIds().size(); - mergeRequestParser.parsingNewMergeRequest(); - final int mrCount = mergeRequestsService.getAllIds().size() - oldCountMr; - sending.replaceMessage(personId, messageId, boxAnswer(format(step3, projectCount, mrCount))); - - final int oldCountPipelines = pipelineService.getAllIds().size(); - - pipelineParser.scanNewPipeline(); - final int pipelineCount = pipelineService.getAllIds().size() - oldCountPipelines; - sending.replaceMessage(personId, messageId, boxAnswer(format(step4, projectCount, mrCount, pipelineCount))); - - final int oldCountThreads = discussionService.getAllIds().size(); - discussionParser.scanNewDiscussion(); - final int discussionCount = discussionService.getAllIds().size() - oldCountThreads; - - return replaceBoxAnswer(format(finalAnswer, pipelineCount, mrCount, pipelineCount, discussionCount)); - }) - .callBack( - sentBox -> scheduledExecutorService.schedule(() -> sending.deleteMessage(sentBox.getPersonId(), sentBox.getMessageId()), 10, TimeUnit.SECONDS) - ) - .next(textAutoParsePublicProject) - .build(); - } - - @Unit(CHECK_PARSE_OWNER_PROJECT_NO) - public AnswerText checkParseOwnerProjectNo( - @Unit(TEXT_AUTO_PARSE_PUBLIC_PROJECT) MainUnit textAutoParsePublicProject - ) { - return AnswerText.builder() - .triggerCheck(clickButtonRaw("NO")) - .answer(replaceBoxAnswer("Okay, I won't scan public projects.")) - .callBack( - sentBox -> scheduledExecutorService.schedule(() -> sending.deleteMessage(sentBox.getPersonId(), sentBox.getMessageId()), 10, TimeUnit.SECONDS) - ) - .next(textAutoParsePublicProject) - .build(); - } - - @Unit(TEXT_AUTO_PARSE_PUBLIC_PROJECT) - public AnswerText textAutoParsePublicProject( - @Unit(AUTO_PARSE_PUBLIC_PROJECT) MainUnit autoParsePublicProject - ) { - return AnswerText.builder() - .activeType(AFTER) - .answer( - boxAnswer( - "Do you want to enable automatic notification of new public projects available to you?", - inlineKeyBoard( - simpleLine( - simpleButton("Yes", "YES"), - simpleButton("No", "NO") - ) - ) - ) - ) - .next(autoParsePublicProject) - .build(); - } - - @Unit(AUTO_PARSE_PUBLIC_PROJECT) - public AnswerText autoParsePublicProject( @Unit(END_SETTING) MainUnit endSetting ) { return AnswerText.builder() @@ -405,9 +416,10 @@ public class InitSettingFlow { .answer(mail -> { final ButtonClickAttachment buttonClick = Attachments.findFirstButtonClick(mail.getAttachments()).orElseThrow(); if ("YES".equals(buttonClick.getRawCallBackData())) { - settingService.publicProjectScan(true); + projectParser.parseAllPrivateProject(); + settingService.privateProjectScan(true); } else { - settingService.publicProjectScan(false); + settingService.privateProjectScan(false); } }) .next(endSetting) diff --git a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/utils/UnitName.java b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/utils/UnitName.java index 9287eac..db72850 100644 --- a/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/utils/UnitName.java +++ b/telegram-bot/src/main/java/dev/struchkov/bot/gitlab/telegram/utils/UnitName.java @@ -22,8 +22,10 @@ public final class UnitName { public static final String CHECK_PARSE_OWNER_PROJECT_NO = "CHECK_PARSE_OWNER_PROJECT_NO"; public static final String TEXT_AUTO_PARSE_PRIVATE_PROJECT = "TEXT_AUTO_PARSE_PRIVATE_PROJECT"; public static final String AUTO_PARSE_PRIVATE_PROJECT = "AUTO_PARSE_PRIVATE_PROJECT"; - public static final String AUTO_PARSE_PUBLIC_PROJECT = "AUTO_PARSE_PUBLIC_PROJECT"; - public static final String TEXT_AUTO_PARSE_PUBLIC_PROJECT = "TEXT_AUTO_PARSE_PUBLIC_PROJECT"; + public static final String AUTO_PARSE_OWNER_PROJECT = "AUTO_PARSE_PUBLIC_PROJECT"; + public static final String TEXT_AUTO_PARSE_OWNER_PROJECT = "TEXT_AUTO_PARSE_OWNER_PROJECT"; + public static final String GUIDE_START = "GUIDE_START"; + public static final String TEXT_PARSER_OWNER_PROJECT = "TEXT_PARSER_OWNER_PROJECT"; // команды public static final String DELETE_MESSAGE = "DELETE_MESSAGE";