d71ad49fc5
For example, now we support `/gitlab issue show #1`. Where the # used to trip the regex.
17 lines
337 B
Ruby
17 lines
337 B
Ruby
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
|