29a8827752
We now match deployment actions better. If there is more than one deployment action matched, we check if there is an action which name equals to environment name, instead of raising an error about too many actions defined.
18 lines
457 B
Ruby
18 lines
457 B
Ruby
module Gitlab
|
|
module SlashCommands
|
|
module Presenters
|
|
class Deploy < Presenters::Base
|
|
def present(from, to)
|
|
message = "Deployment started from #{from} to #{to}. " \
|
|
"[Follow its progress](#{resource_url})."
|
|
|
|
in_channel_response(text: message)
|
|
end
|
|
|
|
def action_not_found
|
|
ephemeral_response(text: "Couldn't find a deployment action.")
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|