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) {