2020-09-29 11:10:08 -04:00
|
|
|
# frozen_string_literal: true
|
2021-02-08 01:09:18 -05:00
|
|
|
# rubocop:disable Style/SignalException
|
2020-09-29 11:10:08 -04:00
|
|
|
|
2021-01-11 16:10:36 -05:00
|
|
|
CHANGED_FILES_MESSAGE = <<~MSG
|
2021-01-12 19:10:50 -05:00
|
|
|
For the following files, a review from the [Data team and Product Intelligence team](https://gitlab.com/groups/gitlab-org/growth/product-intelligence/engineers/-/group_members?with_inherited_permissions=exclude) is recommended
|
2021-04-06 08:09:21 -04:00
|
|
|
Please check the ~"product intelligence" [guide](https://docs.gitlab.com/ee/development/usage_ping.html).
|
2020-09-29 11:10:08 -04:00
|
|
|
|
2021-10-06 14:12:19 -04:00
|
|
|
For MR review guidelines, see the [Service Ping review guidelines](https://docs.gitlab.com/ee/development/usage_ping/review_guidelines.html) or the [Snowplow review guidelines](https://docs.gitlab.com/ee/development/snowplow/review_guidelines.html).
|
2020-09-29 11:10:08 -04:00
|
|
|
|
|
|
|
%<changed_files>s
|
|
|
|
|
|
|
|
MSG
|
|
|
|
|
2021-09-27 14:12:38 -04:00
|
|
|
# exit if not matching files or if no product intelligence labels
|
2021-12-03 10:10:36 -05:00
|
|
|
product_intelligence_paths_to_review = helper.changes_by_category[:product_intelligence]
|
2021-10-27 14:13:16 -04:00
|
|
|
labels_to_add = product_intelligence.missing_labels
|
2021-02-08 01:09:18 -05:00
|
|
|
|
2021-12-15 10:15:54 -05:00
|
|
|
return if product_intelligence_paths_to_review.empty? || product_intelligence.skip_review?
|
2020-09-29 11:10:08 -04:00
|
|
|
|
2021-12-06 16:10:14 -05:00
|
|
|
warn format(CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(product_intelligence_paths_to_review)) unless product_intelligence.has_approved_label?
|
2020-09-29 11:10:08 -04:00
|
|
|
|
2021-12-06 16:10:14 -05:00
|
|
|
project_helper.labels_to_add.concat(labels_to_add) unless labels_to_add.empty?
|