Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/danger
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-26 18:08:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-26 18:08:45 +0300
commit2a53c24c512db8613255884b1db42402a31d831b (patch)
tree37831911612043071365082fb0838c671ec7bbb7 /danger
parent8e812185ddf4c77ae3b1512b2d04725190e64209 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'danger')
-rw-r--r--danger/plugins/sidekiq_queues.rb10
-rw-r--r--danger/sidekiq_queues/Dangerfile27
2 files changed, 37 insertions, 0 deletions
diff --git a/danger/plugins/sidekiq_queues.rb b/danger/plugins/sidekiq_queues.rb
new file mode 100644
index 00000000000..1edeb6da3d5
--- /dev/null
+++ b/danger/plugins/sidekiq_queues.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+require_relative '../../lib/gitlab/danger/sidekiq_queues'
+
+module Danger
+ class SidekiqQueues < Plugin
+ # Put the helper code somewhere it can be tested
+ include Gitlab::Danger::SidekiqQueues
+ end
+end
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