diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /danger/telemetry/Dangerfile | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'danger/telemetry/Dangerfile')
-rw-r--r-- | danger/telemetry/Dangerfile | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/danger/telemetry/Dangerfile b/danger/telemetry/Dangerfile index b749bd3b80b..6cfc1a005c3 100644 --- a/danger/telemetry/Dangerfile +++ b/danger/telemetry/Dangerfile @@ -8,6 +8,11 @@ Please check the ~telemetry [guide](https://docs.gitlab.com/ee/development/telem MSG +UPDATE_METRICS_DEFINITIONS_MESSAGE = <<~MSG + When adding, changing, or updating metrics, please update the [Event dictionary Usage Ping table](https://docs.gitlab.com/ee/development/telemetry/event_dictionary.html#usage-ping). + +MSG + tracking_files = [ 'lib/gitlab/tracking.rb', 'spec/lib/gitlab/tracking_spec.rb', @@ -17,13 +22,14 @@ tracking_files = [ 'spec/frontend/tracking_spec.js' ] -usage_data_changed_files = git.modified_files.grep(%r{usage_data}) +usage_data_changed_files = helper.changed_files(/usage_data/) snowplow_events_changed_files = git.modified_files & tracking_files changed_files = (usage_data_changed_files + snowplow_events_changed_files) if changed_files.any? warn format(TELEMETRY_CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(changed_files)) + warn format(UPDATE_METRICS_DEFINITIONS_MESSAGE) unless helper.changed_files(/usage_ping\.md/).any? telemetry_labels = ['telemetry'] telemetry_labels << 'telemetry::review pending' unless helper.mr_has_labels?('telemetry::reviewed') |