2020-03-05 10:07:52 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
TELEMETRY_CHANGED_FILES_MESSAGE = <<~MSG
|
2020-03-17 14:09:44 -04:00
|
|
|
This merge request adds or changes files for which a
|
|
|
|
review from the Data team and Telemetry team is recommended.
|
|
|
|
@gitlab-org/growth/telemetry group is mentioned in order to notify team members.
|
2020-03-05 10:07:52 -05:00
|
|
|
MSG
|
|
|
|
|
|
|
|
usage_data_changed_files = git.modified_files.grep(%r{usage_data})
|
|
|
|
|
|
|
|
if usage_data_changed_files.any?
|
|
|
|
warn format(TELEMETRY_CHANGED_FILES_MESSAGE)
|
|
|
|
|
|
|
|
USAGE_DATA_FILES_MESSAGE = <<~MSG
|
2020-03-17 14:09:44 -04:00
|
|
|
For the following files, a review from the [Data team and Telemetry team](https://gitlab.com/groups/gitlab-org/growth/telemetry/-/group_members?with_inherited_permissions=exclude) is recommended:
|
2020-03-05 10:07:52 -05:00
|
|
|
MSG
|
|
|
|
|
|
|
|
markdown(USAGE_DATA_FILES_MESSAGE + helper.markdown_list(usage_data_changed_files))
|
|
|
|
end
|