Welcome to mirror list, hosted at ThFree Co, Russian Federation.

filter_variables.js « utils « pipeline_new « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 57ce3d13a9ab09638e9b9be5caa459812f8bc8ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// We need to filter out blank variables
// and filter out variables that have no key
// before sending to the API to create a pipeline.

export default (variables) => {
  return variables
    .filter(({ key }) => key !== '')
    .map(({ variable_type, key, value }) => ({
      variable_type,
      key,
      secret_value: value,
    }));
};