From dc140145d692a7365c4e6067e66312c04c0779eb Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Tue, 6 Dec 2022 09:46:31 +0100 Subject: [PATCH] Fix regression with doc dir rename --- project/ValidatePullRequest.scala | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/project/ValidatePullRequest.scala b/project/ValidatePullRequest.scala index 510673a7dc..6967041276 100644 --- a/project/ValidatePullRequest.scala +++ b/project/ValidatePullRequest.scala @@ -39,7 +39,19 @@ object PekkoValidatePullRequest extends AutoPlugin { }, additionalTasks := Seq.empty) override lazy val buildSettings = Seq( - validatePullRequest / includeFilter := PathGlobFilter("akka-*/**"), + validatePullRequest / includeFilter := { + val ignoredProjects = List( + "pekko", // This is the root project + "serialVersionRemoverPlugin") + + loadedBuild.value.allProjectRefs.collect { + case (_, project) if !ignoredProjects.contains(project.id) => + val directory = project.base.getPath.split(System.getProperty("file.separator")).last + PathGlobFilter(s"$directory/**") + }.fold(new FileFilter { // TODO: Replace with FileFilter.nothing when https://github.com/sbt/io/pull/340 gets released + override def accept(pathname: File): Boolean = false + })(_ || _) + }, validatePullRequestBuildAll / excludeFilter := PathGlobFilter("project/MiMa.scala"), prValidatorGithubRepository := Some("akka/akka"), prValidatorTargetBranch := "origin/main")