This commit is contained in:
Andras Bacsai 2023-06-21 12:06:35 +02:00
parent 065e6c55b1
commit ce7ffc8c43

View File

@ -80,11 +80,16 @@ public function toDiscord(): string
{
if ($this->preview) {
$message = '✅ Pull request #' . $this->preview->pull_request_id . ' of **' . $this->application_name . '** deployed successfully: ';
$message .= '[Application Link](' . $this->preview->fqdn . ') | [Deployment logs](' . $this->deployment_url . ')';
if ($this->preview->fqdn) {
$message .= '[Application Link](' . $this->preview->fqdn . ') |';
}
$message .= '[Deployment logs](' . $this->deployment_url . ')';
} else {
$message = '✅ A new version has been deployed of **' . $this->application_name . '**.';
$message .= "\n\n";
$message .= '[Application Link](' . $this->fqdn . ') | [Deployment logs](' . $this->deployment_url . ')';
$message = '✅ A new version has been deployed of **' . $this->application_name . '**: ';
if ($this->fqdn) {
$message .= '[Application Link](' . $this->fqdn . ') |';
}
$message .= '[Deployment logs](' . $this->deployment_url . ')';
}
return $message;
}