From 45dba15b7464ee30fb76f2747a2909b49d3578f2 Mon Sep 17 00:00:00 2001
From: Michael Kriese <michael.kriese@visualon.de>
Date: Fri, 3 May 2019 07:03:38 +0200
Subject: [PATCH] fix(bitbucket-server): check for stale pr (#3625)

---
 lib/platform/bitbucket-server/index.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/platform/bitbucket-server/index.js b/lib/platform/bitbucket-server/index.js
index f8737c52cf..c2a716a558 100644
--- a/lib/platform/bitbucket-server/index.js
+++ b/lib/platform/bitbucket-server/index.js
@@ -732,6 +732,10 @@ async function getPr(prNo, refreshCache) {
     pr.canRebase = true;
   }
 
+  if (await branchExists(pr.branchName)) {
+    res.isStale = await isBranchStale(pr.branchName);
+  }
+
   return pr;
 }
 
-- 
GitLab