Welcome to mirror list, hosted at ThFree Co, Russian Federation.

abuse.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7db99d4b037f157dbcdc1b31083dafd8e0dcaddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Gitlab
  module Abuse
    CONFIDENCE_LEVELS = {
      certain: 1.0,
      likely: 0.8,
      uncertain: 0.5,
      unknown: 0.0
    }.freeze

    class << self
      def confidence(rating)
        CONFIDENCE_LEVELS.fetch(rating.to_sym)
      end
    end
  end
end