Class: Gitlab::SlashCommands::Presenters::IssueSearch
- Includes:
- IssueBase
- Defined in:
- lib/gitlab/slash_commands/presenters/issue_search.rb
Instance Method Summary collapse
Methods included from IssueBase
#author, #color, #fields, #status_text
Methods inherited from Base
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
#present ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gitlab/slash_commands/presenters/issue_search.rb', line 9 def present text = if resource.count >= 5 "Here are the first 5 issues I found:" elsif resource.one? "Here is the only issue I found:" else "Here are the #{resource.count} issues I found:" end ephemeral_response(text: text, attachments: ) end |