Переименовал проперти pull-request в merge-request
This commit is contained in:
parent
5f3f6749d4
commit
5838169529
@ -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;
|
private String urlProject;
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ public class MergeRequestParser {
|
|||||||
*/
|
*/
|
||||||
private List<MergeRequestJson> getMergeRequests(Set<Long> projectIds) {
|
private List<MergeRequestJson> getMergeRequests(Set<Long> projectIds) {
|
||||||
final List<ForkJoinTask<List<MergeRequestJson>>> tasks = projectIds.stream()
|
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)
|
.map(forkJoinPool::submit)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ public class MergeRequestParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Optional<MergeRequestJson> getMergeRequest(IdAndStatusPr existId) {
|
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)
|
return HttpParse.request(mrUrl)
|
||||||
.header(ACCEPT)
|
.header(ACCEPT)
|
||||||
.header(StringUtils.H_PRIVATE_TOKEN, personProperty.getToken())
|
.header(StringUtils.H_PRIVATE_TOKEN, personProperty.getToken())
|
||||||
|
@ -36,10 +36,10 @@ gitlab-bot:
|
|||||||
base-url: ${GITLAB_URL}
|
base-url: ${GITLAB_URL}
|
||||||
replaceUrl: ${GITLAB_REPLACE_URL}
|
replaceUrl: ${GITLAB_REPLACE_URL}
|
||||||
url-project: ${GITLAB_URL}/api/v4/projects?page={0, number, integer}&per_page=100
|
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-merge-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-merge-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-merge-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: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}"
|
||||||
url-merge-request-add: "${GITLAB_URL}/api/v4/projects/"
|
url-merge-request-add: "${GITLAB_URL}/api/v4/projects/"
|
||||||
user-url: ${GITLAB_URL}/api/v4/user
|
user-url: ${GITLAB_URL}/api/v4/user
|
||||||
users-url: ${GITLAB_URL}/api/v4/users
|
users-url: ${GITLAB_URL}/api/v4/users
|
||||||
|
Loading…
Reference in New Issue
Block a user