summaryrefslogtreecommitdiff
path: root/lib/gitlab/slash_commands
diff options
context:
space:
mode:
authorcharlieablett <cablett@gitlab.com>2019-09-02 17:52:11 +1200
committercharlieablett <cablett@gitlab.com>2019-09-02 17:52:11 +1200
commitc3c84ff8eaff87e9e8ec76b7d1d10e5495724d34 (patch)
tree9bb9865640d83fe4d8f2106c8f4c63f7356885ea /lib/gitlab/slash_commands
parent23bb9424c0f0f872cb33e61169a56abe5e7e6985 (diff)
downloadgitlab-ce-c3c84ff8eaff87e9e8ec76b7d1d10e5495724d34.tar.gz
Tidy up conditional message
Diffstat (limited to 'lib/gitlab/slash_commands')
-rw-r--r--lib/gitlab/slash_commands/presenters/help.rb12
1 files changed, 7 insertions, 5 deletions
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