разработка

This commit is contained in:
uPagge 2021-04-24 12:49:18 +03:00
parent 4ca568caf4
commit 1392326ee3
No known key found for this signature in database
GPG Key ID: 964B40928E4C9088
17 changed files with 10 additions and 87 deletions

View File

@ -1,14 +0,0 @@
<databaseChangeLog
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="2020-01-16" author="uPagge">
<insert tableName="app_setting">
<column name="id" value="1"/>
<column name="first_start" value="true"/>
<column name="language" value="EN"/>
</insert>
</changeSet>
</databaseChangeLog>

View File

@ -13,6 +13,14 @@
</createTable>
</changeSet>
<changeSet id="2020-01-16" author="uPagge">
<insert tableName="app_setting">
<column name="id" value="1"/>
<column name="first_start" value="true"/>
<column name="language" value="EN"/>
</insert>
</changeSet>
<changeSet id="2020-01-14-create-table-project" author="uPagge">
<createTable tableName="project">
<column name="id" type="int">
@ -85,7 +93,7 @@
references="person(id)"/>
</column>
<column name="assignee_id" type="int">
<constraints nullable="false" foreignKeyName="merge_request_assignee_id_person_id"
<constraints foreignKeyName="merge_request_assignee_id_person_id"
references="person(id)"/>
</column>
<column name="source_branch" type="varchar(100)">

View File

@ -4,6 +4,5 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<include file="liquibase/v.1.0.0/2021-01-14-create-tables.xml"/>
<include file="liquibase/v.1.0.0/2020-01-16-app-setting.xml"/>
</databaseChangeLog>

View File

@ -13,7 +13,7 @@
<module>telegram-bot</module>
<module>gitlab-sdk</module>
<module>bot-core</module>
<module>bot-app</module>
<module>gitlab-app</module>
<module>bot-data</module>
</modules>
@ -145,12 +145,6 @@
<version>${haiti.database.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.haiti</groupId>
<artifactId>haiti-utils</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.godfather</groupId>
<artifactId>telegram-bot</artifactId>

View File

@ -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;

View File

@ -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<Message> reviewPullRequest,
AnswerProcessing<Message> 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<Message> reviewPullRequest(
PullRequestReviewProcessing pullRequestReviewProcessing
) {
return AnswerProcessing.builder()
.processingData(pullRequestReviewProcessing)
.phrase("Нуждаются в ревью")
.build();
}
@Bean
public AnswerProcessing<Message> needWorkPullRequest(
PullRequestNeedWorkProcessing pullRequestNeedWorkProcessing
) {
return AnswerProcessing.builder()
.processingData(pullRequestNeedWorkProcessing)
.phrase("Необходимо доработать")
.build();
}
}