direct: add a repo with branch but no submodule

This commit is contained in:
2025-11-03 16:21:15 +01:00
parent 93c970d0dd
commit 736769d630
+4 -1
View File
@@ -187,7 +187,10 @@ func processConfiguredPushAction(action *common.PushWebhookEvent, config *common
return
}
if stat, err := os.Stat(filepath.Join(git.GetPath(), gitPrj, action.Repository.Name)); err != nil || !stat.IsDir(){
if stat, err := os.Stat(filepath.Join(git.GetPath(), gitPrj, action.Repository.Name)); err != nil {
git.GitExecOrPanic(gitPrj, "submodule", "--quiet", "add", "--depth", "1", action.Repository.Clone_Url, action.Repository.Name)
common.LogDebug("Pushed to package that is not part of the project. Re-adding...", err)
} else if !stat.IsDir() {
common.LogError("Pushed to a package that is not a submodule but exists in the project. Ignoring.")
return
}