Sha256: 60b844202bed6ab403552b4588ec2ebf351b32af9cde85bba0a04785bd963b65
Contents?: true
Size: 562 Bytes
Versions: 12
Compression:
Stored size: 562 Bytes
Contents
require_relative 'expansion' module Gitlab module Triage module ExpandCondition module Sequence PATTERN = /\{\s*(\d+)\s*\.\.\s*(\d+)\s*\}/ 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
12 entries across 12 versions & 1 rubygems