From 2b4ae6a97c0f1d646dfa667217ccb7cca0b8cc21 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Tue, 27 Aug 2024 19:39:31 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D1=81=D1=82=D0=B0=D1=80=D1=82=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 4 +++- .../dev/struchkov/sdk/gitlab/core/GitlabSdkManager.java | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1ecede4..30957b1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,6 +26,8 @@ steps: commands: - echo "$MAVEN_SETTINGS" >> maven-settings.xml - mvn --settings maven-settings.xml -U -P snapshot clean deploy + - cd gitlab-sdk-spring-boot-starter + - mvn --settings maven-settings.xml -U -P snapshot clean deploy image_pull_secrets: - DOCKER_AUTH @@ -109,6 +111,6 @@ image_pull_secrets: # drone sign --save SDK/gitlab-sdk --- kind: signature -hmac: 40b1cf1fb637bef3db3b5ee8601533a2977c8c5bb170e5e6a835efe9e20ad135 +hmac: 8ef322047a285af628c062c970ae0963e04fc2ee843345ef4587cff7f020e7d4 ... diff --git a/gitlab-core/src/main/java/dev/struchkov/sdk/gitlab/core/GitlabSdkManager.java b/gitlab-core/src/main/java/dev/struchkov/sdk/gitlab/core/GitlabSdkManager.java index 6727933..b5649ac 100644 --- a/gitlab-core/src/main/java/dev/struchkov/sdk/gitlab/core/GitlabSdkManager.java +++ b/gitlab-core/src/main/java/dev/struchkov/sdk/gitlab/core/GitlabSdkManager.java @@ -37,7 +37,6 @@ import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinTask; import java.util.stream.Collectors; -import static dev.struchkov.haiti.context.exception.NotFoundException.notFoundException; import static dev.struchkov.haiti.utils.concurrent.ForkJoinUtils.pullTaskResult; import static dev.struchkov.haiti.utils.concurrent.ForkJoinUtils.pullTaskResults; import static dev.struchkov.sdk.gitlab.core.client.HttpParse.ACCEPT; @@ -52,12 +51,11 @@ public class GitlabSdkManager { private final GitlabUrl gitlabUrl; private final GitlabProperty gitlabProperty; - public PersonJson getAuthPerson() { + public Optional getAuthPerson() { return HttpParse.request(gitlabUrl.getUser()) .header(ACCEPT) .header(StringUtils.H_PRIVATE_TOKEN, gitlabProperty.getAccessToken()) - .execute(PersonJson.class) - .orElseThrow(notFoundException("Пользователь не найден")); + .execute(PersonJson.class); } public Optional getPersonById(Long userId) {