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 { ...@@ -14,9 +14,10 @@ export default {
iid: mergeRequest.iid, iid: mergeRequest.iid,
title: mergeRequest.title, title: mergeRequest.title,
projectId: mergeRequest.project_id, projectId: mergeRequest.project_id,
projectPathWithNamespace: mergeRequest.web_url projectPathWithNamespace: mergeRequest.references.full.replace(
.replace(`${gon.gitlab_url}/`, '') mergeRequest.references.short,
.replace(`/merge_requests/${mergeRequest.iid}`, ''), '',
),
})); }));
}, },
[types.RESET_MERGE_REQUESTS](state) { [types.RESET_MERGE_REQUESTS](state) {
......
...@@ -165,7 +165,11 @@ export const mergeRequests = [ ...@@ -165,7 +165,11 @@ export const mergeRequests = [
iid: 1, iid: 1,
title: 'Test merge request', title: 'Test merge request',
project_id: 1, 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