diff options
Diffstat (limited to 'lib/gitlab/ci/config/entry/policy.rb')
-rw-r--r-- | lib/gitlab/ci/config/entry/policy.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/ci/config/entry/policy.rb b/lib/gitlab/ci/config/entry/policy.rb index 81e74a639fc..d98b60f07d6 100644 --- a/lib/gitlab/ci/config/entry/policy.rb +++ b/lib/gitlab/ci/config/entry/policy.rb @@ -8,6 +8,9 @@ module Gitlab # Base class for OnlyPolicy and ExceptPolicy # class Policy < ::Gitlab::Config::Entry::Simplifiable + strategy :RefsPolicy, if: -> (config) { config.is_a?(Array) } + strategy :ComplexPolicy, if: -> (config) { config.is_a?(Hash) } + class RefsPolicy < ::Gitlab::Config::Entry::Node include ::Gitlab::Config::Entry::Validatable |