From fd7a4ab261366ab7d41351484509b2dcd315558d Mon Sep 17 00:00:00 2001 From: upagge Date: Sun, 1 Mar 2020 00:50:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B8=D0=BB=20=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D1=83=D0=B6=D0=BD=D1=8B=D0=B9=20=D0=BA=D0=BB=D0=B0?= =?UTF-8?q?=D1=81=D1=81,=20=D0=BF=D0=BE=D1=84=D0=B8=D0=BA=D1=81=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D0=B8=20=D0=B2=20=D1=81?= =?UTF-8?q?=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F=D1=85=20=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D0=B5=D0=B3=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/tsc/bitbucketbot/config/AuthProxy.java | 8 -------- src/main/java/com/tsc/bitbucketbot/utils/Message.java | 8 +++----- src/main/resources/application.yaml | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 src/main/java/com/tsc/bitbucketbot/config/AuthProxy.java diff --git a/src/main/java/com/tsc/bitbucketbot/config/AuthProxy.java b/src/main/java/com/tsc/bitbucketbot/config/AuthProxy.java deleted file mode 100644 index 502d3e3..0000000 --- a/src/main/java/com/tsc/bitbucketbot/config/AuthProxy.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.tsc.bitbucketbot.config; - -import java.net.Authenticator; - -public class AuthProxy extends Authenticator { - - -} diff --git a/src/main/java/com/tsc/bitbucketbot/utils/Message.java b/src/main/java/com/tsc/bitbucketbot/utils/Message.java index 8f671e7..61a91e6 100644 --- a/src/main/java/com/tsc/bitbucketbot/utils/Message.java +++ b/src/main/java/com/tsc/bitbucketbot/utils/Message.java @@ -10,9 +10,7 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; -import static com.tsc.bitbucketbot.domain.util.ReviewerChange.Type.DELETED; -import static com.tsc.bitbucketbot.domain.util.ReviewerChange.Type.NEW; -import static com.tsc.bitbucketbot.domain.util.ReviewerChange.Type.OLD; +import static com.tsc.bitbucketbot.domain.util.ReviewerChange.Type.*; /** * TODO: Добавить описание класса. @@ -34,7 +32,7 @@ public class Message { @NonNull public static String statusPullRequest(String name, String url, PullRequestStatus oldStatus, PullRequestStatus newStatus) { return "✏️ *Изменился статус вашего ПР*" + BREAK + - "[" + name + "](" + url + ")" + BREAK + + "[" + name + "](" + url.replace("localhost", "192.168.236.164") + ")" + BREAK + oldStatus.name() + " -> " + newStatus.name() + BREAK + "-- -- -- --" + BREAK + "\uD83D\uDCCC: #pullRequest #change" + @@ -76,7 +74,7 @@ public class Message { if (!EMPTY.equalsIgnoreCase(createMessage)) { return Optional.of( SMILE_PEN + " *Изменения ревьюверов вашего ПР*" + BREAK + - "[" + pullRequest.getName() + "](" + pullRequest.getUrl() + ")" + BREAK + + "[" + pullRequest.getName() + "](" + pullRequest.getUrl().replace("localhost", "192.168.236.164") + ")" + BREAK + createMessage + "\n-- -- -- -- --" ); diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index ff0835e..2ad64c1 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -18,7 +18,7 @@ spring: non_contextual_creation: true bitbucketbot: server-send: - url: http://193.164.149.25:8080/api/send + url: http://188.225.35.149:8080/api/send bitbucket: token: Nzg5NjUyNDQwMzk2OlA+6naQz02+GxOG0Q9li/jnsn7E url-pull-request-open: http://localhost:7990/rest/api/1.0/dashboard/pull-requests?limit=150&state=OPEN