summaryrefslogtreecommitdiff
path: root/lib/gitlab/chat_commands/issue_show.rb
blob: 2a45d49cf6b30824f5672ccfcebb1e9172ced818 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Gitlab
  module ChatCommands
    class IssueShow < IssueCommand
      def self.match(text)
        /\Aissue\s+show\s+#{Issue.reference_prefix}?(?<iid>\d+)/.match(text)
      end

      def self.help_message
        "issue show <id>"
      end

      def execute(match)
        find_by_iid(match[:iid])
      end
    end
  end
end