Переименовал проперти pull-request в merge-request

This commit is contained in:
Struchkov Mark 2022-12-20 14:04:52 +03:00
parent 5f3f6749d4
commit 5838169529
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
3 changed files with 10 additions and 10 deletions

View File

@ -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;

View File

@ -130,7 +130,7 @@ public class MergeRequestParser {
*/
private List<MergeRequestJson> getMergeRequests(Set<Long> projectIds) {
final List<ForkJoinTask<List<MergeRequestJson>>> 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<MergeRequestJson> 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())

View File

@ -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