Commit 6a474c07 authored by Sarah Groff Hennigh-Palermo's avatar Sarah Groff Hennigh-Palermo

Merge branch 'fc-fix-template-content-not-updating-on-commit' into 'master'

Fix CI editor template not updating on commit

See merge request gitlab-org/gitlab!64029
parents 78096600 56e33f47
...@@ -152,6 +152,9 @@ export default { ...@@ -152,6 +152,9 @@ export default {
update(data) { update(data) {
return data.project?.ciTemplate?.content || ''; return data.project?.ciTemplate?.content || '';
}, },
result({ data }) {
this.updateCiConfig(data.project?.ciTemplate?.content || '');
},
error() { error() {
this.reportFailure(LOAD_FAILURE_UNKNOWN); this.reportFailure(LOAD_FAILURE_UNKNOWN);
}, },
...@@ -170,9 +173,6 @@ export default { ...@@ -170,9 +173,6 @@ export default {
isEmpty() { isEmpty() {
return this.currentCiFileContent === ''; return this.currentCiFileContent === '';
}, },
templateOrCurrentContent() {
return this.isNewCiConfigFile ? this.starterTemplate : this.currentCiFileContent;
},
}, },
i18n: { i18n: {
tabEdit: s__('Pipelines|Edit'), tabEdit: s__('Pipelines|Edit'),
...@@ -280,7 +280,7 @@ export default { ...@@ -280,7 +280,7 @@ export default {
/> />
<pipeline-editor-home <pipeline-editor-home
:ci-config-data="ciConfigData" :ci-config-data="ciConfigData"
:ci-file-content="templateOrCurrentContent" :ci-file-content="currentCiFileContent"
:is-new-ci-config-file="isNewCiConfigFile" :is-new-ci-config-file="isNewCiConfigFile"
@commit="updateOnCommit" @commit="updateOnCommit"
@resetContent="resetContent" @resetContent="resetContent"
......
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