summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-22 14:59:47 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-22 18:54:09 -0200
commitac446b587d231e5d8bf8b489224c416006f599af (patch)
tree70a39fe9420cb0abbfcb47e58ea30f401bb00bf5
parent5e1080c5e07e3ea5a79b2ac1f91df5d3a0001a5c (diff)
downloadgitlab-ce-ac446b587d231e5d8bf8b489224c416006f599af.tar.gz
Merge branch 'fix-mattermost-username' into 'master'
Fix Mattermost command creation by specifying username See merge request !8257
-rw-r--r--app/models/project_services/mattermost_slash_commands_service.rb2
-rw-r--r--changelogs/unreleased/fix-mattermost-username.yml4
-rw-r--r--spec/models/project_services/mattermost_slash_commands_service_spec.rb2
3 files changed, 6 insertions, 2 deletions
diff --git a/app/models/project_services/mattermost_slash_commands_service.rb b/app/models/project_services/mattermost_slash_commands_service.rb
index 6c78c0af71c..2cb481182d7 100644
--- a/app/models/project_services/mattermost_slash_commands_service.rb
+++ b/app/models/project_services/mattermost_slash_commands_service.rb
@@ -46,6 +46,6 @@ class MattermostSlashCommandsService < ChatSlashCommandsService
description: "Perform common operations on: #{pretty_project_name}",
display_name: "GitLab / #{pretty_project_name}",
method: 'P',
- user_name: 'GitLab')
+ username: 'GitLab')
end
end
diff --git a/changelogs/unreleased/fix-mattermost-username.yml b/changelogs/unreleased/fix-mattermost-username.yml
new file mode 100644
index 00000000000..ca298e4d008
--- /dev/null
+++ b/changelogs/unreleased/fix-mattermost-username.yml
@@ -0,0 +1,4 @@
+---
+title: Fix Mattermost command creation by specifying username
+merge_request:
+author:
diff --git a/spec/models/project_services/mattermost_slash_commands_service_spec.rb b/spec/models/project_services/mattermost_slash_commands_service_spec.rb
index d6f4fbd7265..672ced68681 100644
--- a/spec/models/project_services/mattermost_slash_commands_service_spec.rb
+++ b/spec/models/project_services/mattermost_slash_commands_service_spec.rb
@@ -36,7 +36,7 @@ describe MattermostSlashCommandsService, :models do
description: "Perform common operations on: #{project.name_with_namespace}",
display_name: "GitLab / #{project.name_with_namespace}",
method: 'P',
- user_name: 'GitLab' }.to_json).
+ username: 'GitLab' }.to_json).
to_return(
status: 200,
headers: { 'Content-Type' => 'application/json' },