summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2019-05-28 06:58:37 +0000
committerJan Provaznik <jprovaznik@gitlab.com>2019-05-28 06:58:37 +0000
commitc7fc58bcfc68ee873036a7d6aed7133b6d423da6 (patch)
treec31c1c3a0ea346a38abc79800dd4915fc4039884
parentdaa72ac868f904115d2ce8f49be916123a56b25d (diff)
parentff0ffffd694b5ecda7d1327f4075e6d6de737901 (diff)
downloadgitlab-ce-c7fc58bcfc68ee873036a7d6aed7133b6d423da6.tar.gz
Merge branch 'api_make_protected_boolean_type' into 'master'
protected should be Boolean type See merge request gitlab-org/gitlab-ce!28766
-rw-r--r--changelogs/unreleased/api_make_protected_boolean_type.yml5
-rw-r--r--lib/api/variables.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/changelogs/unreleased/api_make_protected_boolean_type.yml b/changelogs/unreleased/api_make_protected_boolean_type.yml
new file mode 100644
index 00000000000..765edea6427
--- /dev/null
+++ b/changelogs/unreleased/api_make_protected_boolean_type.yml
@@ -0,0 +1,5 @@
+---
+title: 'API: change protected attribute type to Boolean'
+merge_request: 28766
+author:
+type: other
diff --git a/lib/api/variables.rb b/lib/api/variables.rb
index 38ff1b3d9cf..6c61392ed63 100644
--- a/lib/api/variables.rb
+++ b/lib/api/variables.rb
@@ -54,7 +54,7 @@ module API
params do
requires :key, type: String, desc: 'The key of the variable'
requires :value, type: String, desc: 'The value of the variable'
- optional :protected, type: String, desc: 'Whether the variable is protected'
+ optional :protected, type: Boolean, desc: 'Whether the variable is protected'
optional :masked, type: Boolean, desc: 'Whether the variable is masked'
optional :variable_type, type: String, values: Ci::Variable.variable_types.keys, desc: 'The type of variable, must be one of env_var or file. Defaults to env_var'
@@ -81,7 +81,7 @@ module API
params do
optional :key, type: String, desc: 'The key of the variable'
optional :value, type: String, desc: 'The value of the variable'
- optional :protected, type: String, desc: 'Whether the variable is protected'
+ optional :protected, type: Boolean, desc: 'Whether the variable is protected'
optional :masked, type: Boolean, desc: 'Whether the variable is masked'
optional :variable_type, type: String, values: Ci::Variable.variable_types.keys, desc: 'The type of variable, must be one of env_var or file'