Class: Gitlab::Triage::Action::Comment::Dry

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

Instance Attribute Summary

Attributes inherited from Base

#network, #policy

Instance Method Summary collapse

Methods inherited from Gitlab::Triage::Action::Comment

#build_comment, #build_post_url, #resource_id, #sub_resource_type

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#actObject



17
18
19
20
21
# File 'lib/gitlab/triage/action/comment.rb', line 17

def act
  puts "The following comments would be posted for the rule **#{policy.name}**:\n\n"

  super
end

#perform(resource, comment) ⇒ Object (private)



25
26
27
# File 'lib/gitlab/triage/action/comment.rb', line 25

def perform(resource, comment)
  puts "# #{resource[:web_url]}\n```\n#{comment}\n```\n"
end