Sha256: 1e6d3c193bbef70f4c15481da7369cc85736502e18f7538f7f22f1483a23bc04
Contents?: true
Size: 553 Bytes
Versions: 45
Compression:
Stored size: 553 Bytes
Contents
require_relative 'expansion' module Gitlab module Triage module ExpandCondition module List PATTERN = /\{.+?,.+?\}/m.freeze def self.expand(conditions) labels = conditions[:labels] return conditions unless labels expansion = Expansion.new(PATTERN) do |list| list.gsub(/\{|\}/, '').split(',').map(&:strip) 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