доработки

This commit is contained in:
uPagge 2020-11-15 20:39:35 +03:00
parent 61510d9bbb
commit 27e477b24a
No known key found for this signature in database
GPG Key ID: A76EB343414E022E
18 changed files with 129 additions and 112 deletions

View File

@ -3,27 +3,20 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>bitbucketbot</artifactId>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bitbucketbot</artifactId>
<version>3.0.0-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>bitbucket-app</artifactId>
<version>${org.sadtech.bot.bitbucket-app.version}</version>
<version>${sadtech.bitbucketbot.app.version}</version>
<dependencies>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bitbucketbot-core</artifactId>
<version>3.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bitbucketbot-data</artifactId>
<version>3.0.1-SNAPSHOT</version>
</dependency>
<dependency>
@ -31,6 +24,11 @@
<artifactId>bot-core</artifactId>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bitbucketbot-data</artifactId>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bot-rest</artifactId>

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>bitbucket-sdk</artifactId>
<version>${org.sadtech.bot.bitbucket-sdk.version}</version>
<version>${sadtech.bitbucketbot.bitbucket.sdk.version}</version>
<dependencies>
<dependency>

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>bitbucketbot-context</artifactId>
<version>${org.sadtech.bot.bitbucket-context.version}</version>
<version>${sadtech.bitbucketbot.context.version}</version>
<dependencies>
<dependency>
@ -25,7 +25,7 @@
<dependency>
<groupId>org.sadtech.haiti.filter</groupId>
<artifactId>criteria-filter</artifactId>
<artifactId>haiti-filter-criteria</artifactId>
</dependency>
<dependency>

View File

@ -8,7 +8,7 @@ import org.sadtech.bot.vsc.bitbucketbot.context.domain.filter.PullRequestFilter;
import org.sadtech.bot.vsc.context.domain.PullRequestStatus;
import org.sadtech.bot.vsc.context.domain.ReviewerStatus;
import org.sadtech.haiti.context.service.SimpleManagerService;
import org.sadtech.haiti.context.service.simple.FilterService;
import org.sadtech.haiti.filter.FilterService;
import java.util.List;
import java.util.Optional;

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>bitbucketbot-core</artifactId>
<version>${org.sadtech.bot.bitbucket-context.version}</version>
<version>${sadtech.bitbucketbot.context.version}</version>
<dependencies>
<dependency>
@ -36,7 +36,6 @@
<dependency>
<groupId>org.sadtech.bot.vcs</groupId>
<artifactId>vcs-bot-context</artifactId>
<version>0.0.1-DEVELOP</version>
</dependency>
<dependency>

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>bitbucketbot-data</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>${sadtech.bitbucketbot.data.version}</version>
<dependencies>
<dependency>
@ -22,7 +22,7 @@
<artifactId>spring-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.sadtech.haiti</groupId>
<groupId>org.sadtech.haiti.data</groupId>
<artifactId>haiti-database</artifactId>
</dependency>
</dependencies>

View File

@ -3,19 +3,19 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>bitbucketbot</artifactId>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bitbucketbot</artifactId>
<version>3.0.0-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>bot-core</artifactId>
<version>${org.sadtech.bot-core.version}</version>
<version>${sadtech.bitbucketbot.core.version}</version>
<dependencies>
<dependency>
<groupId>org.sadtech.haiti.filter</groupId>
<artifactId>criteria-filter</artifactId>
<artifactId>haiti-filter-criteria</artifactId>
</dependency>
<dependency>
@ -24,7 +24,7 @@
</dependency>
<dependency>
<groupId>org.sadtech.haiti</groupId>
<groupId>org.sadtech.haiti.data</groupId>
<artifactId>haiti-database</artifactId>
</dependency>

View File

