Commit 2561d979 authored by Austin Regnery's avatar Austin Regnery Committed by Ash McKenzie

Spin reviewer on UX label

Changelog: changed
parent c404ceae
......@@ -96,6 +96,9 @@ categories = Set.new(changes.keys - [:unknown])
# Ensure to spin for database reviewer/maintainer when ~database is applied (e.g. to review SQL queries)
categories << :database if helper.mr_labels.include?('database')
# Ensure to spin for UX reviewer when ~UX is applied (e.g. to review changes to the UI)
categories << :ux if helper.mr_labels.include?('UX')
# Ensure to spin for Product Intelligence reviewer when ~"product intelligence::review pending" is applied
categories << :product_intelligence if helper.mr_labels.include?("product intelligence::review pending")
......@@ -124,21 +127,4 @@ if changes.any?
markdown(UNKNOWN_FILES_MESSAGE + helper.markdown_list(unknown)) unless unknown.empty?
end
# Ensure to spin for ux reviewer/maintainer when ~ux is applied (e.g. to review design implementations)
categories << :ux if helper.gitlab_helper&.mr_labels&.include?('ux') && !categories.include?(:ux)
if changes.any?
project = helper.project_name
random_roulette_spins = roulette.spin(project, categories, timezone_experiment: false)
rows = random_roulette_spins.map do |spin|
markdown_row_for_spins(spin.category, [spin])
end
markdown(MESSAGE)
markdown(CATEGORY_TABLE_HEADER + rows.join("\n")) unless rows.empty?
unknown = changes.fetch(:unknown, [])
markdown(UNKNOWN_FILES_MESSAGE + helper.markdown_list(unknown)) unless unknown.empty?
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