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

trigger.rb « entry « config « ci « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 28b0a9ffe014280ebd3e3a0d248a52e32dff6a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module Gitlab
  module Ci
    class Config
      module Entry
        ##
        # Entry that represents a trigger policy for the job.
        #
        class Trigger < Node
          include Validatable

          validations do
            include LegacyValidationHelpers

            validate :array_of_strings_or_regexps

            def array_of_strings_or_regexps
              unless validate_array_of_strings_or_regexps(config)
                errors.add(:config, 'should be an array of strings or regexps')
              end
            end
          end
        end
      end
    end
  end
end