diff --git a/CHANGELOG b/CHANGELOG index 55081988071..fa8ecbd8c74 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ v 7.11.0 (unreleased) - - - Improve new project command options (Ben Bodenmiller) + - Prevent sending empty messages to HipChat (Chulki Lee) v 7.10.0 (unreleased) - Ignore submodules that are defined in .gitmodules but are checked in as directories. diff --git a/app/models/project_services/hipchat_service.rb b/app/models/project_services/hipchat_service.rb index d264a56ebdf..07520eab5d1 100644 --- a/app/models/project_services/hipchat_service.rb +++ b/app/models/project_services/hipchat_service.rb @@ -50,8 +50,9 @@ class HipchatService < Service def execute(data) return unless supported_events.include?(data[:object_kind]) - - gate[room].send('GitLab', create_message(data)) + message = create_message(data) + return unless message.present? + gate[room].send('GitLab', message) end private diff --git a/app/views/projects/_md_preview.html.haml b/app/views/projects/_md_preview.html.haml index f356a25dbfa..b869fd6e12a 100644 --- a/app/views/projects/_md_preview.html.haml +++ b/app/views/projects/_md_preview.html.haml @@ -9,5 +9,5 @@ %div .md-write-holder = yield - .md-preview-holder.hide + .md.md-preview-holder.hide .js-md-preview{class: (preview_class if defined?(preview_class))}