Class: GitlabQuality::TestTooling::LabelsInference
- Inherits:
-
Object
- Object
- GitlabQuality::TestTooling::LabelsInference
- Defined in:
- lib/gitlab_quality/test_tooling/labels_inference.rb
Constant Summary collapse
- WWW_GITLAB_COM_SITE =
'https://about.gitlab.com'- WWW_GITLAB_COM_GROUPS_JSON =
"#{WWW_GITLAB_COM_SITE}/groups.json".freeze
- WWW_GITLAB_COM_CATEGORIES_JSON =
"#{WWW_GITLAB_COM_SITE}/categories.json".freeze
- FEATURE_CATEGORY_METADATA_REGEX =
/(?<=feature_category: :)\w+/
Instance Method Summary collapse
- #infer_labels_from_feature_category(feature_category) ⇒ Object
- #infer_labels_from_product_group(product_group) ⇒ Object
Instance Method Details
#infer_labels_from_feature_category(feature_category) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/gitlab_quality/test_tooling/labels_inference.rb', line 19 def infer_labels_from_feature_category(feature_category) [ categories_mapping.dig(feature_category, 'label'), *infer_labels_from_product_group(categories_mapping.dig(feature_category, 'group')) ].compact.to_set end |
#infer_labels_from_product_group(product_group) ⇒ Object
15 16 17 |
# File 'lib/gitlab_quality/test_tooling/labels_inference.rb', line 15 def infer_labels_from_product_group(product_group) [groups_mapping.dig(product_group, 'label')].compact.to_set end |