summaryrefslogtreecommitdiff
path: root/danger/sidekiq_queues
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 12:26:25 +0000
commita09983ae35713f5a2bbb100981116d31ce99826e (patch)
tree2ee2af7bd104d57086db360a7e6d8c9d5d43667a /danger/sidekiq_queues
parent18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff)
downloadgitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'danger/sidekiq_queues')
-rw-r--r--danger/sidekiq_queues/Dangerfile27
1 files changed, 27 insertions, 0 deletions
diff --git a/danger/sidekiq_queues/Dangerfile b/danger/sidekiq_queues/Dangerfile
new file mode 100644
index 00000000000..b40be7a486e
--- /dev/null
+++ b/danger/sidekiq_queues/Dangerfile
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+SCALABILITY_REVIEW_MESSAGE = <<~MSG
+## Sidekiq queue changes
+
+This merge request contains changes to Sidekiq queues. Please follow the [documentation on changing a queue's urgency](https://docs.gitlab.com/ee/development/sidekiq_style_guide.html#changing-a-queues-urgency).
+MSG
+
+ADDED_QUEUES_MESSAGE = <<~MSG
+These queues were added:
+MSG
+
+CHANGED_QUEUES_MESSAGE = <<~MSG
+These queues had their attributes changed:
+MSG
+
+if sidekiq_queues.added_queue_names.any? || sidekiq_queues.changed_queue_names.any?
+ markdown(SCALABILITY_REVIEW_MESSAGE)
+
+ if sidekiq_queues.added_queue_names.any?
+ markdown(ADDED_QUEUES_MESSAGE + helper.markdown_list(sidekiq_queues.added_queue_names))
+ end
+
+ if sidekiq_queues.changed_queue_names.any?
+ markdown(CHANGED_QUEUES_MESSAGE + helper.markdown_list(sidekiq_queues.changed_queue_names))
+ end
+end