public function getBody(
string $packageName,
Version $previousVersion,
Version $versionToRelease,
array $releaseNotes,
bool $hasUpgradeNotes = false,
): string {
$body = implode("\n", $releaseNotes);
if ($previousVersion->asString() === '') {
return $body;
}
$changelogUrl = "https://github.com/$packageName/compare/$previousVersion...$versionToRelease";
$body .= "\n\n[Full changelog]($changelogUrl)";
if ($hasUpgradeNotes && $this->isMajorRelease($versionToRelease)) {
$upgradeNotesUrl = "https://github.com/$packageName/blob/$versionToRelease/UPGRADE.md";
$body .= "\n\nSee [UPGRADE.md]($upgradeNotesUrl) for upgrade notes.";
}
return $body;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.