Commit 2cd19eb9 authored by derek-knox's avatar derek-knox

Update branch payload with web_url

parent 0dee6c6e
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
<ul> <ul>
<li> <li>
{{ s__('StaticSiteEditor|You created a new branch:') }} {{ s__('StaticSiteEditor|You created a new branch:') }}
<span ref="branchLink">{{ branch.label }}</span> <gl-link ref="branchLink" :href="branch.url">{{ branch.label }}</gl-link>
</li> </li>
<li> <li>
{{ s__('StaticSiteEditor|You created a merge request:') }} {{ s__('StaticSiteEditor|You created a merge request:') }}
......
...@@ -56,8 +56,8 @@ const submitContentChanges = ({ username, projectId, sourcePath, content }) => { ...@@ -56,8 +56,8 @@ const submitContentChanges = ({ username, projectId, sourcePath, content }) => {
const meta = {}; const meta = {};
return createBranch(projectId, branch) return createBranch(projectId, branch)
.then(() => { .then(({ data: { web_url: url } }) => {
Object.assign(meta, { branch: { label: branch } }); Object.assign(meta, { branch: { label: branch, url } });
return commitContent(projectId, mergeRequestTitle, branch, sourcePath, content); return commitContent(projectId, mergeRequestTitle, branch, sourcePath, content);
}) })
......
...@@ -51,9 +51,6 @@ describe('~/static_site_editor/components/saved_changes_message.vue', () => { ...@@ -51,9 +51,6 @@ describe('~/static_site_editor/components/saved_changes_message.vue', () => {
expect(el.exists()).toBe(true); expect(el.exists()).toBe(true);
expect(el.text()).toBe(prop.label); expect(el.text()).toBe(prop.label);
expect(el.attributes('href')).toBe(prop.url);
if (desc !== 'branch') {
expect(el.attributes('href')).toBe(prop.url);
}
}); });
}); });
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