Sha256: 1de89ebdccd8e7e6655fdfd3d7f56fb1d4da62ff4c2b3a0abe152a26c6efc08b
Contents?: true
Size: 735 Bytes
Versions: 64
Compression:
Stored size: 735 Bytes
Contents
require_relative 'base_conditions_filter' module Gitlab module Triage module Filters class NoAdditionalLabelsConditionsFilter < BaseConditionsFilter def self.filter_parameters [] end def validate_condition(condition) raise ArgumentError, 'condition must be an array containing the only label values allowed' unless condition.is_a?(Array) end def initialize_variables(expected_labels) @attribute = :labels @expected_labels = expected_labels end def resource_value @resource[@attribute] end def calculate (resource_value - @expected_labels).empty? end end end end end
Version data entries
64 entries across 64 versions & 2 rubygems