diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-02-03 17:25:26 +0000 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-02-03 17:25:26 +0000 |
commit | 1af3f3b673be8f85b37d455b101954e62c2a3add (patch) | |
tree | 56f09bef2ca41964fae3efaf4f15be7fe1640ba4 /lib/gitlab/chat_commands/issue_search.rb | |
parent | 67c8526033241f6bd190fa16622970b3919e6dbd (diff) | |
parent | bd8f2b15b3d5267075a626ce86f3a06cc650fcbf (diff) | |
download | gitlab-ce-1af3f3b673be8f85b37d455b101954e62c2a3add.tar.gz |
Merge branch 'master' into jej-pages-picked-from-ee
Diffstat (limited to 'lib/gitlab/chat_commands/issue_search.rb')
-rw-r--r-- | lib/gitlab/chat_commands/issue_search.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/chat_commands/issue_search.rb b/lib/gitlab/chat_commands/issue_search.rb index 51bf80c800b..3491b53093e 100644 --- a/lib/gitlab/chat_commands/issue_search.rb +++ b/lib/gitlab/chat_commands/issue_search.rb @@ -10,7 +10,13 @@ module Gitlab end def execute(match) - collection.search(match[:query]).limit(QUERY_LIMIT) + issues = collection.search(match[:query]).limit(QUERY_LIMIT) + + if issues.present? + Presenters::IssueSearch.new(issues).present + else + Presenters::Access.new(issues).not_found + end end end end |