Commit ebc3f62b authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix specs

parent cc83aded
- pretty_path_with_namespace = "#{@project.namespace ? @project.namespace.name : 'namespace'} / #{@project ? @project.name : 'name'}" - run_actions_text = "Perform common operations on this project: #{@project.name_with_namespace}"
- run_actions_text = "Perform common operations on this project: #{pretty_path_with_namespace}"
.well .well
This service allows GitLab users to perform common operations on this This service allows GitLab users to perform common operations on this
...@@ -27,7 +26,7 @@ ...@@ -27,7 +26,7 @@
.form-group .form-group
= label_tag :display_name, 'Display name', class: 'col-sm-2 col-xs-12 control-label' = label_tag :display_name, 'Display name', class: 'col-sm-2 col-xs-12 control-label'
.col-sm-10.col-xs-12.input-group .col-sm-10.col-xs-12.input-group
= text_field_tag :display_name, "GitLab / #{pretty_path_with_namespace}", class: 'form-control input-sm', readonly: 'readonly' = text_field_tag :display_name, "GitLab / #{@project.name_with_namespace}", class: 'form-control input-sm', readonly: 'readonly'
.input-group-btn .input-group-btn
= clipboard_button(clipboard_target: '#display_name') = clipboard_button(clipboard_target: '#display_name')
......
...@@ -22,8 +22,6 @@ module Gitlab ...@@ -22,8 +22,6 @@ module Gitlab
end end
end end
private
def match_command def match_command
match = nil match = nil
service = available_commands.find do |klass| service = available_commands.find do |klass|
...@@ -33,6 +31,8 @@ module Gitlab ...@@ -33,6 +31,8 @@ module Gitlab
[service, match] [service, match]
end end
private
def help_messages def help_messages
available_commands.map(&:help_message) available_commands.map(&:help_message)
end end
......
...@@ -135,9 +135,14 @@ module Gitlab ...@@ -135,9 +135,14 @@ module Gitlab
def link(url, title) def link(url, title)
case format case format
when 'slack' then "<#{url}|#{title}>" when 'slack'
when 'mattermost' then "[#{title}](#{url})" "<#{url}|#{title}>"
else then title
when 'mattermost'
"[#{title}](#{url})"
else
title
end end
end end
end end
......
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