From 1aba7c79afa0b7a86f24a7edd90df7c32fcfaccc Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@keylocation.sg>
Date: Tue, 5 Dec 2017 06:17:27 +0100
Subject: [PATCH] fix: make sure lock file maintenance branch is not stale
 before skipping (#1265)

---
 lib/workers/branch/lock-files.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/workers/branch/lock-files.js b/lib/workers/branch/lock-files.js
index bfb1365a1c..1feae67a76 100644
--- a/lib/workers/branch/lock-files.js
+++ b/lib/workers/branch/lock-files.js
@@ -257,7 +257,8 @@ async function getUpdatedLockFiles(config) {
   const updatedLockFiles = [];
   if (
     config.type === 'lockFileMaintenance' &&
-    (await platform.branchExists(config.branchName))
+    (await platform.branchExists(config.branchName)) &&
+    !await platform.isBranchStale(config.branchName)
   ) {
     return { lockFileErrors, updatedLockFiles };
   }
-- 
GitLab