0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
GitlabRoulette choose reviewer and a maintainer for your merge request automatically
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 6.1.0
~> 0.17.1
~> 10.0
 Project Readme

❗ Deprecated

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 'danger-gitlab'
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, create a Dangerfile in the root directory of the project with the following configuration:

	# frozen_string_literal: true

	danger.import_plugin('danger/plugins/helper.rb')
	danger.import_plugin('danger/plugins/roulette.rb')

	danger.import_dangerfile(path: 'danger/roulette')

Finally, copy danger directory from this repository to your app root directory.

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"
		}
	}
]

More informations here: https://danger.systems/guides/getting_started.html

License

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