Skip to content

Commit 56c854d

Browse files
ISSUE #1651: Fix new app version notification
1 parent cf80a13 commit 56c854d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Domain/Integration/GitHub/AppUpdateAvailableNotificationCronAction.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ public function getMutexTtl(): int
3636

3737
public function run(SymfonyStyle $output): void
3838
{
39-
if (AppVersion::getSemanticVersion() === $this->gitHub->getLatestRelease()) {
39+
$latestRelease = $this->gitHub->getLatestRelease();
40+
if (AppVersion::getSemanticVersion() === $latestRelease) {
4041
return;
4142
}
4243

4344
$this->commandBus->dispatch(new SendNotification(
4445
title: 'New app version available',
45-
message: sprintf("We have been busy, %s is finally out! Go see what's new.", AppVersion::getSemanticVersion()),
46+
message: sprintf("We have been busy, %s is finally out! Go see what's new.", $latestRelease),
4647
tags: ['partying_face'],
4748
actionUrl: Url::fromString('https://github.com/robiningelbrecht/statistics-for-strava/releases'),
4849
));

tests/Domain/Integration/GitHub/__snapshots__/AppUpdateAvailableNotificationCronActionTest__testRun__1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"commandName": "App\\Domain\\Integration\\Notification\\SendNotification\\SendNotification",
44
"payload": {
55
"title": "New app version available",
6-
"message": "We have been busy, v4.3.6 is finally out! Go see what's new.",
6+
"message": "We have been busy, v3.8.0 is finally out! Go see what's new.",
77
"tags": [
88
"partying_face"
99
],

0 commit comments

Comments
 (0)