Sha256: fbe6d1ac618a47136824d4e65f08fdb7c8d7d2ae28b82728ddf9f7bfa097706f
Contents?: true
Size: 569 Bytes
Versions: 45
Compression:
Stored size: 569 Bytes
Contents
require_relative 'expansion' module Gitlab module Triage module ExpandCondition module Sequence PATTERN = /\{\s*(\d+)\s*\.\.\s*(\d+)\s*\}/.freeze def self.expand(conditions) labels = conditions[:labels] return conditions unless labels expansion = Expansion.new(PATTERN) do |(lower, upper)| Integer(lower)..Integer(upper) end expansion.perform(labels).map do |new_labels| conditions.merge(labels: new_labels) end end end end end end
Version data entries
45 entries across 45 versions & 2 rubygems