blob: 25a45a259e2876a5817643271277bb2798e36527 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
module Gitlab
module Usage
module Metrics
module Instrumentations
class CountProjectsWithJiraDvcsIntegrationMetric < DatabaseMetric
operation :count
def initialize(metric_definition)
super
raise ArgumentError, "option 'cloud' must be a boolean" unless [true, false].include?(options[:cloud])
end
relation do |options|
ProjectFeatureUsage.with_jira_dvcs_integration_enabled(cloud: options[:cloud])
end
end
end
end
end
end
|