lib/gitlab/triage/policies/summary_policy.rb in gitlab-triage-1.23.1 vs lib/gitlab/triage/policies/summary_policy.rb in gitlab-triage-1.24.0
- old
+ new
@@ -1,23 +1,23 @@
# frozen_string_literal: true
require_relative 'base_policy'
-require_relative '../entity_builders/issue_builder'
+require_relative '../entity_builders/summary_builder'
module Gitlab
module Triage
module Policies
class SummaryPolicy < BasePolicy
- # Build an issue from several rules policies
- def build_issue
+ # Build a summary from several rules policies
+ def build_summary
action = actions[:summarize]
issues = resources.map do |inner_policy_spec, inner_resources|
Policies::RulePolicy.new(
type, inner_policy_spec, inner_resources, network)
- .build_issue
+ .build_summary
end
- EntityBuilders::IssueBuilder.new(
+ EntityBuilders::SummaryBuilder.new(
type: type,
action: action,
resources: issues.select(&:any_resources?),
network: network,
separator: "\n\n")