summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-05 15:07:52 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-05 15:07:52 +0000
commitafe2b984524ae4b0c8a0636db7ec5b2c452f0734 (patch)
tree3de39f954c7239e09a9afe84263a64e7042b2b60 /danger
parent5a6b36b60502c50ab59c0bc3c345793b70a3d548 (diff)
downloadgitlab-ce-afe2b984524ae4b0c8a0636db7ec5b2c452f0734.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r--danger/telemetry/Dangerfile19
1 files changed, 19 insertions, 0 deletions
diff --git a/danger/telemetry/Dangerfile b/danger/telemetry/Dangerfile
new file mode 100644
index 00000000000..a9e66da6ab7
--- /dev/null
+++ b/danger/telemetry/Dangerfile
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+TELEMETRY_CHANGED_FILES_MESSAGE = <<~MSG
+This merge request adds or changes files that require a
+review from the Data team and Telemetry team @gitlab-org/growth/telemetry.
+The specific group is mentioned in order to send a notification to team members.
+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
+ The following files require a review from the [Data team and Telemetry team](https://gitlab.com/groups/gitlab-org/growth/telemetry/-/group_members?with_inherited_permissions=exclude):
+ MSG
+
+ markdown(USAGE_DATA_FILES_MESSAGE + helper.markdown_list(usage_data_changed_files))
+end