diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2019-03-25 15:47:55 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-03-26 14:18:29 +0100 |
commit | cbe21d78bff5f845cedb2a75d0385a282077f87f (patch) | |
tree | dfb989698abab1854c92ee063b0ee05c5c4365b5 /lib/api/variables.rb | |
parent | 449d2bb0d894fa6cd31353b82c3b060821d728de (diff) | |
download | gitlab-ce-cbe21d78bff5f845cedb2a75d0385a282077f87f.tar.gz |
Backport parameters for API::Parameters
This backports the EE specific parameters for API::Parameters, wrapping
them in a conditional.
Diffstat (limited to 'lib/api/variables.rb')
-rw-r--r-- | lib/api/variables.rb | 8 |
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 |