-
-
Notifications
You must be signed in to change notification settings - Fork 34
Fix #279: Add link to upgrade notes to news text #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -287,13 +287,20 @@ private function displayReleaseSummary(Package $package, ComposerConfig $compose | |||||
|
||||||
$changes = implode("\n", $changes); | ||||||
|
||||||
$upgradeNotesLink = ''; | ||||||
$upgradePath = $package->getPath() . '/UPGRADE.md'; | ||||||
if (file_exists($upgradePath)) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Consider using is_file() instead of file_exists() to ensure the path points to a regular file rather than a directory.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
$upgradeNotesLink = "\n\nSee [UPGRADE.md](https://github.com/yiisoft/$packageName/blob/$versionToRelease/UPGRADE.md) for upgrade notes."; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good if we link to exact notes with anchor. For example:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tricky since header in these notes is created manually and doesn't correspond to version being released. |
||||||
} | ||||||
|
||||||
$text = <<<TEXT | ||||||
[$description](https://github.com/$packageName) version $versionToRelease was released. | ||||||
In this version: | ||||||
|
||||||
$changes | ||||||
$upgradeNotesLink | ||||||
TEXT; | ||||||
|
||||||
$io->info($text . "\n"); | ||||||
$io->info(trim($text) . "\n"); | ||||||
} | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs for major releases only.