diff --git a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/config/properties/GitlabProperty.java b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/config/properties/GitlabProperty.java index df2033c..87cc05f 100644 --- a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/config/properties/GitlabProperty.java +++ b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/config/properties/GitlabProperty.java @@ -21,22 +21,22 @@ public class GitlabProperty { /** * Адрес, по которому можно получить открытые ПР */ - private String urlPullRequestOpen; + private String urlMergeRequestOpen; /** * Адрес, по которому можно получить закрытые ПР */ - private String urlPullRequestClose; + private String urlMergeRequestClose; /** * Адрес, по которому можно получить комментарии к ПР */ - private String urlPullRequestComment; + private String urlMergeRequestComment; /** * Адрес ПР */ - private String urlPullRequest; + private String urlMergeRequest; private String urlProject; diff --git a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/parser/MergeRequestParser.java b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/parser/MergeRequestParser.java index e409b20..635b374 100644 --- a/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/parser/MergeRequestParser.java +++ b/bot-core/src/main/java/dev/struchkov/bot/gitlab/core/service/parser/MergeRequestParser.java @@ -130,7 +130,7 @@ public class MergeRequestParser { */ private List getMergeRequests(Set projectIds) { final List>> tasks = projectIds.stream() - .map(projectId -> new GetMergeRequestTask(projectId, gitlabProperty.getUrlPullRequestOpen(), personProperty.getToken())) + .map(projectId -> new GetMergeRequestTask(projectId, gitlabProperty.getUrlMergeRequestOpen(), personProperty.getToken())) .map(forkJoinPool::submit) .collect(Collectors.toList()); @@ -176,7 +176,7 @@ public class MergeRequestParser { } private Optional getMergeRequest(IdAndStatusPr existId) { - final String mrUrl = MessageFormat.format(gitlabProperty.getUrlPullRequest(), existId.getProjectId(), existId.getTwoId()); + final String mrUrl = MessageFormat.format(gitlabProperty.getUrlMergeRequest(), existId.getProjectId(), existId.getTwoId()); return HttpParse.request(mrUrl) .header(ACCEPT) .header(StringUtils.H_PRIVATE_TOKEN, personProperty.getToken()) diff --git a/gitlab-app/src/main/resources/application.yml b/gitlab-app/src/main/resources/application.yml index 5aca7a0..2abd92b 100644 --- a/gitlab-app/src/main/resources/application.yml +++ b/gitlab-app/src/main/resources/application.yml @@ -36,10 +36,10 @@ gitlab-bot: base-url: ${GITLAB_URL} replaceUrl: ${GITLAB_REPLACE_URL} url-project: ${GITLAB_URL}/api/v4/projects?page={0, number, integer}&per_page=100 - url-pull-request-open: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests?state=opened&page={1, number, integer}&per_page={2, number, integer}" - url-pull-request-close: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests?state=closed&page={1, number, integer}&per_page=100" - url-pull-request-comment: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/notes?&page={2,number,#}&per_page=100" - url-pull-request: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}" + url-merge-request-open: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests?state=opened&page={1, number, integer}&per_page={2, number, integer}" + url-merge-request-close: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests?state=closed&page={1, number, integer}&per_page=100" + url-merge-request-comment: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/notes?&page={2,number,#}&per_page=100" + url-merge-request: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}" url-merge-request-add: "${GITLAB_URL}/api/v4/projects/" user-url: ${GITLAB_URL}/api/v4/user users-url: ${GITLAB_URL}/api/v4/users