Commit e4166e66 authored by Alper Akgun's avatar Alper Akgun

Merge branch '254237-update-danger-bot-reviews-from-telemetry-to-product-analytics-2' into 'master'

Update Danger bot reviews from Telemetry to Product Analytics

Closes #254237

See merge request gitlab-org/gitlab!42850
parents 60a60a32 c5d68d55
# frozen_string_literal: true # frozen_string_literal: true
TELEMETRY_CHANGED_FILES_MESSAGE = <<~MSG PRODUCT_ANALYTICS_CHANGED_FILES_MESSAGE = <<~MSG
For the following files, a review from the [Data team and Telemetry team](https://gitlab.com/groups/gitlab-org/growth/telemetry/engineers/-/group_members?with_inherited_permissions=exclude) is recommended For the following files, a review from the [Data team and Product Analytics team](https://gitlab.com/groups/gitlab-org/growth/product_analytics/engineers/-/group_members?with_inherited_permissions=exclude) is recommended
Please check the ~telemetry [guide](https://docs.gitlab.com/ee/development/telemetry/usage_ping.html) and reach out to %<telemetry_engineers_group>s group for a review. Please check the ~"product analytics(telemetry)" [guide](https://docs.gitlab.com/ee/development/telemetry/usage_ping.html) and reach out to %<product_analytics_engineers_group>s group for a review.
%<changed_files>s %<changed_files>s
...@@ -13,7 +14,7 @@ UPDATE_METRICS_DEFINITIONS_MESSAGE = <<~MSG ...@@ -13,7 +14,7 @@ UPDATE_METRICS_DEFINITIONS_MESSAGE = <<~MSG
MSG MSG
TELEMETRY_ENGINEERS_GROUP = '@gitlab-org/growth/telemetry/engineers' PRODUCT_ANALYTICS_ENGINEERS_GROUP = '@gitlab-org/growth/product_analytics/engineers'
tracking_files = [ tracking_files = [
'lib/gitlab/tracking.rb', 'lib/gitlab/tracking.rb',
...@@ -32,16 +33,16 @@ changed_files = (usage_data_changed_files + snowplow_events_changed_files) ...@@ -32,16 +33,16 @@ changed_files = (usage_data_changed_files + snowplow_events_changed_files)
if changed_files.any? if changed_files.any?
mention = if helper.draft_mr? mention = if helper.draft_mr?
"`#{TELEMETRY_ENGINEERS_GROUP}`" "`#{PRODUCT_ANALYTICS_ENGINEERS_GROUP}`"
else else
TELEMETRY_ENGINEERS_GROUP PRODUCT_ANALYTICS_ENGINEERS_GROUP
end end
warn format(TELEMETRY_CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(changed_files), telemetry_engineers_group: mention) warn format(PRODUCT_ANALYTICS_CHANGED_FILES_MESSAGE, changed_files: helper.markdown_list(changed_files), product_analytics_engineers_group: mention)
warn format(UPDATE_METRICS_DEFINITIONS_MESSAGE) unless helper.changed_files(/usage_ping\.md/).any? warn format(UPDATE_METRICS_DEFINITIONS_MESSAGE) unless helper.changed_files(/usage_ping\.md/).any?
telemetry_labels = ['telemetry'] product_analytics_labels = ['product analytics(telemetry)']
telemetry_labels << 'telemetry::review pending' unless helper.mr_has_labels?('telemetry::reviewed') product_analytics_labels << 'product analytics(telemetry)::review pending' unless helper.mr_has_labels?('product analytics(telemetry)::reviewed')
markdown(helper.prepare_labels_for_mr(telemetry_labels)) markdown(helper.prepare_labels_for_mr(product_analytics_labels))
end end
...@@ -11,7 +11,7 @@ class GitlabDanger ...@@ -11,7 +11,7 @@ class GitlabDanger
karma karma
database database
commit_messages commit_messages
telemetry product_analytics
utility_css utility_css
pajamas pajamas
].freeze ].freeze
......
...@@ -9,7 +9,7 @@ RSpec.describe GitlabDanger do ...@@ -9,7 +9,7 @@ RSpec.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, telemetry, utility_css, pajamas') 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, product_analytics, utility_css, pajamas')
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