Skip to content
Snippets Groups Projects
Commit 13c17ff4 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Fix regression introduced by the 1.0.0 upgrade

parent 8f564137
No related branches found
No related tags found
1 merge request!190Fix regression introduced by the 1.0.0 upgrade
......@@ -165,7 +165,8 @@ public final class ProjectHelper {
* @return true if the project is a match via Gitlab repos or project namespace, false otherwise
*/
private boolean doesProjectMatchGitlabRepos(Project p, String repoUrl, String projectNamespace) {
return (projectNamespace.startsWith(p.getGitlab().getProjectGroup() + "/")
return p.getGitlabRepos().stream().anyMatch(re -> re.getUrl() != null && re.getUrl().endsWith(repoUrl))
|| (projectNamespace.startsWith(p.getGitlab().getProjectGroup() + "/")
&& p.getGitlab().getIgnoredSubGroups().stream().noneMatch(sg -> projectNamespace.startsWith(sg + "/")));
}
......
......@@ -124,6 +124,8 @@ public class MockProjectsAPI implements ProjectsAPI {
.setIgnoredSubGroups(Arrays.asList("eclipse/dash/mirror"))
.setProjectGroup("eclipse/dash")
.build())
.setGitlabRepos(
Arrays.asList(Repo.builder().setUrl("http://www.gitlab.eclipse.org/eclipsefdn/sample/repo").build()))
.setCommitters(Arrays.asList(u1, u2))
.setProjectLeads(Collections.emptyList())
.setShortProjectId("spec.proj")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment