Skip to content

Commit 7a7feba

Browse files
authored
Merge 20c32ae into f6feb92
2 parents f6feb92 + 20c32ae commit 7a7feba

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

plugins/src/main/java/com/google/firebase/gradle/plugins/ci/AffectedProjectFinder.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import com.google.common.collect.ImmutableSet;
1818
import com.google.common.io.CharStreams;
19+
import com.google.common.io.Files;
1920
import java.io.File;
2021
import java.io.IOException;
2122
import java.io.InputStreamReader;
@@ -39,6 +40,8 @@ public AffectedProjectFinder(Project project, List<Pattern> ignorePaths) {
3940
this(project, changedPaths(project.getRootDir()), ignorePaths);
4041
}
4142

43+
private static final Set<String> DOC_EXTENSIONS = ImmutableSet.of("md", "txt", "html");
44+
4245
public AffectedProjectFinder(
4346
Project project, Set<String> changedPaths, List<Pattern> ignorePaths) {
4447
this.project = project;
@@ -53,9 +56,17 @@ public AffectedProjectFinder(
5356
}
5457
return true;
5558
})
59+
.filter(p -> !isDocFile(p))
5660
.collect(Collectors.toSet());
5761
}
5862

63+
private static boolean isDocFile(String path) {
64+
if (path.startsWith("docs/")) {
65+
return true;
66+
}
67+
return DOC_EXTENSIONS.contains(Files.getFileExtension(path));
68+
}
69+
5970
Set<Project> find() {
6071
Set<String> paths = new HashSet<>(changedPaths);
6172
Set<Project> projects = changedSubProjects(project, paths);

0 commit comments

Comments
 (0)