diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-15 18:08:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-15 18:08:59 +0300 |
commit | 51858218a3961c6d872703eabde0635bc0a1368f (patch) | |
tree | 4b62ba865821631fcc2e68025a5fade1b1e7b069 /danger/product_intelligence | |
parent | 6986c1adc235859111e45593bb0bd61e70892d3c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger/product_intelligence')
-rw-r--r-- | danger/product_intelligence/Dangerfile | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/danger/product_intelligence/Dangerfile b/danger/product_intelligence/Dangerfile index 1a53b485093..5fd5b962993 100644 --- a/danger/product_intelligence/Dangerfile +++ b/danger/product_intelligence/Dangerfile @@ -45,9 +45,13 @@ usage_data_changed_files = all_changed_files.grep(%r{(usage_data)}) metrics_changed_files = all_changed_files.grep(%r{((ee/)?config/metrics/.*\.yml)}) dictionary_changed_file = all_changed_files.grep(%r{(doc/development/usage_ping/dictionary.md)}) -usage_changed_files = usage_data_changed_files + tracking_changed_files + metrics_changed_files + dictionary_changed_file +snowplow_changed_files = all_changed_files.select do |file| + helper.changed_lines(file).grep(%r{Gitlab::Tracking\.event}).any? +end + +matching_changed_files = usage_data_changed_files + tracking_changed_files + metrics_changed_files + dictionary_changed_file + snowplow_changed_files -if usage_changed_files.any? +if matching_changed_files.any? mention = if helper.draft_mr? "`#{ENGINEERS_GROUP}`" @@ -55,7 +59,7 @@ if usage_changed_files.any? ENGINEERS_GROUP end - warn format(CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(usage_changed_files), engineers_group: mention) + warn format(CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(matching_changed_files), engineers_group: mention) warn format(UPDATE_METRICS_DEFINITIONS_MESSAGE) if usage_data_changed_files.any? fail format(UPDATE_DICTIONARY_MESSAGE) if metrics_changed_files.any? && dictionary_changed_file.empty? |