Исправление сообщения об обновлении ПР
This commit is contained in:
parent
93deab1c3b
commit
c3b20d026e
@ -24,6 +24,7 @@ import org.springframework.core.convert.ConversionService;
|
|||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -165,10 +166,7 @@ public class SchedulerPullRequest {
|
|||||||
.forEach(user -> messageSendService.add(
|
.forEach(user -> messageSendService.add(
|
||||||
MessageSend.builder()
|
MessageSend.builder()
|
||||||
.telegramId(user.getTelegramId())
|
.telegramId(user.getTelegramId())
|
||||||
.message(Message.updatePullRequest(
|
.message(message)
|
||||||
newPullRequest.getName(),
|
|
||||||
newPullRequest.getUrl(),
|
|
||||||
newPullRequest.getAuthor().getLogin()))
|
|
||||||
.build())
|
.build())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -190,9 +188,9 @@ public class SchedulerPullRequest {
|
|||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
private Optional<String> changeVersionPr(PullRequest pullRequest, PullRequest newPullRequest) {
|
private Optional<String> changeVersionPr(PullRequest pullRequest, PullRequest newPullRequest) {
|
||||||
Integer oldVersion = pullRequest.getVersion();
|
LocalDate oldDate = pullRequest.getUpdateDate();
|
||||||
Integer newVersion = newPullRequest.getVersion();
|
LocalDate newDate = newPullRequest.getUpdateDate();
|
||||||
if (!oldVersion.equals(newVersion)) {
|
if (!oldDate.isEqual(newDate)) {
|
||||||
return Optional.of(
|
return Optional.of(
|
||||||
Message.updatePullRequest(
|
Message.updatePullRequest(
|
||||||
newPullRequest.getName(),
|
newPullRequest.getName(),
|
||||||
|
Loading…
Reference in New Issue
Block a user