Commit b251a9ec authored by Alina Mihaila's avatar Alina Mihaila Committed by Rémy Coutable

Implement Danger Telemetry Review

parent d9e8e9b2
...@@ -48,3 +48,11 @@ Dangerfile @gl-quality/eng-prod ...@@ -48,3 +48,11 @@ Dangerfile @gl-quality/eng-prod
# Delivery owner files # Delivery owner files
/.gitlab/ci/releases.gitlab-ci.yml @gitlab-org/delivery /.gitlab/ci/releases.gitlab-ci.yml @gitlab-org/delivery
# Telemetry owner files
/ee/lib/gitlab/usage_data_counters/ @gitlab-org/growth/telemetry
/ee/lib/ee/gitlab/usage_data.rb @gitlab-org/growth/telemetry
/lib/gitlab/grafana_embed_usage_data.rb @gitlab-org/growth/telemetry
/lib/gitlab/usage_data.rb @gitlab-org/growth/telemetry
/lib/gitlab/cycle_analytics/usage_data.rb @gitlab-org/growth/telemetry
/lib/gitlab/usage_data_counters/ @gitlab-org/growth/telemetry
# 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
...@@ -11,6 +11,7 @@ class GitlabDanger ...@@ -11,6 +11,7 @@ class GitlabDanger
karma karma
database database
commit_messages commit_messages
telemetry
].freeze ].freeze
CI_ONLY_RULES ||= %w[ CI_ONLY_RULES ||= %w[
......
...@@ -9,7 +9,7 @@ describe GitlabDanger do ...@@ -9,7 +9,7 @@ describe GitlabDanger do
describe '.local_warning_message' do describe '.local_warning_message' do
it 'returns an informational message with rules that can run' do it 'returns an informational message with rules that can run' do
expect(described_class.local_warning_message).to eq('==> Only the following Danger rules can be run locally: changes_size, documentation, frozen_string, duplicate_yarn_dependencies, prettier, eslint, karma, database, commit_messages') expect(described_class.local_warning_message).to eq('==> Only the following Danger rules can be run locally: changes_size, documentation, frozen_string, duplicate_yarn_dependencies, prettier, eslint, karma, database, commit_messages, telemetry')
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment