Skip to content

Commit

Permalink
Fix dot release version label on MOnthmy calendar view
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalchevrel committed Apr 18, 2024
1 parent 086339a commit 3676a70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/models/calendar_monthly.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
declare(strict_types=1);

use benhall14\phpCalendar\Calendar;
use ReleaseInsights\{Data, Release};
use ReleaseInsights\{Data, Release, Version};

$releases = new Data();
$calendar = new Calendar();
$events = [];

// Check if we have a planned dot release coming for the current cycle
$current_release = key($releases->getLatestMajorRelease());

$current_release_schedule = (new Release($current_release))->getSchedule();

if (isset($current_release_schedule['planned_dot_release'])) {
$date = (new DateTime($current_release_schedule['planned_dot_release']))->format('Y-m-d');
$events[] = [
'start' => $date,
'end' => $date,
'summary' => Release::getNiceLabel($current_release, 'planned_dot_release') . "<br>\n",
'summary' => Release::getNiceLabel((new Version($current_release))->normalized, 'planned_dot_release') . "<br>\n",
'mask' => true,
];
}
Expand Down

0 comments on commit 3676a70

Please sign in to comment.