Commit 2c437631 authored by Albert Salim's avatar Albert Salim

Merge branch 'shl-improve-reviewer-roulette-text' into 'master'

Move reviewer roulette table above and improve text

See merge request gitlab-org/gitlab!62360
parents 393facf4 46c2151e
...@@ -2,15 +2,21 @@ ...@@ -2,15 +2,21 @@
require 'digest/md5' require 'digest/md5'
MESSAGE = <<MARKDOWN REVIEW_ROULETTE_SECTION = <<MARKDOWN
## Reviewer roulette ## Reviewer roulette
MARKDOWN
CATEGORY_TABLE = <<MARKDOWN
Changes that require review have been detected!
Changes that require review have been detected! A merge request is normally Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
reviewed by both a reviewer and a maintainer in its primary category (e.g.
~frontend or ~backend), and by a maintainer in all other categories. | Category | Reviewer | Maintainer |
| -------- | -------- | ---------- |
MARKDOWN MARKDOWN
CATEGORY_TABLE_HEADER = <<MARKDOWN POST_TABLE_MESSAGE = <<MARKDOWN
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each To spread load more evenly across eligible reviewers, Danger has picked a candidate for each
review slot, based on their timezone. Feel free to review slot, based on their timezone. Feel free to
...@@ -26,12 +32,15 @@ Please consider assigning a reviewer or maintainer who is a ...@@ -26,12 +32,15 @@ Please consider assigning a reviewer or maintainer who is a
Once you've decided who will review this merge request, assign them as a reviewer! Once you've decided who will review this merge request, assign them as a reviewer!
Danger does not automatically notify them for you. Danger does not automatically notify them for you.
MARKDOWN
| Category | Reviewer | Maintainer | NO_SUGGESTIONS = <<MARKDOWN
| -------- | -------- | ---------- |
There are no reviewer and maintainer suggestions for the changes in this MR.
MARKDOWN MARKDOWN
UNKNOWN_FILES_MESSAGE = <<MARKDOWN UNKNOWN_FILES_MESSAGE = <<MARKDOWN
### Uncategorised files
These files couldn't be categorised, so Danger was unable to suggest a reviewer. These files couldn't be categorised, so Danger was unable to suggest a reviewer.
Please consider creating a merge request to Please consider creating a merge request to
...@@ -99,8 +108,14 @@ if changes.any? ...@@ -99,8 +108,14 @@ if changes.any?
markdown_row_for_spins(spin.category, [spin]) markdown_row_for_spins(spin.category, [spin])
end end
markdown(MESSAGE) markdown(REVIEW_ROULETTE_SECTION)
markdown(CATEGORY_TABLE_HEADER + rows.join("\n")) unless rows.empty?
if rows.empty?
markdown(NO_SUGGESTIONS)
else
markdown(CATEGORY_TABLE + rows.join("\n"))
markdown(POST_TABLE_MESSAGE)
end
unknown = changes.fetch(:unknown, []) unknown = changes.fetch(:unknown, [])
markdown(UNKNOWN_FILES_MESSAGE + helper.markdown_list(unknown)) unless unknown.empty? markdown(UNKNOWN_FILES_MESSAGE + helper.markdown_list(unknown)) unless unknown.empty?
......
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