Skip to content
Snippets Groups Projects

Fix regression introduced by the 1.0.0 upgrade

Merged Martin Lowe requested to merge malowe/git-eca-rest-api:malowe/main/1.0.0-mig into main
2 files
+ 4
1
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -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 + "/")));
}
Loading