From f5f8aa7ac1479ebd03fef27d50f2869c1a5afdc0 Mon Sep 17 00:00:00 2001 From: aknysh Date: Wed, 24 Oct 2018 23:45:27 -0400 Subject: [PATCH] Add detection of submodule changes --- server/events/project_finder.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/events/project_finder.go b/server/events/project_finder.go index 1b45f90a34..3c6bfa70e2 100644 --- a/server/events/project_finder.go +++ b/server/events/project_finder.go @@ -111,6 +111,15 @@ func (p *DefaultProjectFinder) DetermineProjectsViaConfig(log *logging.SimpleLog log.Debug("project at dir %q not included because dir does not exist", project.Dir) } break + } else { + // If no match, check if it's a directory. + // If it is, it's a submodule that was modified + fileInfo, err := os.Stat(filepath.Join(repoDir, file)) + if err == nil && fileInfo.IsDir() { + log.Debug("file %q is a submodule", file) + projects = append(projects, project) + break + } } } }