summaryrefslogtreecommitdiff
path: root/lib/gitlab/chat_commands/issue_show.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/chat_commands/issue_show.rb')
-rw-r--r--lib/gitlab/chat_commands/issue_show.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/gitlab/chat_commands/issue_show.rb b/lib/gitlab/chat_commands/issue_show.rb
new file mode 100644
index 00000000000..f5bceb038e5
--- /dev/null
+++ b/lib/gitlab/chat_commands/issue_show.rb
@@ -0,0 +1,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)
+ find_by_iid(match[:iid])
+ end
+ end
+ end
+end