diff options
Diffstat (limited to 'app/assets/javascripts/pipeline_editor/index.js')
-rw-r--r-- | app/assets/javascripts/pipeline_editor/index.js | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/app/assets/javascripts/pipeline_editor/index.js b/app/assets/javascripts/pipeline_editor/index.js index 8268a907a29..583ba555080 100644 --- a/app/assets/javascripts/pipeline_editor/index.js +++ b/app/assets/javascripts/pipeline_editor/index.js @@ -14,7 +14,20 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => { return null; } - const { ciConfigPath, commitId, defaultBranch, newMergeRequestPath, projectPath } = el?.dataset; + const { + // props + ciConfigPath, + commitSha, + defaultBranch, + newMergeRequestPath, + + // `provide/inject` data + lintHelpPagePath, + projectFullPath, + projectPath, + projectNamespace, + ymlHelpPagePath, + } = el?.dataset; Vue.use(VueApollo); @@ -25,14 +38,20 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => { return new Vue({ el, apolloProvider, + provide: { + lintHelpPagePath, + projectFullPath, + projectPath, + projectNamespace, + ymlHelpPagePath, + }, render(h) { return h(PipelineEditorApp, { props: { ciConfigPath, - commitId, + commitSha, defaultBranch, newMergeRequestPath, - projectPath, }, }); }, |