use of argelbargel.jenkins.plugins.gitlab_branch_source.api.filters.FilterWorkInProgress in project gitlab-branch-source-plugin by Argelbargel.
the class GitLabSCMSourceSettings method createMergeRequestFilter.
public GitLabMergeRequestFilter createMergeRequestFilter(TaskListener listener) {
GitLabMergeRequestFilter filter = GitLabMergeRequestFilter.ALLOW_NONE;
if (originMonitorStrategy.getMonitored()) {
GitLabMergeRequestFilter originFilter = new AllowMergeRequestsFromOrigin(listener);
if (originMonitorStrategy.getIgnoreWorkInProgress()) {
originFilter = originFilter.and(new FilterWorkInProgress(listener));
}
filter = filter.or(originFilter);
}
if (forksMonitorStrategy.getMonitored()) {
GitLabMergeRequestFilter forkFilter = new AllowMergeRequestsFromForks(listener);
if (forksMonitorStrategy.getIgnoreWorkInProgress()) {
forkFilter = forkFilter.and(new FilterWorkInProgress(listener));
}
filter = filter.or(forkFilter);
}
return filter;
}
Aggregations