UX: Simplify post text for previous alert

UX: Simplify post text for previous alert
From e3ea1d0321589b69d6fe3c544ad111e60eb88097 Mon Sep 17 00:00:00 2001
From: Rishabh Nambiar <5862206+rishabhnambiar@users.noreply.github.com>
Date: Mon, 5 Nov 2018 10:06:35 +0530
Subject: [PATCH] UX: Simplify post text for previous alert


diff --git a/app/jobs/concerns/alert_post_mixin.rb b/app/jobs/concerns/alert_post_mixin.rb
index 970b2fc..bced7da 100644
--- a/app/jobs/concerns/alert_post_mixin.rb
+++ b/app/jobs/concerns/alert_post_mixin.rb
@@ -112,7 +112,7 @@ module AlertPostMixin
     created_at = Topic.where(id: topic_id).pluck(:created_at).first
     return "" unless created_at
 
-    "([Previous alert topic created.](#{Discourse.base_url}/t/#{topic_id}) #{local_date(created_at.to_s)})\n\n"
+    "[Previous alert](#{Discourse.base_url}/t/#{topic_id}) #{local_date(created_at.to_s)}\n\n"
   end
 
   def first_post_body(receiver:,
diff --git a/spec/integration/discourse_prometheus_alert_receiver/receiver_controller_spec.rb b/spec/integration/discourse_prometheus_alert_receiver/receiver_controller_spec.rb
index e788954..a62c904 100644
--- a/spec/integration/discourse_prometheus_alert_receiver/receiver_controller_spec.rb
+++ b/spec/integration/discourse_prometheus_alert_receiver/receiver_controller_spec.rb
@@ -976,7 +976,7 @@ RSpec.describe DiscoursePrometheusAlertReceiver::ReceiverController do
           expect(keyed_topic.assigned_to_user.id).to eq(assignee.id)
 
           expect(keyed_topic.posts.first.raw).to match(
-            /\[Previous alert topic created\.\]\(http:\/\/test\.localhost\/t\/#{closed_topic.id}\).*date=2018-07-27 time=19:33:44/
+            /\[Previous alert\]\(http:\/\/test\.localhost\/t\/#{closed_topic.id}\).*date=2018-07-27 time=19:33:44/
           )
         end
       end

GitHub