debian-mirror-gitlab/danger/sidekiq_queues/Dangerfile

28 lines
858 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
SCALABILITY_REVIEW_MESSAGE = <<~MSG
## Sidekiq queue changes
2022-04-04 11:22:00 +05:30
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/worker_attributes.html#job-urgency).
2020-07-28 23:09:34 +05:30
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