Port "Extend API: Pipeline Schedule Variable" to EE
What does this MR do?
Port "Extend API: Pipeline Schedule Variable" to EE, due to ee-compat failure.
I just fixed
> g di
diff --cc lib/api/entities.rb
index e3771acdd7,9cac2ff248..0000000000
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@@ -875,14 -818,7 +875,14 @@@ module AP
class Variable < Grape::Entity
expose :key, :value
- expose :protected?, as: :protected
+ expose :protected?, as: :protected, if: -> (entity, _) { entity.respond_to?(:protected?) }
+
+ # EE
+ expose :environment_scope, if: ->(variable, options) {
+ if variable.respond_to?(:environment_scope)
+ variable.project.feature_available?(:variable_environment_scope)
+ end
+ }
end
class Pipeline < PipelineBasic
What are the relevant issue numbers?
Edited by Shinya Maeda