git clone project if it doesn't exist yet in local-merge case

This commit is contained in:
Jörg Thalheim 2024-04-09 07:59:38 +02:00 committed by mergify[bot]
parent 31f16a95f8
commit 5f92033b61

View file

@ -357,6 +357,13 @@ class GitLocalPrMerge(steps.Git):
msg = "git is not installed on worker"
raise WorkerSetupError(msg)
has_git = yield self.pathExists(
self.build.path_module.join(self.workdir, ".git")
)
if not has_git:
yield self._dovccmd(["clone", "--recurse-submodules", self.repourl, "."])
patched = yield self.sourcedirIsPatched()
if patched: