From 3a77664d1a550cfbedc92068926e4adae9c82b87 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Tue, 10 Jul 2018 10:35:16 +0100
Subject: Allow merge requests from forks to be opened in Web IDE

Closes #47460
---
 .../vue_merge_request_widget/components/mr_widget_header.vue        | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue')

diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
index c18b74743e4..a3b1e7d1340 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
@@ -43,7 +43,11 @@ export default {
       return this.isBranchTitleLong(this.mr.targetBranch);
     },
     webIdePath() {
-      return webIDEUrl(this.mr.statusPath.replace('.json', ''));
+      return webIDEUrl(
+        `/${this.mr.sourceProjectFullPath}/merge_requests/${this.mr.iid}?target_project=${
+          this.mr.targetProjectFullPath
+        }`,
+      );
     },
   },
   methods: {
-- 
cgit v1.2.1

