From 4a0b3cf83e5cac104f706d5fc448b69f556c5d38 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Wed, 5 Sep 2018 06:31:25 +0200
Subject: [PATCH] fix: move cleanRepo to finally

---
 lib/workers/repository/finalise/index.js | 1 -
 lib/workers/repository/index.js          | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/workers/repository/finalise/index.js b/lib/workers/repository/finalise/index.js
index 60a336b821..0ab8d4b73e 100644
--- a/lib/workers/repository/finalise/index.js
+++ b/lib/workers/repository/finalise/index.js
@@ -13,5 +13,4 @@ async function finaliseRepo(config, branchList) {
   await platform.ensureIssueClosing(
     'Action Required: Fix Renovate Configuration'
   );
-  platform.cleanRepo();
 }
diff --git a/lib/workers/repository/index.js b/lib/workers/repository/index.js
index 0fc8dd743a..a0f9e84e08 100644
--- a/lib/workers/repository/index.js
+++ b/lib/workers/repository/index.js
@@ -26,6 +26,7 @@ async function renovateRepository(repoConfig) {
   } catch (err) /* istanbul ignore next */ {
     return processResult(config, await handleError(config, err));
   } finally {
+    platform.cleanRepo();
     logger.info('Finished repository');
   }
 }
-- 
GitLab