summaryrefslogtreecommitdiff
path: root/lib/gitlab/chat_commands/issue_search.rb
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2016-11-16 18:28:38 +0100
committerZ.J. van de Weg <git@zjvandeweg.nl>2016-11-17 21:34:24 +0100
commit1b4fdb9893af28606b7594ee656438c7ef21e9d8 (patch)
tree420a687514aedcc68c5a2dbe649123e3a52fdb02 /lib/gitlab/chat_commands/issue_search.rb
parent8c8bc07d32f1103bb7996b499ead6ad6eb5bd337 (diff)
downloadgitlab-ce-1b4fdb9893af28606b7594ee656438c7ef21e9d8.tar.gz
Rename from service, and move to lib/gitlab
Diffstat (limited to 'lib/gitlab/chat_commands/issue_search.rb')
-rw-r--r--lib/gitlab/chat_commands/issue_search.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/gitlab/chat_commands/issue_search.rb b/lib/gitlab/chat_commands/issue_search.rb
new file mode 100644
index 00000000000..4169e2a7a88
--- /dev/null
+++ b/lib/gitlab/chat_commands/issue_search.rb
@@ -0,0 +1,17 @@
+module Gitlab
+ module ChatCommands
+ class IssueSearch < IssueCommand
+ def self.match(text)
+ /\Aissue\s+search\s+(?<query>.*)/.match(text)
+ end
+
+ def self.help_message
+ "issue search <query>"
+ end
+
+ def execute(match)
+ present search_results(match[:query])
+ end
+ end
+ end
+end