diff options
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' }, |