From ed8a20b5b51d93c315221b77ec40fc6c5a926fb8 Mon Sep 17 00:00:00 2001
From: Troy Coutu <Autre31415@gmail.com>
Date: Mon, 12 Jun 2017 15:05:09 -0400
Subject: [PATCH] Add gitlab api v4 support to getPr (#295)

---
 lib/api/gitlab.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/api/gitlab.js b/lib/api/gitlab.js
index 2a27bac6d0..ce1004c870 100644
--- a/lib/api/gitlab.js
+++ b/lib/api/gitlab.js
@@ -134,7 +134,7 @@ async function getBranchPr(branchName) {
   if (!pr) {
     return null;
   }
-  return getPr(pr.id);
+  return getPr(config.apiVersion === 'v3' ? pr.id : pr.iid);
 }
 
 // Returns the combined status for a branch.
-- 
GitLab