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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-03-25 17:47:55 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2019-03-26 16:18:29 +0300
commitcbe21d78bff5f845cedb2a75d0385a282077f87f (patch)
treedfb989698abab1854c92ee063b0ee05c5c4365b5 /lib/api
parent449d2bb0d894fa6cd31353b82c3b060821d728de (diff)
Backport parameters for API::Parameters
This backports the EE specific parameters for API::Parameters, wrapping them in a conditional.
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/variables.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/variables.rb b/lib/api/variables.rb
index d0d81ebc870..3489ba827e4 100644
--- a/lib/api/variables.rb
+++ b/lib/api/variables.rb
@@ -55,6 +55,10 @@ 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'
+
+ if Gitlab.ee?
+ optional :environment_scope, type: String, desc: 'The environment_scope of the variable'
+ end
end
post ':id/variables' do
variable_params = declared_params(include_missing: false)
@@ -76,6 +80,10 @@ 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'
+
+ if Gitlab.ee?
+ optional :environment_scope, type: String, desc: 'The environment_scope of the variable'
+ end
end
# rubocop: disable CodeReuse/ActiveRecord
put ':id/variables/:key' do