Sha256: 013aa804577eab92841cea18bcff2c619958cb63d4d3f0dd2bd5954888b169f5
Contents?: true
Size: 899 Bytes
Versions: 63
Compression:
Stored size: 899 Bytes
Contents
# frozen_string_literal: true require_relative "../weightage" module Gitlab module Dangerfiles module Weightage # @api private class Maintainers def initialize(maintainers) @maintainers = maintainers end def execute maintainers.each_with_object([]) do |maintainer, weighted_maintainers| add_weighted_reviewer(weighted_maintainers, maintainer, Gitlab::Dangerfiles::Weightage::BASE_REVIEWER_WEIGHT) end end private attr_reader :maintainers def add_weighted_reviewer(reviewers, reviewer, weight) if reviewer.reduced_capacity reviewers.fill(reviewer, reviewers.size, weight) else reviewers.fill(reviewer, reviewers.size, weight * Gitlab::Dangerfiles::Weightage::CAPACITY_MULTIPLIER) end end end end end end
Version data entries
63 entries across 63 versions & 1 rubygems