/**
* Collect all markdown files, which do not have a flag meta field, inside the `/changelog/_unreleased` directory
* and move them to a new directory for the release in `/changelog/release-6-x-x-x`.
*
* @param list<string> $output
*
* @return list<string>
*/
private function releaseChangelogFiles(array
$output, string
$version, ChangelogFileCollection
$collection, bool
$dryRun = false
): array
{ $releaseDir =
$this->
getTargetReleaseDir($version);
if (!
$dryRun) { $this->filesystem->
mkdir($releaseDir);
$output[] = '* Move the unreleased changelog files to release folder: ' .
$releaseDir;
} else { $output[] = '---';
$output[] = 'Move the unreleased changelog files to release folder: ' .
$releaseDir;
$output[] = '---';
} foreach ($collection as $changelog) { if (!
$dryRun) {