Commit e1a5ae2f authored by PiTrem's avatar PiTrem
Browse files

upd slackistrano message. closes #253

parent b457a38f
......@@ -18,8 +18,14 @@ if defined?(Slackistrano::Messaging)
# end
def payload_for_updating
t = <<-TXT
#{member_links}\n current revision: #{fetch(:git_current_rev)}\n
base revision: <#{fetch(:git_url)} | #{fetch(:git_base_rev)}>\n
On server #{server_hostnames} #{super[:text]} \n
```#{fetch(:git_log_message)}```
TXT
{
text: "#{member_links}: On server #{server_hostnames} " + super[:text]
text: t
}
end
......@@ -82,14 +88,13 @@ if defined?(Slackistrano::Messaging)
def server_hostnames
roles(:web).map do |host|
"#{host.user}@#{host.hostname}"
# "#{host.user}@#{host.hostname}"
"#{host.hostname}"
end.join(', ')
end
def member_links
fetch(:slack_members, nil)&.inject do |ms,m|
ms << "<@#{m}>"
end
fetch(:slack_members, nil)&.map { |m| "<@#{m}>" }.join(', ')
end
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment