From 1392326ee394a2095b5c3cc0b919185954665889 Mon Sep 17 00:00:00 2001 From: uPagge Date: Sat, 24 Apr 2021 12:49:18 +0300 Subject: [PATCH] =?UTF-8?q?=D1=80=D0=B0=D0=B7=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v.1.0.0/2020-01-16-app-setting.xml | 14 ----- {bot-app => gitlab-app}/Dockerfile | 0 {bot-app => gitlab-app}/pom.xml | 0 .../gitlab/app/BitbucketbotApplication.java | 0 .../bot/gitlab/app/config/AppConfig.java | 0 .../property/CommentSchedulerProperty.java | 0 .../scheduler/CommentAndTaskScheduler.java | 0 .../app/scheduler/SchedulerService.java | 0 .../src/main/resources/application.yaml | 0 .../main/resources/liquibase/change-log.xml | 0 .../v.1.0.0/2021-01-14-create-tables.xml | 10 ++- .../liquibase/v.1.0.0/cumulative.xml | 1 - .../src/main/resources/messages_en.properties | 0 .../src/main/resources/messages_ru.properties | 0 pom.xml | 8 +-- .../telegram/config/TelegramBotConfig.java | 1 - .../telegram/unit/PullRequestUnitConfig.java | 63 ------------------- 17 files changed, 10 insertions(+), 87 deletions(-) delete mode 100644 bot-app/src/main/resources/liquibase/v.1.0.0/2020-01-16-app-setting.xml rename {bot-app => gitlab-app}/Dockerfile (100%) rename {bot-app => gitlab-app}/pom.xml (100%) rename {bot-app => gitlab-app}/src/main/java/org/sadtech/bot/gitlab/app/BitbucketbotApplication.java (100%) rename {bot-app => gitlab-app}/src/main/java/org/sadtech/bot/gitlab/app/config/AppConfig.java (100%) rename {bot-app => gitlab-app}/src/main/java/org/sadtech/bot/gitlab/app/config/property/CommentSchedulerProperty.java (100%) rename {bot-app => gitlab-app}/src/main/java/org/sadtech/bot/gitlab/app/scheduler/CommentAndTaskScheduler.java (100%) rename {bot-app => gitlab-app}/src/main/java/org/sadtech/bot/gitlab/app/scheduler/SchedulerService.java (100%) rename {bot-app => gitlab-app}/src/main/resources/application.yaml (100%) rename {bot-app => gitlab-app}/src/main/resources/liquibase/change-log.xml (100%) rename {bot-app => gitlab-app}/src/main/resources/liquibase/v.1.0.0/2021-01-14-create-tables.xml (96%) rename {bot-app => gitlab-app}/src/main/resources/liquibase/v.1.0.0/cumulative.xml (84%) rename {bot-app => gitlab-app}/src/main/resources/messages_en.properties (100%) rename {bot-app => gitlab-app}/src/main/resources/messages_ru.properties (100%) delete mode 100644 telegram-bot/src/main/java/org/sadtech/bot/gitlab/telegram/unit/PullRequestUnitConfig.java diff --git a/bot-app/src/main/resources/liquibase/v.1.0.0/2020-01-16-app-setting.xml b/bot-app/src/main/resources/liquibase/v.1.0.0/2020-01-16-app-setting.xml deleted file mode 100644 index 45603cc..0000000 --- a/bot-app/src/main/resources/liquibase/v.1.0.0/2020-01-16-app-setting.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/bot-app/Dockerfile b/gitlab-app/Dockerfile similarity index 100% rename from bot-app/Dockerfile rename to gitlab-app/Dockerfile diff --git a/bot-app/pom.xml b/gitlab-app/pom.xml similarity index 100% rename from bot-app/pom.xml rename to gitlab-app/pom.xml diff --git a/bot-app/src/main/java/org/sadtech/bot/gitlab/app/BitbucketbotApplication.java b/gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/BitbucketbotApplication.java similarity index 100% rename from bot-app/src/main/java/org/sadtech/bot/gitlab/app/BitbucketbotApplication.java rename to gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/BitbucketbotApplication.java diff --git a/bot-app/src/main/java/org/sadtech/bot/gitlab/app/config/AppConfig.java b/gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/config/AppConfig.java similarity index 100% rename from bot-app/src/main/java/org/sadtech/bot/gitlab/app/config/AppConfig.java rename to gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/config/AppConfig.java diff --git a/bot-app/src/main/java/org/sadtech/bot/gitlab/app/config/property/CommentSchedulerProperty.java b/gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/config/property/CommentSchedulerProperty.java similarity index 100% rename from bot-app/src/main/java/org/sadtech/bot/gitlab/app/config/property/CommentSchedulerProperty.java rename to gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/config/property/CommentSchedulerProperty.java diff --git a/bot-app/src/main/java/org/sadtech/bot/gitlab/app/scheduler/CommentAndTaskScheduler.java b/gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/scheduler/CommentAndTaskScheduler.java similarity index 100% rename from bot-app/src/main/java/org/sadtech/bot/gitlab/app/scheduler/CommentAndTaskScheduler.java rename to gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/scheduler/CommentAndTaskScheduler.java diff --git a/bot-app/src/main/java/org/sadtech/bot/gitlab/app/scheduler/SchedulerService.java b/gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/scheduler/SchedulerService.java similarity index 100% rename from bot-app/src/main/java/org/sadtech/bot/gitlab/app/scheduler/SchedulerService.java rename to gitlab-app/src/main/java/org/sadtech/bot/gitlab/app/scheduler/SchedulerService.java diff --git a/bot-app/src/main/resources/application.yaml b/gitlab-app/src/main/resources/application.yaml similarity index 100% rename from bot-app/src/main/resources/application.yaml rename to gitlab-app/src/main/resources/application.yaml diff --git a/bot-app/src/main/resources/liquibase/change-log.xml b/gitlab-app/src/main/resources/liquibase/change-log.xml similarity index 100% rename from bot-app/src/main/resources/liquibase/change-log.xml rename to gitlab-app/src/main/resources/liquibase/change-log.xml diff --git a/bot-app/src/main/resources/liquibase/v.1.0.0/2021-01-14-create-tables.xml b/gitlab-app/src/main/resources/liquibase/v.1.0.0/2021-01-14-create-tables.xml similarity index 96% rename from bot-app/src/main/resources/liquibase/v.1.0.0/2021-01-14-create-tables.xml rename to gitlab-app/src/main/resources/liquibase/v.1.0.0/2021-01-14-create-tables.xml index 73153e9..2979703 100644 --- a/bot-app/src/main/resources/liquibase/v.1.0.0/2021-01-14-create-tables.xml +++ b/gitlab-app/src/main/resources/liquibase/v.1.0.0/2021-01-14-create-tables.xml @@ -13,6 +13,14 @@ + + + + + + + + @@ -85,7 +93,7 @@ references="person(id)"/> - diff --git a/bot-app/src/main/resources/liquibase/v.1.0.0/cumulative.xml b/gitlab-app/src/main/resources/liquibase/v.1.0.0/cumulative.xml similarity index 84% rename from bot-app/src/main/resources/liquibase/v.1.0.0/cumulative.xml rename to gitlab-app/src/main/resources/liquibase/v.1.0.0/cumulative.xml index f4fa8c2..15252f0 100644 --- a/bot-app/src/main/resources/liquibase/v.1.0.0/cumulative.xml +++ b/gitlab-app/src/main/resources/liquibase/v.1.0.0/cumulative.xml @@ -4,6 +4,5 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> - \ No newline at end of file diff --git a/bot-app/src/main/resources/messages_en.properties b/gitlab-app/src/main/resources/messages_en.properties similarity index 100% rename from bot-app/src/main/resources/messages_en.properties rename to gitlab-app/src/main/resources/messages_en.properties diff --git a/bot-app/src/main/resources/messages_ru.properties b/gitlab-app/src/main/resources/messages_ru.properties similarity index 100% rename from bot-app/src/main/resources/messages_ru.properties rename to gitlab-app/src/main/resources/messages_ru.properties diff --git a/pom.xml b/pom.xml index 05b5551..82d9251 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ telegram-bot gitlab-sdk bot-core - bot-app + gitlab-app bot-data @@ -145,12 +145,6 @@ ${haiti.database.version} - - org.sadtech.haiti - haiti-utils - 1.0-SNAPSHOT - - org.sadtech.bot.godfather telegram-bot diff --git a/telegram-bot/src/main/java/org/sadtech/bot/gitlab/telegram/config/TelegramBotConfig.java b/telegram-bot/src/main/java/org/sadtech/bot/gitlab/telegram/config/TelegramBotConfig.java index ea3f9be..9fe89ff 100644 --- a/telegram-bot/src/main/java/org/sadtech/bot/gitlab/telegram/config/TelegramBotConfig.java +++ b/telegram-bot/src/main/java/org/sadtech/bot/gitlab/telegram/config/TelegramBotConfig.java @@ -15,7 +15,6 @@ import org.sadtech.social.core.service.MailService; import org.sadtech.social.core.service.MessageService; import org.sadtech.social.core.service.impl.MailServiceImpl; import org.sadtech.social.core.service.sender.Sending; -import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableScheduling; diff --git a/telegram-bot/src/main/java/org/sadtech/bot/gitlab/telegram/unit/PullRequestUnitConfig.java b/telegram-bot/src/main/java/org/sadtech/bot/gitlab/telegram/unit/PullRequestUnitConfig.java deleted file mode 100644 index 192e34b..0000000 --- a/telegram-bot/src/main/java/org/sadtech/bot/gitlab/telegram/unit/PullRequestUnitConfig.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.sadtech.bot.gitlab.telegram.unit; - -import org.sadtech.bot.gitlab.telegram.service.unit.pullrequest.PullRequestNeedWorkProcessing; -import org.sadtech.bot.gitlab.telegram.service.unit.pullrequest.PullRequestReviewProcessing; -import org.sadtech.social.bot.domain.unit.AnswerProcessing; -import org.sadtech.social.bot.domain.unit.AnswerText; -import org.sadtech.social.core.domain.BoxAnswer; -import org.sadtech.social.core.domain.content.Message; -import org.sadtech.social.core.utils.KeyBoards; -import org.springframework.context.annotation.Bean; - -/** - * // TODO: 02.10.2020 Добавить описание. - * - * @author upagge 02.10.2020 - */ -//@Configuration -public class PullRequestUnitConfig { - - @Bean - public AnswerText menuPullRequest( - AnswerProcessing reviewPullRequest, - AnswerProcessing needWorkPullRequest - ) { - return AnswerText.builder() - .boxAnswer(message -> - BoxAnswer.builder() - .message("Эта вкладка для работы с Pull Request") - .keyBoard( - KeyBoards.verticalMenuString( - "Нуждаются в ревью", - "Необходимо доработать" - ) - ) - .build() - ) - .phrase("Pull Requests") - .nextUnit(reviewPullRequest) - .nextUnit(needWorkPullRequest) - .build(); - } - - @Bean - public AnswerProcessing reviewPullRequest( - PullRequestReviewProcessing pullRequestReviewProcessing - ) { - return AnswerProcessing.builder() - .processingData(pullRequestReviewProcessing) - .phrase("Нуждаются в ревью") - .build(); - } - - @Bean - public AnswerProcessing needWorkPullRequest( - PullRequestNeedWorkProcessing pullRequestNeedWorkProcessing - ) { - return AnswerProcessing.builder() - .processingData(pullRequestNeedWorkProcessing) - .phrase("Необходимо доработать") - .build(); - } - -}