Class: Gitlab::Triage::Action::Summarize::Dry

Inherits:
Gitlab::Triage::Action::Summarize show all
Defined in:
lib/gitlab/triage/action/summarize.rb

Instance Attribute Summary

Attributes inherited from Base

#network, #policy

Instance Method Summary collapse

Methods inherited from Gitlab::Triage::Action::Summarize

#act, #destination, #group_summary_without_destination?, #issue, #post_issue_body, #post_issue_url

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Gitlab::Triage::Action::Base

Instance Method Details

#performObject (private)



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/gitlab/triage/action/summarize.rb', line 12

def perform
  policy.summary = {
    web_url: '[the-created-issue-url]',
    project_id: 'some-id',
    iid: 'some-iid'
  }.with_indifferent_access

  if group_summary_without_destination?
    puts Gitlab::Triage::UI.warn("No issue will be created: No summary destination specified when source is 'groups'.")
    return
  end

  puts "The following issue would be created in project `#{destination}` for the rule **#{policy.name}**:\n\n"
  puts ">>>"
  puts "* Title: #{issue.title}"
  puts "* Description: #{issue.description}"
  puts ">>>"
end