@ -26,9 +26,9 @@ import org.sadtech.bot.vsc.context.domain.PullRequestStatus;
import org.sadtech.bot.vsc.context.domain.ReviewerStatus;
import org.sadtech.haiti.context.page.Pagination;
import org.sadtech.haiti.context.page.Sheet;
import org.sadtech.haiti.context.service.simple.FilterService;
import org.sadtech.haiti.core.service.AbstractSimpleManagerService;
import org.sadtech.haiti.core.util.Assert;
import org.sadtech.haiti.filter.FilterService;
import org.sadtech.haiti.filter.criteria.CriteriaFilter;
import org.sadtech.haiti.filter.criteria.CriteriaQuery;
import org.springframework.beans.factory.annotation.Qualifier;
@ -333,13 +333,8 @@ public class PullRequestsServiceImpl extends AbstractSimpleManagerService<PullRe
}
@Override
public List<PullRequest> getAll(@NonNull PullRequestFilter filter) {
return filterService.getAll(filter);
}
@Override
public Optional<PullRequest> getFirst(@NonNull PullRequestFilter filter) {
return filterService.getFirst(filter);
public Optional<PullRequest> getFirst(@NonNull PullRequestFilter pullRequestFilter) {
return filterService.getFirst(pullRequestFilter);
}
@Override
@ -347,6 +342,11 @@ public class PullRequestsServiceImpl extends AbstractSimpleManagerService<PullRe
return filterService.exists(filter);
}
@Override
public long count(@NonNull PullRequestFilter pullRequestFilter) {
return filterService.count(pullRequestFilter);
}
protected PullRequest findAndFillId(@NonNull PullRequest pullRequest) {
return pullRequestsRepository.findFirst(
CriteriaFilter.create().and(

View File

@ -32,5 +32,4 @@ public class PullRequestFilterService extends AbstractFilterService<PullRequest,
.matchPhrase(PullRequest_.BITBUCKET_ID, filter.getBitbucketId())
.matchPhrase(PullRequest_.REPOSITORY_ID, filter.getBitbucketRepositoryId());
}
}

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>bot-rest</artifactId>
<version>${org.sadtech.bot.rest.version}</version>
<version>${sadtech.bitbucketbot.rest.version}</version>
<dependencies>
<dependency>

146
pom.xml
View File

@ -30,22 +30,23 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<org.sadtech.bot.bitbucket-app.version>3.0.0-RELEASE</org.sadtech.bot.bitbucket-app.version>
<org.sadtech.bot-core.version>3.0.0-RELEASE</org.sadtech.bot-core.version>
<org.sadtech.bot.teamcity-core.version>3.0.0-RELEASE</org.sadtech.bot.teamcity-core.version>
<org.sadtech.bot.teamcity-sdk.version>3.0.0-RELEASE</org.sadtech.bot.teamcity-sdk.version>
<org.sadtech.bot.bitbucket-sdk.version>3.0.0-RELEASE</org.sadtech.bot.bitbucket-sdk.version>
<org.sadtech.bot.bitbucket-context.version>3.0.0-RELEASE</org.sadtech.bot.bitbucket-context.version>
<org.sadtech.bot.rest.version>3.0.0-RELEASE</org.sadtech.bot.rest.version>
<org.sadtech.bot.telegram.version>3.0.0-RELEASE</org.sadtech.bot.telegram.version>
<sadtech.bitbucketbot.core.version>3.0.0-RELEASE</sadtech.bitbucketbot.core.version>
<sadtech.bitbucketbot.app.version>3.0.0-RELEASE</sadtech.bitbucketbot.app.version>
<sadtech.bitbucketbot.teamcity.version>3.0.0-RELEASE</sadtech.bitbucketbot.teamcity.version>
<sadtech.bitbucketbot.teamcity.core.version>3.0.0-RELEASE</sadtech.bitbucketbot.teamcity.core.version>
<sadtech.bitbucketbot.teamcity.sdk.version>3.0.0-RELEASE</sadtech.bitbucketbot.teamcity.sdk.version>
<sadtech.bitbucketbot.bitbucket.sdk.version>3.0.0-RELEASE</sadtech.bitbucketbot.bitbucket.sdk.version>
<sadtech.bitbucketbot.context.version>3.0.0-RELEASE</sadtech.bitbucketbot.context.version>
<sadtech.bitbucketbot.data.version>3.0.0-RELEASE</sadtech.bitbucketbot.data.version>
<sadtech.bitbucketbot.rest.version>3.0.0-RELEASE</sadtech.bitbucketbot.rest.version>
<sadtech.bitbucketbot.telegram.version>3.0.0-RELEASE</sadtech.bitbucketbot.telegram.version>
<sadtech.bitbucketbot.core.version>3.0.0-RELEASE</sadtech.bitbucketbot.core.version>
<org.sadtech.haiti.context.version>0.0.1-SNAPSHOT</org.sadtech.haiti.context.version>
<org.sadtech.haiti.filter.version>0.0.1-SNAPSHOT</org.sadtech.haiti.filter.version>
<org.sadtech.telegram.bot-core.version>0.0.1-DEVELOPER</org.sadtech.telegram.bot-core.version>
<org.sadtech.bot.vsc.context.version>0.0.1-DEVELOP</org.sadtech.bot.vsc.context.version>
<org.sadtech.haiti.database.version>0.0.1-SNAPSHOT</org.sadtech.haiti.database.version>
<sadtech.project.filter.criteria.version>0.1.0-SNAPSHOT</sadtech.project.filter.criteria.version>
<haiti.context.version>0.0.1-RELEASE</haiti.context.version>
<haiti.database.version>0.0.1-RELEASE</haiti.database.version>
<haiti.filter.criteria.version>0.0.1-RELEASE</haiti.filter.criteria.version>
<sadtech.bot.telegram.core.version>0.0.1-RELEASE</sadtech.bot.telegram.core.version>
<sadtech.bot.vsc.context.version>0.0.1-DEVELOP</sadtech.bot.vsc.context.version>
<javax.persistance.version>2.2</javax.persistance.version>
@ -56,114 +57,143 @@
<dependencyManagement>
<dependencies>
<!-- абстракции -->
<dependency>
<groupId>org.sadtech.bot.vcs</groupId>
<artifactId>vcs-bot-context</artifactId>
<version>${sadtech.bot.vsc.context.version}</version>
</dependency>
<!-- /абстракции -->
<!-- модули проекта -->
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bot-rest</artifactId>
<version>${org.sadtech.bot.rest.version}</version>
<artifactId>bitbucketbot-core</artifactId>
<version>${sadtech.bitbucketbot.core.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>telegram-bot</artifactId>
<version>${org.sadtech.bot.telegram.version}</version>
<artifactId>bot-rest</artifactId>
<version>${sadtech.bitbucketbot.rest.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bot-core</artifactId>
<version>${org.sadtech.bot-core.version}</version>
<version>${sadtech.bitbucketbot.core.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>telegram-bot</artifactId>
<version>${sadtech.bitbucketbot.telegram.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>teamcity-sdk</artifactId>
<version>${org.sadtech.bot.teamcity-sdk.version}</version>
<version>${sadtech.bitbucketbot.teamcity.sdk.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bitbucketbot-context</artifactId>
<version>${org.sadtech.bot.bitbucket-context.version}</version>
<version>${sadtech.bitbucketbot.context.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bitbucket-sdk</artifactId>
<version>${org.sadtech.bot.bitbucket-sdk.version}</version>
<version>${sadtech.bitbucketbot.bitbucket.sdk.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>teamcity-core</artifactId>
<version>${org.sadtech.bot.teamcity-core.version}</version>
<version>${sadtech.bitbucketbot.teamcity.core.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.basic.filter</groupId>
<artifactId>criteria-filter</artifactId>
<version>${sadtech.project.filter.criteria.version}</version>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bitbucketbot-data</artifactId>
<version>${sadtech.bitbucketbot.data.version}</version>
</dependency>
<!-- /модули проекта -->
<!-- SADTECH -->
<dependency>
<groupId>org.sadtech.haiti</groupId>
<groupId>org.sadtech.haiti.data</groupId>
<artifactId>haiti-database</artifactId>
<version>${org.sadtech.haiti.database.version}</version>
<version>${haiti.database.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.telegram</groupId>
<groupId>org.sadtech.bot.godfather</groupId>
<artifactId>telegram-bot</artifactId>
<version>${org.sadtech.telegram.bot-core.version}</version>
<version>0.0.1-RELEASE</version>
</dependency>
<dependency>
<groupId>org.sadtech.haiti</groupId>
<artifactId>haiti-context</artifactId>
<version>${org.sadtech.haiti.context.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.bot.vcs</groupId>
<artifactId>vcs-bot-context</artifactId>
<version>${org.sadtech.bot.vsc.context.version}</version>
<version>${haiti.context.version}</version>
</dependency>
<dependency>
<groupId>org.sadtech.haiti.filter</groupId>
<artifactId>criteria-filter</artifactId>
<version>${org.sadtech.haiti.filter.version}</version>
<artifactId>haiti-filter-criteria</artifactId>
<version>${haiti.filter.criteria.version}</version>
</dependency>
<!-- /SADTECH -->
<!-- БД -->
<dependency>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.jpa-modelgen.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${google.guava.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase.version}</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>${javax.persistance.version}</version>
</dependency>
<!-- /БД -->
<!-- утилиты -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${google.guava.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<!-- /утилиты -->
<!-- spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
@ -176,6 +206,9 @@
</exclusions>
</dependency>
<!-- /spring -->
<!-- http -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
@ -188,11 +221,7 @@
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>${javax.persistance.version}</version>
</dependency>
<!-- /http -->
</dependencies>
</dependencyManagement>
@ -241,7 +270,8 @@
<developer>
<id>uPagge</id>
<name>Struchkov Mark</name>
<email>upagge@mail.ru</email>
<email>upagge@ya.ru</email>
<organization>SADTECH</organization>
</developer>
</developers>

View File

@ -10,21 +10,12 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>teamcity</artifactId>
<version>${sadtech.bitbucketbot.teamcity.version}</version>
<packaging>pom</packaging>
<modules>
<module>teamcity-sdk</module>
<module>teamcity-core</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>teamcity-sdk</artifactId>
<version>${org.sadtech.bot.teamcity-sdk.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>

View File

@ -10,10 +10,9 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>teamcity-core</artifactId>
<version>${org.sadtech.bot.teamcity-core.version}</version>
<version>${sadtech.bitbucketbot.teamcity.core.version}</version>
<dependencies>
<dependency>
<groupId>org.sadtech.bot.bitbucketbot</groupId>
<artifactId>bot-core</artifactId>

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>teamcity-sdk</artifactId>
<version>${org.sadtech.bot.teamcity-sdk.version}</version>
<version>${sadtech.bitbucketbot.teamcity.sdk.version}</version>
<dependencies>
<dependency>

View File

@ -10,6 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>telegram-bot</artifactId>
<version>${sadtech.bitbucketbot.telegram.version}</version>
<dependencies>
<dependency>
@ -23,7 +24,7 @@
</dependency>
<dependency>
<groupId>org.sadtech.telegram</groupId>
<groupId>org.sadtech.bot.godfather</groupId>
<artifactId>telegram-bot</artifactId>
</dependency>
</dependencies>

View File

@ -2,6 +2,12 @@ package org.sadtech.bot.vcs.telegram.config;
import org.sadtech.autoresponder.repository.UnitPointerRepository;
import org.sadtech.autoresponder.repository.UnitPointerRepositoryMap;
import org.sadtech.bot.godfather.telegram.autoresponder.MessageAutoresponderTelegram;
import org.sadtech.bot.godfather.telegram.config.TelegramPollingConfig;
import org.sadtech.bot.godfather.telegram.listen.EventDistributor;
import org.sadtech.bot.godfather.telegram.listen.EventDistributorImpl;
import org.sadtech.bot.godfather.telegram.listen.TelegramConnect;
import org.sadtech.bot.godfather.telegram.listen.TelegramSender;
import org.sadtech.bot.vcs.telegram.service.ReplaceUrlLocalhost;
import org.sadtech.social.bot.domain.unit.AnswerCheck;
import org.sadtech.social.core.domain.content.Mail;
@ -10,12 +16,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.sadtech.telegram.bot.autoresponder.MessageAutoresponderTelegram;
import org.sadtech.telegram.bot.config.TelegramPollingConfig;
import org.sadtech.telegram.bot.listen.EventDistributor;
import org.sadtech.telegram.bot.listen.EventDistributorImpl;
import org.sadtech.telegram.bot.listen.TelegramConnect;
import org.sadtech.telegram.bot.listen.TelegramSender;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,7 +1,7 @@
package org.sadtech.bot.vcs.telegram.scheduler;
import lombok.RequiredArgsConstructor;
import org.sadtech.telegram.bot.autoresponder.MessageAutoresponderTelegram;
import org.sadtech.bot.godfather.telegram.autoresponder.MessageAutoresponderTelegram;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

View File

@ -1,6 +1,6 @@
package org.sadtech.bot.vcs.telegram.service;
import org.sadtech.telegram.bot.service.SendPreProcessing;
import org.sadtech.bot.godfather.telegram.service.SendPreProcessing;
import org.springframework.stereotype.Component;
/**