Class: Gitlab::SlashCommands::Presenters::IssueClose

Inherits:
Base
  • Object
show all
Includes:
IssueBase
Defined in:
lib/gitlab/slash_commands/presenters/issue_close.rb

Instance Method Summary collapse

Methods included from IssueBase

#author, #color, #fields, #project, #status_text

Methods inherited from Base

#display_errors, #initialize

Methods included from Routing

includes_helpers, redirect_legacy_paths, url_helpers

Constructor Details

This class inherits a constructor from Gitlab::SlashCommands::Presenters::Base

Instance Method Details

#already_closedObject



17
18
19
# File 'lib/gitlab/slash_commands/presenters/issue_close.rb', line 17

def already_closed
  ephemeral_response(text: "Issue #{resource.to_reference} is already closed.")
end

#presentObject



9
10
11
12
13
14
15
# File 'lib/gitlab/slash_commands/presenters/issue_close.rb', line 9

def present
  if resource.confidential?
    ephemeral_response(response_message)
  else
    in_channel_response(response_message)
  end
end