Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/App/Command/Release/MakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,16 @@ private function releaseOnGithub(Package $package, Version $versionToRelease): v
$changelog = new Changelog($changelogPath);
$client->authenticate($token, null, AuthMethod::ACCESS_TOKEN);
$release = new Releases($client);


$changelogUrl = "https://github.com/yiisoft/$packageName/blob/$versionToRelease/CHANGELOG.md";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog we always add to body. May be add link to compare page? For example, yiisoft/html@3.10.0...3.11.0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for it since latest block of CHANGELOG will be in compare and the rest won't.

$body = implode("\n", $changelog->getReleaseNotes($versionToRelease));
$body .= "\n\n[Full changelog]({$changelogUrl})";

$release->create($package->getVendor(), $package->getId(), [
'name' => sprintf('Version %s', $versionToRelease),
'tag_name' => $versionToRelease->asString(),
'body' => implode("\n", $changelog->getReleaseNotes($versionToRelease)),
'body' => $body,
'draft' => false,
'prerelease' => false, // TODO: check if this is pre-release
]);
Expand Down
Loading