Repository: scala-steward-org/scala-steward (scala)

Issue:
feature request: add a warning emoji (⚠️) for any major version updates
Major version updates of the dependencies can have unintended consequences that are time-consuming to reverse and/or fix-forward.

Some recent examples are scala-xml 2.x and slf4j 2.x, both affecting sbt 1.x plugin/build ecosystem. See for example https://github.com/coursier/sbt-coursier/pull/422
In theory, all automatic PRs should be carefully reviewed. But I think people hit merge, trusting that Scala Steward is making the right call.

I wonder if we could add a warning emoji (⚠️) and a note in the PR calling for the attention of the reviewer that they might be cause a downstream "dependency hell"/diamond problem if they hit the merge button.

Pull request description:
Include a warning-sign if version:next is a major release, and attempt to structure the PR body with some light-weight emojis.

fixes: #2873

Patch:
diff --git a/modules/core/src/main/scala/org/scalasteward/core/forge/data/NewPullRequestData.scala b/modules/core/src/main/scala/org/scalasteward/core/forge/data/NewPullRequestData.scala
index d464cfdff8..1245d29913 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/forge/data/NewPullRequestData.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/forge/data/NewPullRequestData.scala
@@ -66,19 +66,25 @@ object NewPullRequestData {
 
         val updateInfoUrls = artifactIdToUpdateInfoUrls.getOrElse(u.mainArtifactId, Nil)
 
-        s"""|Updates $artifacts ${fromTo(u)}.
-            |${renderUpdateInfoUrls(updateInfoUrls).getOrElse("")}""".stripMargin.trim
+        s"""|## About this PR
+            |📦 Updates $artifacts ${fromTo(u)}${showMajorUpgradeWarning(u)}
+            |${renderUpdateInfoUrls(updateInfoUrls)
+             .map(urls => s"\n📜 $urls")
+             .getOrElse("")}""".stripMargin.trim
       },
       grouped = g => {
         val artifacts = g.updates
           .fproduct(u => artifactIdToUpdateInfoUrls.get(u.mainArtifactId).orEmpty)
           .map { case (u, updateInfoUrls) =>
-            s"* ${artifactsWithOptionalUrl(u, artifactIdToUrl)} ${fromTo(u)}" +
-              renderUpdateInfoUrls(updateInfoUrls).map(urls => s"\n  + $urls").getOrElse("")
+            s"* 📦 ${artifactsWithOptionalUrl(u, artifactIdToUrl)} ${fromTo(u)}${showMajorUpgradeWarning(u)}" +
+              renderUpdateInfoUrls(updateInfoUrls)
+                .map(urls => s"\n  + 📜 $urls")
+                .getOrElse("")
           }
           .mkString_("\n", "\n", "\n")
 
-        s"""|Updates:
+        s"""|## About this PR
+            |Updates:
             |$artifacts""".stripMargin.trim
       }
     )
@@ -90,6 +96,8 @@ object NewPullRequestData {
 
     s"""|$updatesText
         |
+        |## Usage
+        |✅ **Please merge!**
         |
         |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
         |
@@ -97,11 +105,13 @@ object NewPullRequestData {
         |
         |Configure Scala Steward for your repository with a [`${RepoConfigAlg.repoConfigBasename}`](${org.scalasteward.core.BuildInfo.gitHubUrl}/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
         |
-        |Have a fantastic day writing Scala!
+        |_Have a fantastic day writing Scala!_
         |
         |${details.map(_.toHtml).mkString("\n")}
         |
+        |<sup>
         |${labels.mkString("labels: ", ", ", "")}
+        |</sup>
         |""".stripMargin.trim
   }
 
@@ -118,7 +128,18 @@ object NewPullRequestData {
     }
 
   def fromTo(update: Update.Single): String =
-    s"from ${update.currentVersion} to ${update.nextVersion}"
+    s"from `${update.currentVersion}` to `${update.nextVersion}`"
+
+  def showMajorUpgradeWarning(u: Update.Single): String = {
+    val semVerVersions =
+      (SemVer.parse(u.currentVersion.value), SemVer.parse(u.nextVersion.value)).tupled
+    val semVerLabel = semVerVersions.flatMap { case (curr, next) =>
+      SemVer.getChangeSpec(curr, next).map(c => c.render)
+    }
+    if (semVerLabel == Some("major"))
+      s" ⚠"
+    else s""
+  }
 
   def artifactsWithOptionalUrl(update: Update.Single, artifactIdToUrl: Map[String, Uri]): String =
     update match {
@@ -150,7 +171,7 @@ object NewPullRequestData {
       )
 
       Details(
-        s"Files still referring to the old version $number",
+        s"🔍 Files still referring to the old version $number",
         s"""The following files still refer to the old version $numberWithVersion.
            |You might want to review and update them manually.
            |```
@@ -161,7 +182,7 @@ object NewPullRequestData {
     }
 
   def adjustFutureUpdates(update: Update): Details = Details(
-    "Adjust future updates",
+    "⚙ Adjust future updates",
     update.on(
       update = u =>
         s"""|Add this to your `${RepoConfigAlg.repoConfigBasename}` file to ignore future updates of this dependency:
@@ -188,7 +209,7 @@ object NewPullRequestData {
 
   def configParsingErrorDetails(error: String): Details =
     Details(
-      s"Note that the Scala Steward config file `${RepoConfigAlg.repoConfigBasename}` wasn't parsed correctly",
+      s"❗ Note that the Scala Steward config file `${RepoConfigAlg.repoConfigBasename}` wasn't parsed correctly",
       s"""|```
           |$error
           |```
@@ -213,7 +234,7 @@ object NewPullRequestData {
           s"* $name$createdChange\n$listElements"
         }
         .mkString("\n")
-      Details("Applied Scalafix Migrations", body)
+      Details("💡 Applied Scalafix Migrations", body)
     }
 
   def from(


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/forge/data/NewPullRequestDataTest.scala b/modules/core/src/test/scala/org/scalasteward/core/forge/data/NewPullRequestDataTest.scala
index f3752fbb70..eaaddd5425 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/forge/data/NewPullRequestDataTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/forge/data/NewPullRequestDataTest.scala
@@ -28,8 +28,11 @@ class NewPullRequestDataTest extends FunSuite {
       labels = List("library-update")
     )
     val expected =
-      s"""|Updates ch.qos.logback:logback-classic from 1.2.0 to 1.2.3.
+      s"""|## About this PR
+          |📦 Updates ch.qos.logback:logback-classic from `1.2.0` to `1.2.3`
           |
+          |## Usage
+          |✅ **Please merge!**
           |
           |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
           |
@@ -37,10 +40,10 @@ class NewPullRequestDataTest extends FunSuite {
           |
           |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
           |
-          |Have a fantastic day writing Scala!
+          |_Have a fantastic day writing Scala!_
           |
           |<details>
-          |<summary>Adjust future updates</summary>
+          |<summary>⚙ Adjust future updates</summary>
           |
           |Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
           |```
@@ -55,7 +58,9 @@ class NewPullRequestDataTest extends FunSuite {
           |```
           |</details>
           |
-          |labels: library-update""".stripMargin
+          |<sup>
+          |labels: library-update
+          |</sup>""".stripMargin
 
     assertEquals(body, expected)
   }
@@ -83,8 +88,11 @@ class NewPullRequestDataTest extends FunSuite {
       labels = List("library-update")
     )
     val expected =
-      s"""|Updates ch.qos.logback:logback-classic from 1.2.0 to 1.2.3.
+      s"""|## About this PR
+          |📦 Updates ch.qos.logback:logback-classic from `1.2.0` to `1.2.3`
           |
+          |## Usage
+          |✅ **Please merge!**
           |
           |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
           |
@@ -92,16 +100,16 @@ class NewPullRequestDataTest extends FunSuite {
           |
           |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
           |
-          |Have a fantastic day writing Scala!
+          |_Have a fantastic day writing Scala!_
           |
           |<details>
-          |<summary>Applied Scalafix Migrations</summary>
+          |<summary>💡 Applied Scalafix Migrations</summary>
           |
           |* com.spotify:scio-core:0.7.0
           |  * I am a rewrite rule
           |</details>
           |<details>
-          |<summary>Adjust future updates</summary>
+          |<summary>⚙ Adjust future updates</summary>
           |
           |Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
           |```
@@ -116,7 +124,9 @@ class NewPullRequestDataTest extends FunSuite {
           |```
           |</details>
           |
-          |labels: library-update""".stripMargin
+          |<sup>
+          |labels: library-update
+          |</sup>""".stripMargin
 
     assertEquals(body, expected)
   }
@@ -136,11 +146,14 @@ class NewPullRequestDataTest extends FunSuite {
       labels = List("library-update")
     )
     val expected =
-      s"""|Updates:
+      s"""|## About this PR
+          |Updates:
           |
-          |* ch.qos.logback:logback-classic from 1.2.0 to 1.2.3
-          |* com.example:foo from 1.0.0 to 2.0.0
+          |* 📦 ch.qos.logback:logback-classic from `1.2.0` to `1.2.3`
+          |* 📦 com.example:foo from `1.0.0` to `2.0.0` ⚠
           |
+          |## Usage
+          |✅ **Please merge!**
           |
           |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
           |
@@ -148,10 +161,10 @@ class NewPullRequestDataTest extends FunSuite {
           |
           |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
           |
-          |Have a fantastic day writing Scala!
+          |_Have a fantastic day writing Scala!_
           |
           |<details>
-          |<summary>Adjust future updates</summary>
+          |<summary>⚙ Adjust future updates</summary>
           |
           |Add these to your `.scala-steward.conf` file to ignore future updates of these dependencies:
           |```
@@ -175,7 +188,9 @@ class NewPullRequestDataTest extends FunSuite {
           |```
           |</details>
           |
-          |labels: library-update""".stripMargin
+          |<sup>
+          |labels: library-update
+          |</sup>""".stripMargin
 
     assertEquals(body, expected)
   }
@@ -193,8 +208,11 @@ class NewPullRequestDataTest extends FunSuite {
       labels = List("library-update")
     )
     val expected =
-      s"""|Updates ch.qos.logback:logback-classic from 1.2.0 to 1.2.3.
+      s"""|## About this PR
+          |📦 Updates ch.qos.logback:logback-classic from `1.2.0` to `1.2.3`
           |
+          |## Usage
+          |✅ **Please merge!**
           |
           |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
           |
@@ -202,10 +220,10 @@ class NewPullRequestDataTest extends FunSuite {
           |
           |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
           |
-          |Have a fantastic day writing Scala!
+          |_Have a fantastic day writing Scala!_
           |
           |<details>
-          |<summary>Adjust future updates</summary>
+          |<summary>⚙ Adjust future updates</summary>
           |
           |Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
           |```
@@ -220,21 +238,23 @@ class NewPullRequestDataTest extends FunSuite {
           |```
           |</details>
           |<details>
-          |<summary>Note that the Scala Steward config file `.scala-steward.conf` wasn't parsed correctly</summary>
+          |<summary>❗ Note that the Scala Steward config file `.scala-steward.conf` wasn't parsed correctly</summary>
           |
           |```
           |parsing error
           |```
           |</details>
           |
-          |labels: library-update""".stripMargin
+          |<sup>
+          |labels: library-update
+          |</sup>""".stripMargin
 
     assertEquals(body, expected)
   }
 
   test("fromTo") {
     val obtained = fromTo(("com.example".g % "foo".a % "1.2.0" %> "1.2.3").single)
-    assertEquals(obtained, "from 1.2.0 to 1.2.3")
+    assertEquals(obtained, "from `1.2.0` to `1.2.3`")
   }
 
   test("links to release notes/changelog") {
@@ -311,7 +331,7 @@ class NewPullRequestDataTest extends FunSuite {
     assertEquals(
       appliedMigrations.fold("")(_.toHtml),
       """<details>
-        |<summary>Applied Scalafix Migrations</summary>
+        |<summary>💡 Applied Scalafix Migrations</summary>
         |
         |* com.spotify:scio-core:0.7.0
         |  * I am a rewrite rule
@@ -341,7 +361,7 @@ class NewPullRequestDataTest extends FunSuite {
     assertEquals(
       detail.fold("")(_.toHtml),
       """<details>
-        |<summary>Applied Scalafix Migrations</summary>
+        |<summary>💡 Applied Scalafix Migrations</summary>
         |
         |* com.spotify:scio-core:0.7.0
         |  * I am a rewrite rule
@@ -383,7 +403,7 @@ class NewPullRequestDataTest extends FunSuite {
     assertEquals(
       detail.fold("")(_.toHtml),
       """<details>
-        |<summary>Applied Scalafix Migrations</summary>
+        |<summary>💡 Applied Scalafix Migrations</summary>
         |
         |* com.spotify:scio-core:0.7.0
         |  * I am a rewrite rule
@@ -430,7 +450,7 @@ class NewPullRequestDataTest extends FunSuite {
     assertEquals(
       note.fold("")(_.toHtml),
       """<details>
-        |<summary>Files still referring to the old version number</summary>
+        |<summary>🔍 Files still referring to the old version number</summary>
         |
         |The following files still refer to the old version number (0.1).
         |You might want to review and update them manually.
@@ -506,7 +526,7 @@ class NewPullRequestDataTest extends FunSuite {
     assertEquals(
       note.fold("")(_.toHtml),
       """<details>
-        |<summary>Files still referring to the old version numbers</summary>
+        |<summary>🔍 Files still referring to the old version numbers</summary>
         |
         |The following files still refer to the old version numbers.
         |You might want to review and update them manually.
@@ -529,7 +549,7 @@ class NewPullRequestDataTest extends FunSuite {
     assertEquals(
       note.toHtml,
       """<details>
-        |<summary>Adjust future updates</summary>
+        |<summary>⚙ Adjust future updates</summary>
         |
         |Add these to your `.scala-steward.conf` file to ignore future updates of these dependencies:
         |```
@@ -577,8 +597,11 @@ class NewPullRequestDataTest extends FunSuite {
     )
 
     val expectedBody =
-      s"""|Updates ch.qos.logback:logback-classic from 1.2.0 to 1.2.3.
+      s"""|## About this PR
+          |📦 Updates ch.qos.logback:logback-classic from `1.2.0` to `1.2.3`
           |
+          |## Usage
+          |✅ **Please merge!**
           |
           |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
           |
@@ -586,10 +609,10 @@ class NewPullRequestDataTest extends FunSuite {
           |
           |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
           |
-          |Have a fantastic day writing Scala!
+          |_Have a fantastic day writing Scala!_
           |
           |<details>
-          |<summary>Adjust future updates</summary>
+          |<summary>⚙ Adjust future updates</summary>
           |
           |Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
           |```
@@ -604,7 +627,9 @@ class NewPullRequestDataTest extends FunSuite {
           |```
           |</details>
           |
-          |labels: library-update, early-semver-patch, semver-spec-patch, commit-count:0""".stripMargin
+          |<sup>
+          |labels: library-update, early-semver-patch, semver-spec-patch, commit-count:0
+          |</sup>""".stripMargin
 
     val expected = NewPullRequestData(
       title = "Update logback-classic to 1.2.3",
@@ -649,11 +674,14 @@ class NewPullRequestDataTest extends FunSuite {
     )
 
     val expectedBody =
-      s"""|Updates:
+      s"""|## About this PR
+          |Updates:
           |
-          |* ch.qos.logback:logback-classic from 1.2.0 to 1.2.3
-          |* com.example:foo from 1.0.0 to 2.0.0
+          |* 📦 ch.qos.logback:logback-classic from `1.2.0` to `1.2.3`
+          |* 📦 com.example:foo from `1.0.0` to `2.0.0` ⚠
           |
+          |## Usage
+          |✅ **Please merge!**
           |
           |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
           |
@@ -661,10 +689,10 @@ class NewPullRequestDataTest extends FunSuite {
           |
           |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
           |
-          |Have a fantastic day writing Scala!
+          |_Have a fantastic day writing Scala!_
           |
           |<details>
-          |<summary>Adjust future updates</summary>
+          |<summary>⚙ Adjust future updates</summary>
           |
           |Add these to your `.scala-steward.conf` file to ignore future updates of these dependencies:
           |```
@@ -688,7 +716,9 @@ class NewPullRequestDataTest extends FunSuite {
           |```
           |</details>
           |
-          |labels: library-update, early-semver-patch, semver-spec-patch, early-semver-major, semver-spec-major, commit-count:0""".stripMargin
+          |<sup>
+          |labels: library-update, early-semver-patch, semver-spec-patch, early-semver-major, semver-spec-major, commit-count:0
+          |</sup>""".stripMargin
 
     val expected = NewPullRequestData(
       title = "Update for group my-group",
@@ -709,4 +739,113 @@ class NewPullRequestDataTest extends FunSuite {
 
     assertEquals(obtained, expected)
   }
+
+  test("should show major upgrade warning sign") {
+    val update = ("org.typelevel".g % "cats-effect".a % "2.5.5" %> "3.4.2").single
+
+    val body = bodyFor(
+      update = update,
+      edits = List.empty,
+      artifactIdToUrl = Map.empty,
+      artifactIdToUpdateInfoUrls = Map.empty,
+      filesWithOldVersion = List.empty,
+      configParsingError = None,
+      labels = List(
+        "library-update",
+        "early-semver-major",
+        "semver-spec-minor",
+        "commit-count:1"
+      )
+    )
+    val expected =
+      s"""|## About this PR
+          |📦 Updates org.typelevel:cats-effect from `2.5.5` to `3.4.2` ⚠
+          |
+          |## Usage
+          |✅ **Please merge!**
+          |
+          |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
+          |
+          |If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
+          |
+          |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
+          |
+          |_Have a fantastic day writing Scala!_
+          |
+          |<details>
+          |<summary>⚙ Adjust future updates</summary>
+          |
+          |Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
+          |```
+          |updates.ignore = [ { groupId = "org.typelevel", artifactId = "cats-effect" } ]
+          |```
+          |Or, add this to slow down future updates of this dependency:
+          |```
+          |dependencyOverrides = [{
+          |  pullRequests = { frequency = "30 days" },
+          |  dependency = { groupId = "org.typelevel", artifactId = "cats-effect" }
+          |}]
+          |```
+          |</details>
+          |
+          |<sup>
+          |labels: library-update, early-semver-major, semver-spec-minor, commit-count:1
+          |</sup>""".stripMargin
+
+    assertEquals(body, expected)
+  }
+  test("should not show major upgrade warning sign on a minor update") {
+    val update = ("com.lihaoyi".g % "os-lib".a % "0.7.8" %> "0.9.1").single
+
+    val body = bodyFor(
+      update = update,
+      edits = List.empty,
+      artifactIdToUrl = Map.empty,
+      artifactIdToUpdateInfoUrls = Map.empty,
+      filesWithOldVersion = List.empty,
+      configParsingError = None,
+      labels = List(
+        "library-update",
+        "early-semver-major",
+        "semver-spec-minor",
+        "commit-count:1"
+      )
+    )
+    val expected =
+      s"""|## About this PR
+          |📦 Updates com.lihaoyi:os-lib from `0.7.8` to `0.9.1`
+          |
+          |## Usage
+          |✅ **Please merge!**
+          |
+          |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
+          |
+          |If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
+          |
+          |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
+          |
+          |_Have a fantastic day writing Scala!_
+          |
+          |<details>
+          |<summary>⚙ Adjust future updates</summary>
+          |
+          |Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
+          |```
+          |updates.ignore = [ { groupId = "com.lihaoyi", artifactId = "os-lib" } ]
+          |```
+          |Or, add this to slow down future updates of this dependency:
+          |```
+          |dependencyOverrides = [{
+          |  pullRequests = { frequency = "30 days" },
+          |  dependency = { groupId = "com.lihaoyi", artifactId = "os-lib" }
+          |}]
+          |```
+          |</details>
+          |
+          |<sup>
+          |labels: library-update, early-semver-major, semver-spec-minor, commit-count:1
+          |</sup>""".stripMargin
+
+    assertEquals(body, expected)
+  }
 }
diff --git a/modules/core/src/test/scala/org/scalasteward/core/nurture/NurtureAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/nurture/NurtureAlgTest.scala
index ac39bf0f78..5bc62da151 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/nurture/NurtureAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/nurture/NurtureAlgTest.scala
@@ -39,9 +39,13 @@ class NurtureAlgTest extends CatsEffectSuite with Http4sDsl[MockEff] {
     val expected = NewPullRequestData(
       title = "Update cats-effect to 3.4.0",
       body =
-        raw"""Updates [org.typelevel:cats-effect](https://github.com/typelevel/cats-effect) from 3.3.0 to 3.4.0.
-             |[GitHub Release Notes](https://github.com/typelevel/cats-effect/releases/tag/v3.4.0) - [Version Diff](https://github.com/typelevel/cats-effect/compare/v3.3.0...v3.4.0)
+        raw"""## About this PR
+             |📦 Updates [org.typelevel:cats-effect](https://github.com/typelevel/cats-effect) from `3.3.0` to `3.4.0`
              |
+             |📜 [GitHub Release Notes](https://github.com/typelevel/cats-effect/releases/tag/v3.4.0) - [Version Diff](https://github.com/typelevel/cats-effect/compare/v3.3.0...v3.4.0)
+             |
+             |## Usage
+             |✅ **Please merge!**
              |
              |I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
              |
@@ -49,10 +53,10 @@ class NurtureAlgTest extends CatsEffectSuite with Http4sDsl[MockEff] {
              |
              |Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/${org.scalasteward.core.BuildInfo.gitHeadCommit}/docs/repo-specific-configuration.md) file.
              |
-             |Have a fantastic day writing Scala!
+             |_Have a fantastic day writing Scala!_
              |
              |<details>
-             |<summary>Adjust future updates</summary>
+             |<summary>⚙ Adjust future updates</summary>
              |
              |Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
              |```
@@ -67,8 +71,9 @@ class NurtureAlgTest extends CatsEffectSuite with Http4sDsl[MockEff] {
              |```
              |</details>
              |
+             |<sup>
              |labels: library-update, early-semver-minor, semver-spec-minor, version-scheme:early-semver, commit-count:1
-             |""".stripMargin.trim,
+             |</sup>""".stripMargin.trim,
       head = "scala-steward:update/cats-effect-3.4.0",
       base = baseBranch,
       labels = List(
@@ -85,6 +90,8 @@ class NurtureAlgTest extends CatsEffectSuite with Http4sDsl[MockEff] {
   }
 
   test("preparePullRequest should not set labels if ForgeConfig.addLabels = false") {
+    def nextToLast(L: Array[String]) = L(L.size - 2)
+
     val config =
       MockConfig.config.copy(forgeCfg = MockConfig.config.forgeCfg.copy(addLabels = false))
     val nurtureAlg = context(config).nurtureAlg
@@ -109,9 +116,9 @@ class NurtureAlgTest extends CatsEffectSuite with Http4sDsl[MockEff] {
     })
     nurtureAlg.preparePullRequest(updateData, edits).runA(state).map { obtained =>
       assert(obtained.labels.isEmpty)
-      val lastLine = obtained.body.split("\n").last
+      val nextToLastLine = nextToLast(obtained.body.split("\n"))
       assertEquals(
-        lastLine,
+        nextToLastLine,
         "labels: library-update, early-semver-minor, semver-spec-minor, version-scheme:early-semver, commit-count:1"
       )
     }