Sha256: 9d83d98e4c40c63739463c41ef93c63b0abbb03d134c9f53117581050da77ffc
Contents?: true
Size: 751 Bytes
Versions: 9
Compression:
Stored size: 751 Bytes
Contents
# frozen_string_literal: true module Gitlab module Dangerfiles class TypeLabelGuesser CHANGELOG_CATEGORY_TO_TYPE_LABEL = { fixed: %w[type::bug], security: %w[type::bug bug::vulnerability], performance: %w[type::bug bug::performance], added: %w[type::feature feature::addition], deprecated: %w[type::maintenance maintenance::removal], removed: %w[type::maintenance maintenance::removal], }.freeze def labels_from_changelog_categories(categories) categories = categories.map(&:to_sym) & CHANGELOG_CATEGORY_TO_TYPE_LABEL.keys return [] unless categories.one? CHANGELOG_CATEGORY_TO_TYPE_LABEL.fetch(categories.first.to_sym, []) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems