summaryrefslogtreecommitdiff
path: root/lib/gitlab/chat_commands/issue_show.rb
blob: e5530df31cc4cdcf6bdae1d0b3bb05dd6854c12b (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+(?<iid>\d+)/.match(text)
      end

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

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