fix(core): update Slack notification formatting to use bold correctly

This commit is contained in:
Andras Bacsai
2025-02-04 12:40:04 +01:00
parent 3da921e2ac
commit df129b83b3
7 changed files with 11 additions and 11 deletions

View File

@@ -103,9 +103,9 @@ class StatusChanged extends CustomEmailNotification
$title = 'Application stopped'; $title = 'Application stopped';
$description = "{$this->resource_name} has been stopped"; $description = "{$this->resource_name} has been stopped";
$description .= "\n\n**Project:** ".data_get($this->resource, 'environment.project.name'); $description .= "\n\n*Project:* ".data_get($this->resource, 'environment.project.name');
$description .= "\n**Environment:** {$this->environment_name}"; $description .= "\n*Environment:* {$this->environment_name}";
$description .= "\n**Application URL:** {$this->resource_url}"; $description .= "\n*Application URL:* {$this->resource_url}";
return new SlackMessage( return new SlackMessage(
title: $title, title: $title,

View File

@@ -93,7 +93,7 @@ class ContainerRestarted extends CustomEmailNotification
$description = "A resource ({$this->name}) has been restarted automatically on {$this->server->name}"; $description = "A resource ({$this->name}) has been restarted automatically on {$this->server->name}";
if ($this->url) { if ($this->url) {
$description .= "\n**Resource URL:** {$this->url}"; $description .= "\n*Resource URL:* {$this->url}";
} }
return new SlackMessage( return new SlackMessage(

View File

@@ -93,7 +93,7 @@ class ContainerStopped extends CustomEmailNotification
$description = "A resource ({$this->name}) has been stopped unexpectedly on {$this->server->name}"; $description = "A resource ({$this->name}) has been stopped unexpectedly on {$this->server->name}";
if ($this->url) { if ($this->url) {
$description .= "\n**Resource URL:** {$this->url}"; $description .= "\n*Resource URL:* {$this->url}";
} }
return new SlackMessage( return new SlackMessage(

View File

@@ -79,8 +79,8 @@ class BackupFailed extends CustomEmailNotification
$title = 'Database backup failed'; $title = 'Database backup failed';
$description = "Database backup for {$this->name} (db:{$this->database_name}) has FAILED."; $description = "Database backup for {$this->name} (db:{$this->database_name}) has FAILED.";
$description .= "\n\n**Frequency:** {$this->frequency}"; $description .= "\n\n*Frequency:* {$this->frequency}";
$description .= "\n\n**Error Output:**\n{$this->output}"; $description .= "\n\n*Error Output:* {$this->output}";
return new SlackMessage( return new SlackMessage(
title: $title, title: $title,

View File

@@ -77,7 +77,7 @@ class BackupSuccess extends CustomEmailNotification
$title = 'Database backup successful'; $title = 'Database backup successful';
$description = "Database backup for {$this->name} (db:{$this->database_name}) was successful."; $description = "Database backup for {$this->name} (db:{$this->database_name}) was successful.";
$description .= "\n\n**Frequency:** {$this->frequency}"; $description .= "\n\n*Frequency:* {$this->frequency}";
return new SlackMessage( return new SlackMessage(
title: $title, title: $title,

View File

@@ -101,11 +101,11 @@ class TaskFailed extends CustomEmailNotification
$description = "Scheduled task ({$this->task->name}) failed."; $description = "Scheduled task ({$this->task->name}) failed.";
if ($this->output) { if ($this->output) {
$description .= "\n\n**Error Output:**\n{$this->output}"; $description .= "\n\n*Error Output:* {$this->output}";
} }
if ($this->url) { if ($this->url) {
$description .= "\n\n**Task URL:** {$this->url}"; $description .= "\n\n*Task URL:* {$this->url}";
} }
return new SlackMessage( return new SlackMessage(

View File

@@ -96,7 +96,7 @@ class TaskSuccess extends CustomEmailNotification
$description = "Scheduled task ({$this->task->name}) succeeded."; $description = "Scheduled task ({$this->task->name}) succeeded.";
if ($this->url) { if ($this->url) {
$description .= "\n\n**Task URL:** {$this->url}"; $description .= "\n\n*Task URL:* {$this->url}";
} }
return new SlackMessage( return new SlackMessage(