summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipeline_new/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pipeline_new/index.js')
-rw-r--r--app/assets/javascripts/pipeline_new/index.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/assets/javascripts/pipeline_new/index.js b/app/assets/javascripts/pipeline_new/index.js
index 0b85184ec90..a645ea8603b 100644
--- a/app/assets/javascripts/pipeline_new/index.js
+++ b/app/assets/javascripts/pipeline_new/index.js
@@ -1,10 +1,13 @@
import Vue from 'vue';
import PipelineNewForm from './components/pipeline_new_form.vue';
-import formatRefs from './utils/format_refs';
export default () => {
const el = document.getElementById('js-new-pipeline');
const {
+ // provide/inject
+ projectRefsEndpoint,
+
+ // props
projectId,
pipelinesPath,
configVariablesPath,
@@ -12,19 +15,18 @@ export default () => {
refParam,
varParam,
fileParam,
- branchRefs,
- tagRefs,
settingsLink,
maxWarnings,
} = el?.dataset;
const variableParams = JSON.parse(varParam);
const fileParams = JSON.parse(fileParam);
- const branches = formatRefs(JSON.parse(branchRefs), 'branch');
- const tags = formatRefs(JSON.parse(tagRefs), 'tag');
return new Vue({
el,
+ provide: {
+ projectRefsEndpoint,
+ },
render(createElement) {
return createElement(PipelineNewForm, {
props: {
@@ -35,8 +37,6 @@ export default () => {
refParam,
variableParams,
fileParams,
- branches,
- tags,
settingsLink,
maxWarnings: Number(maxWarnings),
},