Gitlab Roulette

Gitlab Roulette chooses automatically a random reviewer and maintainer for your merge request and prints a beautiful message using DangerBot.

Screenshot-2019-12-15-at-16-10-36

Installation

Add this line to your application's Gemfile:

gem 'gitlab_roulette'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gitlab_roulette

Usage

First of all, you must set some environment variables to your Gitlab CI pipeline:

  CI_PROJECT_NAME: "your_project_name"
  GITLAB_ROULETTE_URL: "url to json file"
  GITLAB_HOST: "https://self_hosted_gitlab_url"

Then all you have to do is to create a Dangerfile in the root directory of the project with the following configuration:

    # frozen_string_literal: true

    danger.import_dangerfile(gem: "gitlab_roulette")

GITLAB_ROULETTE_URL contains a JSON file with all the users from your Gitlab and his rank

[
    {
        "username":"andrei.merfu","name":"Andrei Merfu",
        "role":"Backend Engineer",
        "projects": {
            "gitlab_roulette":"maintainer backend"
        }
    },
    {
        "username":"another.user","name":"X Y",
        "role":"Backend Engineer",
        "projects": {
            "gitlab_roulette":"reviewer backend"
        }
    }
]

License

The gem is available as open source under the terms of the MIT License.