Commit a9b59879 authored by Phil Hughes's avatar Phil Hughes

Merge branch '200087-fix-ide-nav-mr' into 'master'

Fix URL parsing in IDE MRs

See merge request gitlab-org/gitlab!24206
parents ea1a3c69 f101d410
......@@ -14,9 +14,10 @@ export default {
iid: mergeRequest.iid,
title: mergeRequest.title,
projectId: mergeRequest.project_id,
projectPathWithNamespace: mergeRequest.web_url
.replace(`${gon.gitlab_url}/`, '')
.replace(`/merge_requests/${mergeRequest.iid}`, ''),
projectPathWithNamespace: mergeRequest.references.full.replace(
mergeRequest.references.short,
'',
),
}));
},
[types.RESET_MERGE_REQUESTS](state) {
......
......@@ -165,7 +165,11 @@ export const mergeRequests = [
iid: 1,
title: 'Test merge request',
project_id: 1,
web_url: `${TEST_HOST}/namespace/project-path/merge_requests/1`,
web_url: `${TEST_HOST}/namespace/project-path/-/merge_requests/1`,
references: {
short: '!1',
full: 'namespace/project-path!1',
},
},
];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment