diff options
Diffstat (limited to 'app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue')
-rw-r--r-- | app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue index dae89c5f3d9..06ea9188113 100644 --- a/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue +++ b/app/assets/javascripts/pipeline_new/components/pipeline_new_form.vue @@ -22,6 +22,7 @@ import httpStatusCodes from '~/lib/utils/http_status'; import { redirectTo } from '~/lib/utils/url_utility'; import { s__, __, n__ } from '~/locale'; import { VARIABLE_TYPE, FILE_TYPE, CONFIG_VARIABLES_TIMEOUT } from '../constants'; +import filterVariables from '../utils/filter_variables'; import RefsDropdown from './refs_dropdown.vue'; const i18n = { @@ -281,20 +282,13 @@ export default { }, createPipeline() { this.submitted = true; - const filteredVariables = this.variables - .filter(({ key, value }) => key !== '' && value !== '') - .map(({ variable_type, key, value }) => ({ - variable_type, - key, - secret_value: value, - })); return axios .post(this.pipelinesPath, { // send shortName as fall back for query params // https://gitlab.com/gitlab-org/gitlab/-/issues/287815 ref: this.refValue.fullName || this.refShortName, - variables_attributes: filteredVariables, + variables_attributes: filterVariables(this.variables), }) .then(({ data }) => { redirectTo(`${this.pipelinesPath}/${data.id}`); |