Commit dc995daf authored by Kamil Trzcinski's avatar Kamil Trzcinski

Use Slack compatible syntax

parent 8ca5fef9
...@@ -6,7 +6,7 @@ module Gitlab ...@@ -6,7 +6,7 @@ module Gitlab
def authorize_chat_name(url) def authorize_chat_name(url)
message = if url message = if url
":wave: Hi there! Before I do anything for you, please [connect your GitLab account](#{url})." ":wave: Hi there! Before I do anything for you, please <#{url}|connect your GitLab account>."
else else
":sweat_smile: Couldn't identify you, nor can I autorize you!" ":sweat_smile: Couldn't identify you, nor can I autorize you!"
end end
...@@ -44,7 +44,7 @@ module Gitlab ...@@ -44,7 +44,7 @@ module Gitlab
end end
def access_denied def access_denied
ephemeral_response("Whoops! That action is not allowed. This incident will be [reported](https://xkcd.com/838/).") ephemeral_response("Whoops! That action is not allowed. This incident will be <https://xkcd.com/838/|reported>.")
end end
private private
...@@ -65,7 +65,7 @@ module Gitlab ...@@ -65,7 +65,7 @@ module Gitlab
def single_resource(resource) def single_resource(resource)
return error(resource) if resource.errors.any? || !resource.persisted? return error(resource) if resource.errors.any? || !resource.persisted?
message = "### #{title(resource)}" message = "#{title(resource)}:"
message << "\n\n#{resource.description}" if resource.try(:description) message << "\n\n#{resource.description}" if resource.try(:description)
in_channel_response(message) in_channel_response(message)
...@@ -89,7 +89,7 @@ module Gitlab ...@@ -89,7 +89,7 @@ module Gitlab
reference = resource.try(:to_reference) || resource.try(:id) reference = resource.try(:to_reference) || resource.try(:id)
title = resource.try(:title) || resource.try(:name) title = resource.try(:title) || resource.try(:name)
"[#{reference} #{title}](#{url(resource)})" "<#{url(resource)}|#{reference} #{title}>"
end end
def header_with_list(header, items) def header_with_list(header, items)
......
Markdown is supported
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