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

Update branch payload with web_url

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