diff --git a/lib/gitlab/slash_commands/presenters/help.rb b/lib/gitlab/slash_commands/presenters/help.rb index bb2298f8395..342dae456a8 100644 --- a/lib/gitlab/slash_commands/presenters/help.rb +++ b/lib/gitlab/slash_commands/presenters/help.rb @@ -43,13 +43,15 @@ module Gitlab end def help_footer - <<~MESSAGE - #{project_info if @project} - *Documentation* + message = @project ? project_info : '' + message += <<~MESSAGE + *Documentation* - For more information about GitLab chatops, refer to its - documentation: https://docs.gitlab.com/ce/ci/chatops/README.html. + For more information about GitLab chatops, refer to its + documentation: https://docs.gitlab.com/ce/ci/chatops/README.html. MESSAGE + + message end def project_info