Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issue_search.rb « chat_commands « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 51bf80c800b73f4fe09292859b8f68e91b16ac29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 <your query>"
      end

      def execute(match)
        collection.search(match[:query]).limit(QUERY_LIMIT)
      end
    end
  end
end