TLDR: Scala Steward will now link to release notes in its pull requests if the POM of the new version contains a info.releaseNotesUrl
property that contains a URL of the release notes.
Scala Steward is using project.scm.url
and project.url
of the POM to add links to the repositories of the dependencies it is updating and it also tries to find release notes, changelogs, and version diffs based on the repository URL. This works quite well for dependencies that use GitHub and put their release notes on GitHub. An example PR that demonstrates this is Update cats-effect to 3.4.4 by scala-steward · Pull Request #2865 · scala-steward-org/scala-steward · GitHub.
If a dependency puts its release notes somewhere where it cannot be derived from the repository URL, there was no way for Scala Steward to include a link to them in its PRs. This is why we recently changed Scala Steward to read the info.releaseNotesUrl
property from the POM and use that to link to the release notes. This new property allows library maintainers to put their release notes anywhere they want to and allows Scala Steward and other tools (Scaladex for example) to retrieve release notes in a generic way.
If you want to include the release notes into your POM, here is how it can be done with sbt and Mill:
sbt:
projectID ~= { id =>
val releaseNotesUrl =
"info.releaseNotesUrl" -> "https://www.scala-lang.org/blog/2022/11/07/scala-3.2.1-released.html"
id.withExtraAttributes(id.extraAttributes + releaseNotesUrl)
}
(Thanks to @julienrf for this snippet!)
Mill:
// in object foo extends PublishModule
def publishProperties = super.publishProperties() ++ Map(
"info.releaseNotesUrl" -> "https://www.scala-lang.org/blog/2022/11/07/scala-3.2.1-released.html"
)
(Thanks to @lefou for this snippet!)
I hope that you consider making use of the info.releaseNotesUrl
property!