This commit is contained in:
parent
855c2c0512
commit
2b4ae6a97c
@ -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
|
||||
|
||||
...
|
||||
|
@ -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<PersonJson> 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<PersonJson> getPersonById(Long userId) {
|
||||
|
Loading…
Reference in New Issue
Block a user