Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public AffectedProjectFinder(Project project, List<Pattern> ignorePaths) {
this(project, changedPaths(project.getRootDir()), ignorePaths);
}

private static final Set<String> DOC_EXTENSIONS = ImmutableSet.of("md", "txt", "html");

public AffectedProjectFinder(
Project project, Set<String> changedPaths, List<Pattern> ignorePaths) {
this.project = project;
Expand All @@ -53,9 +55,17 @@ public AffectedProjectFinder(
}
return true;
})
.filter(p -> !isDocFile(p))
.collect(Collectors.toSet());
}

private static boolean isDocFile(String path) {
if (path.startsWith("docs/")) {
return true;
}
return DOC_EXTENSIONS.stream().anyMatch(ext -> path.endsWith("." + ext));
}

Set<Project> find() {
Set<String> paths = new HashSet<>(changedPaths);
Set<Project> projects = changedSubProjects(project, paths);
Expand Down
Loading