Commit 87d19300 authored by Marin Jankovski's avatar Marin Jankovski

Set specific reviewers for single codebase effort

This extends Danger so it informs MR authors that single codebase merge
requests need to be approved by a specific group of engineers.
Co-authored-by: default avatarYorick Peterse <>
parent a89df585
......@@ -12,3 +12,4 @@ danger.import_dangerfile(path: 'danger/duplicate_yarn_dependencies')
danger.import_dangerfile(path: 'danger/prettier')
danger.import_dangerfile(path: 'danger/eslint')
danger.import_dangerfile(path: 'danger/roulette')
danger.import_dangerfile(path: 'danger/single_codebase')
......@@ -58,7 +58,9 @@ changes = helper.changes_by_category
categories = changes.keys - [:unknown]
unless changes.empty?
# Single codebase MRs are reviewed using a slightly different process, so we
# disable the review roulette for such MRs.
if changes.any? && !gitlab.mr_labels.include?('single codebase')
team =
def mention_single_codebase_approvers
frontend_maintainers = %w(@filipa @iamphill)
backend_maintainers = %w(@rspeicher @rymai @yorickpeterse @godfat)
rows = []
users = []
if gitlab.mr_labels.include?('frontend')
frontend_maintainer = frontend_maintainers.sample
rows << "| ~frontend | `#{frontend_maintainer}`"
users << frontend_maintainer
if gitlab.mr_labels.include?('backend')
backend_maintainer = backend_maintainers.sample
rows << "| ~backend | `#{backend_maintainer}`"
users << backend_maintainer
if rows.empty?
backup_maintainer = backend_maintainers.sample
rows << "| ~frontend / ~backend | `#{backup_maintainer}`"
users << backup_maintainer
## Single codebase changes
This merge request contains changes related to the work of moving towards a
[single codebase]( for
Community Edition and Enterprise Edition. These changes will need to be
reviewed and approved by the following engineers:
| Category | Reviewer
To make sure this happens, please follow these steps:
1. Add all of the mentioned users to the list of merge request approvals.
2. Assign the merge request to the first person in the above list.
If you are a reviewer, please follow these steps:
1. Review the merge request. If it is good to go, approve it.
2. Once approved, assign to the next person in the above list. If you are
the last person in the list, merge the merge request.
if gitlab.mr_labels.include?('single codebase')
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment