summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-01-03 15:53:04 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2017-01-03 15:53:04 +0000
commit365612ce3602858c51902e735d0daea6e1987ba8 (patch)
tree6f5906bdf5d29fa33a3aeed0adc8afeb78e2b174
parent447314c0f346a17279dfb6dbb5a36eb672e938de (diff)
parent05228dddffbfe7863e129d8778c83c203d9fd883 (diff)
downloadgitlab-ce-365612ce3602858c51902e735d0daea6e1987ba8.tar.gz
Merge branch 'use-stable-icon-url' into 'master'
Use stable icon for Mattermost integration See merge request !8252
-rw-r--r--app/controllers/projects/mattermosts_controller.rb2
-rw-r--r--app/views/projects/services/slack_slash_commands/_help.html.haml2
-rw-r--r--public/slash-command-logo.pngbin0 -> 9509 bytes
-rw-r--r--spec/features/projects/services/mattermost_slash_command_spec.rb6
4 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/projects/mattermosts_controller.rb b/app/controllers/projects/mattermosts_controller.rb
index d87dff2a80e..01d99c7df35 100644
--- a/app/controllers/projects/mattermosts_controller.rb
+++ b/app/controllers/projects/mattermosts_controller.rb
@@ -30,7 +30,7 @@ class Projects::MattermostsController < Projects::ApplicationController
def configure_params
params.require(:mattermost).permit(:trigger, :team_id).merge(
url: service_trigger_url(@service),
- icon_url: asset_url('gitlab_logo.png'))
+ icon_url: asset_url('slash-command-logo.png'))
end
def teams
diff --git a/app/views/projects/services/slack_slash_commands/_help.html.haml b/app/views/projects/services/slack_slash_commands/_help.html.haml
index c45052e3954..6d7c2defe2b 100644
--- a/app/views/projects/services/slack_slash_commands/_help.html.haml
+++ b/app/views/projects/services/slack_slash_commands/_help.html.haml
@@ -50,7 +50,7 @@
.form-group
= label_tag nil, 'Customize icon', class: 'col-sm-2 col-xs-12 control-label'
.col-sm-10.col-xs-12.text-block
- = image_tag(asset_url('gitlab_logo.png'), width: 36, height: 36)
+ = image_tag(asset_url('slash-command-logo.png'), width: 36, height: 36)
= link_to('Download image', asset_url('gitlab_logo.png'), class: 'btn btn-sm', target: '_blank')
.form-group
diff --git a/public/slash-command-logo.png b/public/slash-command-logo.png
new file mode 100644
index 00000000000..05c8b0d0ccf
--- /dev/null
+++ b/public/slash-command-logo.png
Binary files differ
diff --git a/spec/features/projects/services/mattermost_slash_command_spec.rb b/spec/features/projects/services/mattermost_slash_command_spec.rb
index 274d50e7ce4..8de827447ff 100644
--- a/spec/features/projects/services/mattermost_slash_command_spec.rb
+++ b/spec/features/projects/services/mattermost_slash_command_spec.rb
@@ -49,4 +49,10 @@ feature 'Setup Mattermost slash commands', feature: true do
end
end
end
+
+ describe 'stable logo url' do
+ it 'shows a publicly available logo' do
+ expect(File.exist?(Rails.root.join('public/slash-command-logo.png')))
+ end
+ end
end