diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 09:07:57 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 09:07:57 +0000 |
commit | 7881eb30eaa8b01dbcfe87faa09927c75c7d6e45 (patch) | |
tree | 298bc8d2c62b2f2c29cb8ecbcf3de3eaaa6466d9 /lib/gitlab/slash_commands/presenters/issue_search.rb | |
parent | 64b66e0cb6d1bfd27abf24e06653f00bddb60597 (diff) | |
download | gitlab-ce-7881eb30eaa8b01dbcfe87faa09927c75c7d6e45.tar.gz |
Add latest changes from gitlab-org/gitlab@12-6-stable-ee
Diffstat (limited to 'lib/gitlab/slash_commands/presenters/issue_search.rb')
-rw-r--r-- | lib/gitlab/slash_commands/presenters/issue_search.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/slash_commands/presenters/issue_search.rb b/lib/gitlab/slash_commands/presenters/issue_search.rb index 0d497efec0e..fffa082baac 100644 --- a/lib/gitlab/slash_commands/presenters/issue_search.rb +++ b/lib/gitlab/slash_commands/presenters/issue_search.rb @@ -7,12 +7,12 @@ module Gitlab include Presenters::IssueBase def present - text = if @resource.count >= 5 + text = if resource.count >= 5 "Here are the first 5 issues I found:" - elsif @resource.one? + elsif resource.one? "Here is the only issue I found:" else - "Here are the #{@resource.count} issues I found:" + "Here are the #{resource.count} issues I found:" end ephemeral_response(text: text, attachments: attachments) @@ -21,7 +21,7 @@ module Gitlab private def attachments - @resource.map do |issue| + resource.map do |issue| url = "[#{issue.to_reference}](#{url_for([namespace, project, issue])})" { @@ -37,7 +37,7 @@ module Gitlab end def project - @project ||= @resource.first.project + @project ||= resource.first.project end def namespace |