summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-05-26 22:29:41 +0000
committerThong Kuah <tkuah@gitlab.com>2019-05-27 12:42:24 +1200
commit9c5fa659a54139461c5ee3bc3af2c0ea9bf12ace (patch)
treea64185850972f604e8f84b65eb94f7f8ab5a5bc6
parent1ae718f2f944c9e2fdc160ef7a6bc33b8fd1fb13 (diff)
downloadgitlab-ce-variables-boolean-type.tar.gz
Masked should be Boolean typevariables-boolean-type
As documented in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/api/project_level_variables.md#create-variable and it's a boolean in `db/schema.rb`
-rw-r--r--changelogs/unreleased/variables-boolean-type.yml5
-rw-r--r--lib/api/variables.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/changelogs/unreleased/variables-boolean-type.yml b/changelogs/unreleased/variables-boolean-type.yml
new file mode 100644
index 00000000000..7776657f60a
--- /dev/null
+++ b/changelogs/unreleased/variables-boolean-type.yml
@@ -0,0 +1,5 @@
+---
+title: 'API: change masked attribute type to Boolean'
+merge_request: 28758
+author:
+type: other
diff --git a/lib/api/variables.rb b/lib/api/variables.rb
index b07dd1bab79..38ff1b3d9cf 100644
--- a/lib/api/variables.rb
+++ b/lib/api/variables.rb
@@ -55,7 +55,7 @@ module API
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 :masked, type: String, desc: 'Whether the variable is masked'
+ 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'
if Gitlab.ee?
@@ -82,7 +82,7 @@ module API
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 :masked, type: String, desc: 'Whether the variable is masked'
+ 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'
if Gitlab.ee?