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

Merge branch 'malowe/main/1.0.0-mig' into 'main'

Fix regression introduced by the 1.0.0 upgrade

See merge request !190
parents 5a019d05 13c17ff4
No related branches found
No related tags found
1 merge request!190Fix regression introduced by the 1.0.0 upgrade
Pipeline #44441 passed
...@@ -165,7 +165,8 @@ public final class ProjectHelper { ...@@ -165,7 +165,8 @@ public final class ProjectHelper {
* @return true if the project is a match via Gitlab repos or project namespace, false otherwise * @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) { 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 + "/"))); && p.getGitlab().getIgnoredSubGroups().stream().noneMatch(sg -> projectNamespace.startsWith(sg + "/")));
} }
......
...@@ -124,6 +124,8 @@ public class MockProjectsAPI implements ProjectsAPI { ...@@ -124,6 +124,8 @@ public class MockProjectsAPI implements ProjectsAPI {
.setIgnoredSubGroups(Arrays.asList("eclipse/dash/mirror")) .setIgnoredSubGroups(Arrays.asList("eclipse/dash/mirror"))
.setProjectGroup("eclipse/dash") .setProjectGroup("eclipse/dash")
.build()) .build())
.setGitlabRepos(
Arrays.asList(Repo.builder().setUrl("http://www.gitlab.eclipse.org/eclipsefdn/sample/repo").build()))
.setCommitters(Arrays.asList(u1, u2)) .setCommitters(Arrays.asList(u1, u2))
.setProjectLeads(Collections.emptyList()) .setProjectLeads(Collections.emptyList())
.setShortProjectId("spec.proj") .setShortProjectId("spec.proj")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment