Repository: scala-steward-org/scala-steward
Pull request #2081 (2021-04-18 07:44:54)

Remove updates.includeScala option
This removes the `updates.includeScala` repo config option and handles Scala updates as any other updates. IMO https://github.com/scala-steward-org/scala-steward/pull/1990 and https://github.com/scala-steward-org/scala-steward/pull/1993  improved Scala updates considerably so that we don't need to create them as draft PRs anymore and can just enable them by default.

People that want to ignore Scala updates can use the regular `updates.ignore` option instead of `updates.includeScala = false`.


Patch:
diff --git a/docs/repo-specific-configuration.md b/docs/repo-specific-configuration.md
index 8cd1f944..943369c2 100644
--- a/docs/repo-specific-configuration.md
+++ b/docs/repo-specific-configuration.md
@@ -57,14 +57,6 @@ updates.ignore = [ { groupId = "org.acme", artifactId="foo", version = "1.0" } ]
 # Default: None
 updates.limit = 5
 
-# If set to "yes", Scala Steward will create PR for scala updates
-# If set to "draft", Scala Steward will create draft PR for scala updates
-# If set to "no", Scala Steward will not create PR for scala updates
-# The default is set to "draft" since updating scala version is tricky and error-prone
-# and is left upto the repo maintainer to mark it ready for review and merge when satisfactory
-# Default: draft
-updates.includeScala = "yes" | "draft" | "no"
-
 # The extensions of files that should be updated.
 # Default: [".scala", ".sbt", ".sbt.shared", ".sc", ".yml", "pom.xml"]
 updates.fileExtensions = [".scala", ".sbt", ".sbt.shared", ".sc", ".yml", ".md", ".markdown", ".txt"]
diff --git a/modules/benchmark/src/main/scala/org/scalasteward/benchmark/VersionBenchmark.scala b/modules/benchmark/src/main/scala/org/scalasteward/benchmark/VersionBenchmark.scala
index 083a1634..c82b56ea 100644
--- a/modules/benchmark/src/main/scala/org/scalasteward/benchmark/VersionBenchmark.scala
+++ b/modules/benchmark/src/main/scala/org/scalasteward/benchmark/VersionBenchmark.scala
@@ -16,11 +16,10 @@
 
 package org.scalasteward.benchmark
 
+import java.util.concurrent.TimeUnit
 import org.openjdk.jmh.annotations.{Benchmark, BenchmarkMode, Mode, OutputTimeUnit}
 import org.scalasteward.core.data.Version.Component
 
-import java.util.concurrent.TimeUnit
-
 @BenchmarkMode(Array(Mode.AverageTime))
 class VersionBenchmark {
   @Benchmark
diff --git a/modules/core/src/main/scala/org/scalasteward/core/repoconfig/IncludeScalaStrategy.scala b/modules/core/src/main/scala/org/scalasteward/core/repoconfig/IncludeScalaStrategy.scala
deleted file mode 100644
index 02ed2baf..00000000
--- a/modules/core/src/main/scala/org/scalasteward/core/repoconfig/IncludeScalaStrategy.scala
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2018-2021 Scala Steward contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.scalasteward.core.repoconfig
-
-import cats.Eq
-import io.circe.{Decoder, Encoder}
-
-sealed trait IncludeScalaStrategy {
-  def name: String
-}
-
-object IncludeScalaStrategy {
-  final case object Yes extends IncludeScalaStrategy { val name = "yes" }
-  final case object Draft extends IncludeScalaStrategy { val name = "draft" }
-  final case object No extends IncludeScalaStrategy { val name = "no" }
-
-  val default: IncludeScalaStrategy = Draft
-
-  def fromString(value: String): IncludeScalaStrategy =
-    value.trim.toLowerCase match {
-      case Yes.name   => Yes
-      case Draft.name => Draft
-      case No.name    => No
-      case _          => default
-    }
-
-  def fromBoolean(value: Boolean): IncludeScalaStrategy =
-    if (value) Yes else No
-
-  implicit val includeScalaStrategyDecoder: Decoder[IncludeScalaStrategy] =
-    Decoder[Boolean].map(fromBoolean).or(Decoder[String].map(fromString))
-
-  implicit val includeScalaStrategyEncoder: Encoder[IncludeScalaStrategy] =
-    Encoder[String].contramap(_.name)
-
-  implicit val includeScalaStrategyEq: Eq[IncludeScalaStrategy] =
-    Eq.fromUniversalEquals
-}
diff --git a/modules/core/src/main/scala/org/scalasteward/core/repoconfig/UpdatesConfig.scala b/modules/core/src/main/scala/org/scalasteward/core/repoconfig/UpdatesConfig.scala
index 02ae7879..4155a40f 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/repoconfig/UpdatesConfig.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/repoconfig/UpdatesConfig.scala
@@ -37,12 +37,8 @@ final case class UpdatesConfig(
     allow: List[UpdatePattern] = List.empty,
     ignore: List[UpdatePattern] = List.empty,
     limit: Option[NonNegInt] = None,
-    includeScala: Option[IncludeScalaStrategy] = None,
     fileExtensions: Option[List[String]] = None
 ) {
-  def includeScalaOrDefault: IncludeScalaStrategy =
-    includeScala.getOrElse(IncludeScalaStrategy.default)
-
   def fileExtensionsOrDefault: Set[String] =
     fileExtensions.fold(UpdatesConfig.defaultFileExtensions)(_.toSet)
 
@@ -77,8 +73,6 @@ final case class UpdatesConfig(
 }
 
 object UpdatesConfig {
-  val defaultIncludeScala: Boolean = false
-
   val defaultFileExtensions: Set[String] =
     Set(".scala", ".sbt", ".sbt.shared", ".sc", ".yml", "pom.xml")
 
@@ -100,7 +94,6 @@ object UpdatesConfig {
           allow = mergeAllow(x.allow, y.allow),
           ignore = mergeIgnore(x.ignore, y.ignore),
           limit = x.limit.orElse(y.limit),
-          includeScala = x.includeScala.orElse(y.includeScala),
           fileExtensions = mergeFileExtensions(x.fileExtensions, y.fileExtensions)
         )
     )
diff --git a/modules/core/src/main/scala/org/scalasteward/core/update/FilterAlg.scala b/modules/core/src/main/scala/org/scalasteward/core/update/FilterAlg.scala
index 90d471e2..58f0fbf8 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/update/FilterAlg.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/update/FilterAlg.scala
@@ -73,14 +73,6 @@ object FilterAlg {
       .flatMap(selectSuitableNextVersion)
       .flatMap(checkVersionOrdering)
 
-  def isScalaDependency(dependency: Dependency): Boolean =
-    scalaLangModules.exists { case (groupId, artifactId) =>
-      groupId === dependency.groupId && artifactId.name === dependency.artifactId.name
-    }
-
-  def isScalaDependencyIgnored(dependency: Dependency, ignoreScalaDependency: Boolean): Boolean =
-    ignoreScalaDependency && isScalaDependency(dependency)
-
   def isDependencyConfigurationIgnored(dependency: Dependency): Boolean =
     dependency.configurations.fold("")(_.toLowerCase) match {
       case "phantom-js-jetty"    => true
diff --git a/modules/core/src/main/scala/org/scalasteward/core/update/PruningAlg.scala b/modules/core/src/main/scala/org/scalasteward/core/update/PruningAlg.scala
index 6cfc27ff..94dd1794 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/update/PruningAlg.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/update/PruningAlg.scala
@@ -22,7 +22,7 @@ import cats.implicits._
 import org.scalasteward.core.data._
 import org.scalasteward.core.nurture.PullRequestRepository
 import org.scalasteward.core.repocache.RepoCache
-import org.scalasteward.core.repoconfig.{IncludeScalaStrategy, PullRequestFrequency, RepoConfig}
+import org.scalasteward.core.repoconfig.{PullRequestFrequency, RepoConfig}
 import org.scalasteward.core.update.PruningAlg._
 import org.scalasteward.core.update.data.UpdateState
 import org.scalasteward.core.update.data.UpdateState._
@@ -41,13 +41,9 @@ final class PruningAlg[F[_]](implicit
     F: Monad[F]
 ) {
   def needsAttention(data: RepoData): F[(Boolean, List[Update.Single])] = {
-    val ignoreScalaDependency =
-      data.config.updates.includeScalaOrDefault === IncludeScalaStrategy.No
     val dependencies = data.cache.dependencyInfos
       .flatMap(_.sequence)
-      .collect {
-        case info if !ignoreDependency(info.value, ignoreScalaDependency) => info.map(_.dependency)
-      }
+      .collect { case info if !ignoreDependency(info.value) => info.map(_.dependency) }
       .sorted
     findUpdatesNeedingAttention(data, dependencies)
   }
@@ -169,9 +165,8 @@ final class PruningAlg[F[_]](implicit
 }
 
 object PruningAlg {
-  def ignoreDependency(info: DependencyInfo, ignoreScalaDependency: Boolean): Boolean =
+  def ignoreDependency(info: DependencyInfo): Boolean =
     info.filesContainingVersion.isEmpty ||
-      FilterAlg.isScalaDependencyIgnored(info.dependency, ignoreScalaDependency) ||
       FilterAlg.isDependencyConfigurationIgnored(info.dependency)
 
   def removeOvertakingUpdates(
diff --git a/modules/core/src/main/scala/org/scalasteward/core/vcs/data/NewPullRequestData.scala b/modules/core/src/main/scala/org/scalasteward/core/vcs/data/NewPullRequestData.scala
index 88e6a4e4..52983eec 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/vcs/data/NewPullRequestData.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/vcs/data/NewPullRequestData.scala
@@ -24,8 +24,7 @@ import org.scalasteward.core.data._
 import org.scalasteward.core.edit.scalafix.ScalafixMigration
 import org.scalasteward.core.git
 import org.scalasteward.core.git.Branch
-import org.scalasteward.core.repoconfig.{IncludeScalaStrategy, RepoConfigAlg}
-import org.scalasteward.core.update.FilterAlg
+import org.scalasteward.core.repoconfig.RepoConfigAlg
 import org.scalasteward.core.util.Details
 
 final case class UpdateState(
@@ -211,8 +210,6 @@ object NewPullRequestData {
         filesWithOldVersion
       ),
       head = branchName,
-      base = data.baseBranch,
-      draft = data.update.dependencies.exists(FilterAlg.isScalaDependency) &&
-        (data.repoData.config.updates.includeScalaOrDefault === IncludeScalaStrategy.Draft)
+      base = data.baseBranch
     )
 }


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/TestInstances.scala b/modules/core/src/test/scala/org/scalasteward/core/TestInstances.scala
index 8e192c29..96cc8619 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/TestInstances.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/TestInstances.scala
@@ -136,15 +136,6 @@ object TestInstances {
   private def smallListOf[A](maxSize: Int, genA: Gen[A]): Gen[List[A]] =
     Gen.choose(0, maxSize).flatMap(n => Gen.listOfN(n, genA))
 
-  implicit val includeScalaStrategyArbitrary: Arbitrary[IncludeScalaStrategy] =
-    Arbitrary(
-      Gen.oneOf(
-        IncludeScalaStrategy.Yes,
-        IncludeScalaStrategy.Draft,
-        IncludeScalaStrategy.No
-      )
-    )
-
   implicit val updatesConfigArbitrary: Arbitrary[UpdatesConfig] =
     Arbitrary(
       for {
@@ -152,14 +143,12 @@ object TestInstances {
         allow <- smallListOf(4, Arbitrary.arbitrary[UpdatePattern])
         ignore <- smallListOf(4, Arbitrary.arbitrary[UpdatePattern])
         limit <- Arbitrary.arbitrary[Option[NonNegInt]]
-        includeScala <- Arbitrary.arbitrary[Option[IncludeScalaStrategy]]
         fileExtensions <- Arbitrary.arbitrary[Option[List[String]]]
       } yield UpdatesConfig(
         pin = pin,
         allow = allow,
         ignore = ignore,
         limit = limit,
-        includeScala = includeScala,
         fileExtensions = fileExtensions
       )
     )
diff --git a/modules/core/src/test/scala/org/scalasteward/core/repoconfig/RepoConfigAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/repoconfig/RepoConfigAlgTest.scala
index 6241e783..5d96ea61 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/repoconfig/RepoConfigAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/repoconfig/RepoConfigAlgTest.scala
@@ -69,7 +69,6 @@ class RepoConfigAlgTest extends FunSuite {
           UpdatePattern(GroupId("org.acme"), None, Some(UpdatePattern.Version(Some("1.0"), None)))
         ),
         limit = Some(NonNegInt.unsafeFrom(4)),
-        includeScala = Some(IncludeScalaStrategy.Yes),
         fileExtensions = Some(List(".txt"))
       ),
       commits = CommitsConfig(
@@ -80,52 +79,6 @@ class RepoConfigAlgTest extends FunSuite {
     assertEquals(config, expected)
   }
 
-  test("config with 'updates.includeScala = false'") {
-    val content = "updates.includeScala = false"
-    val config = RepoConfigAlg.parseRepoConfig(content)
-    val expected = RepoConfig(updates = UpdatesConfig(includeScala = Some(IncludeScalaStrategy.No)))
-    assertEquals(config, Right(expected))
-  }
-
-  test("config with 'updates.includeScala = true'") {
-    val content = "updates.includeScala = true"
-    val config = RepoConfigAlg.parseRepoConfig(content)
-    val expected =
-      RepoConfig(updates = UpdatesConfig(includeScala = Some(IncludeScalaStrategy.Yes)))
-    assertEquals(config, Right(expected))
-  }
-
-  test("config with 'updates.includeScala = yes'") {
-    val content = """updates.includeScala = "yes""""
-    val config = RepoConfigAlg.parseRepoConfig(content)
-    val expected =
-      RepoConfig(updates = UpdatesConfig(includeScala = Some(IncludeScalaStrategy.Yes)))
-    assertEquals(config, Right(expected))
-  }
-
-  test("config with 'updates.includeScala = no'") {
-    val content = """updates.includeScala = "no""""
-    val config = RepoConfigAlg.parseRepoConfig(content)
-    val expected = RepoConfig(updates = UpdatesConfig(includeScala = Some(IncludeScalaStrategy.No)))
-    assertEquals(config, Right(expected))
-  }
-
-  test("config with 'updates.includeScala = draft'") {
-    val content = """updates.includeScala = "draft""""
-    val config = RepoConfigAlg.parseRepoConfig(content)
-    val expected =
-      RepoConfig(updates = UpdatesConfig(includeScala = Some(IncludeScalaStrategy.Draft)))
-    assertEquals(config, Right(expected))
-  }
-
-  test("config with 'updates.includeScala = foo'") {
-    val content = """updates.includeScala = "foo""""
-    val config = RepoConfigAlg.parseRepoConfig(content)
-    val expected =
-      RepoConfig(updates = UpdatesConfig(includeScala = Some(IncludeScalaStrategy.Draft)))
-    assertEquals(config, Right(expected))
-  }
-
   test("config with 'updatePullRequests = false'") {
     val content = "updatePullRequests = false"
     val config = RepoConfigAlg.parseRepoConfig(content)
diff --git a/modules/core/src/test/scala/org/scalasteward/core/update/FilterAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/update/FilterAlgTest.scala
index 255b2f55..441fec44 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/update/FilterAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/update/FilterAlgTest.scala
@@ -194,39 +194,6 @@ class FilterAlgTest extends FunSuite {
     assertEquals(localFilter(update, config), Left(VersionPinnedByConfig(update)))
   }
 
-  test("isScalaDependency: true") {
-    val dependency = Dependency(
-      GroupId("org.scala-lang"),
-      ArtifactId("scala-compiler", "scala-compiler_2.12"),
-      "2.12.10"
-    )
-    assert(isScalaDependency(dependency))
-  }
-
-  test("isScalaDependency: false") {
-    val dependency =
-      Dependency(GroupId("org.typelevel"), ArtifactId("cats-effect", "cats-effect_2.12"), "1.0.0")
-    assert(!isScalaDependency(dependency))
-  }
-
-  test("isScalaDependencyIgnored: true") {
-    val dependency = Dependency(
-      GroupId("org.scala-lang"),
-      ArtifactId("scala-compiler", "scala-compiler_2.12"),
-      "2.12.10"
-    )
-    assert(isScalaDependencyIgnored(dependency, ignoreScalaDependency = true))
-  }
-
-  test("isScalaDependencyIgnored: false") {
-    val dependency = Dependency(
-      GroupId("org.scala-lang"),
-      ArtifactId("scala-compiler", "scala-compiler_2.12"),
-      "2.12.10"
-    )
-    assert(!isScalaDependencyIgnored(dependency, ignoreScalaDependency = false))
-  }
-
   test("isDependencyConfigurationIgnored: false") {
     val dependency =
       Dependency(GroupId("org.typelevel"), ArtifactId("cats-effect", "cats-effect_2.12"), "1.0.0")
diff --git a/modules/core/src/test/scala/org/scalasteward/core/update/PruningAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/update/PruningAlgTest.scala
index 8518b540..51a59776 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/update/PruningAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/update/PruningAlgTest.scala
@@ -74,113 +74,7 @@ class PruningAlgTest extends FunSuite {
     assertEquals(state, expected)
   }
 
-  test("needsAttention: 0 updates when includeScala=no specified in repo config") {
-    val repo = Repo("pruning-test", "repo2")
-    val Right(repoCache) = decode[RepoCache](
-      s"""|{
-          |  "sha1": "12def27a837ba6dc9e17406cbbe342fba3527c14",
-          |  "dependencyInfos" : [
-          |    {
-          |      "value" : [
-          |        {
-          |          "dependency" : {
-          |            "groupId" : "org.scala-lang",
-          |            "artifactId" : {
-          |              "name" : "scala-library",
-          |              "maybeCrossName" : null
-          |            },
-          |            "version" : "2.12.10",
-          |            "sbtVersion" : null,
-          |            "scalaVersion" : null,
-          |            "configurations" : null
-          |          },
-          |          "filesContainingVersion" : [
-          |            "build.sbt"
-          |          ]
-          |        }
-          |      ],
-          |      "resolvers" : [
-          |        {
-          |          "MavenRepository" : {
-          |            "name" : "public",
-          |            "location" : "https://foobar.org/maven2/"
-          |          }
-          |        }
-          |      ]
-          |    }
-          |  ],
-          |  "maybeRepoConfig": {
-          |    "pullRequests": {
-          |      "frequency": "@daily"
-          |    },
-          |    "updates" : {
-          |      "includeScala" : "no"
-          |    }
-          |  }
-          |}""".stripMargin
-    )
-    val pullRequestsFile =
-      config.workspace / s"store/pull_requests/v2/github/${repo.show}/pull_requests.json"
-    val pullRequestsContent =
-      s"""|{
-          |  "https://github.com/${repo.show}/pull/27" : {
-          |    "baseSha1" : "12def27a837ba6dc9e17406cbbe342fba3527c14",
-          |    "update" : {
-          |      "Single" : {
-          |        "crossDependency" : [
-          |          {
-          |            "groupId" : "org.scalatest",
-          |            "artifactId" : {
-          |              "name" : "scalatest",
-          |              "maybeCrossName" : "scalatest_2.12"
-          |            },
-          |            "version" : "3.0.8",
-          |            "sbtVersion" : null,
-          |            "scalaVersion" : null,
-          |            "configurations" : null
-          |          }
-          |        ],
-          |        "newerVersions" : [
-          |          "3.1.0"
-          |        ],
-          |        "newerGroupId" : null
-          |      }
-          |    },
-          |    "state" : "open",
-          |    "entryCreatedAt" : 1581969227183
-          |  }
-          |}""".stripMargin
-    val versionsFile =
-      config.workspace / "store/versions/v2/https/foobar.org/maven2/org/scala-lang/scala-library/versions.json"
-    val versionsContent =
-      s"""|{
-          |  "updatedAt" : 9999999999999,
-          |  "versions" : [
-          |    "2.12.9",
-          |    "2.12.10",
-          |    "2.12.11",
-          |    "2.13.0",
-          |    "2.13.1"
-          |  ]
-          |}
-          |""".stripMargin
-    val initial = MockState.empty
-      .addFiles(pullRequestsFile -> pullRequestsContent, versionsFile -> versionsContent)
-      .unsafeRunSync()
-    val data = RepoData(repo, repoCache, repoCache.maybeRepoConfig.getOrElse(RepoConfig.empty))
-    val state = pruningAlg.needsAttention(data).runS(initial).unsafeRunSync()
-    val expected = initial.copy(
-      trace = Vector(
-        Log(s"Find updates for ${repo.show}"),
-        Log("Found 0 updates"),
-        Cmd("read", pullRequestsFile.toString),
-        Log(s"${repo.show} is up-to-date")
-      )
-    )
-    assertEquals(state, expected)
-  }
-
-  test("needsAttention: update scala-library when includeScala=yes in repo config") {
+  test("needsAttention: update scala-library") {
     val repo = Repo("pruning-test", "repo3")
     val Right(repoCache) = decode[RepoCache](
       s"""|{
@@ -287,113 +181,6 @@ class PruningAlgTest extends FunSuite {
     assertEquals(state, expected)
   }
 
-  test("needsAttention: update scala-library when includeScala=draft in repo config") {
-    val repo = Repo("pruning-test", "repo4")
-    val Right(repoCache) = decode[RepoCache](
-      s"""|{
-          |  "sha1": "12def27a837ba6dc9e17406cbbe342fba3527c14",
-          |  "dependencyInfos" : [
-          |    {
-          |      "value" : [
-          |        {
-          |          "dependency" : {
-          |            "groupId" : "org.scala-lang",
-          |            "artifactId" : {
-          |              "name" : "scala-library",
-          |              "maybeCrossName" : null
-          |            },
-          |            "version" : "2.12.10",
-          |            "sbtVersion" : null,
-          |            "scalaVersion" : null,
-          |            "configurations" : null
-          |          },
-          |          "filesContainingVersion" : [
-          |            "build.sbt"
-          |          ]
-          |        }
-          |      ],
-          |      "resolvers" : [
-          |        {
-          |          "MavenRepository" : {
-          |            "name" : "public",
-          |            "location" : "https://foobar.org/maven2/"
-          |          }
-          |        }
-          |      ]
-          |    }
-          |  ],
-          |  "maybeRepoConfig": {
-          |    "updates" : {
-          |      "includeScala" : "draft"
-          |    }
-          |  }
-          |}""".stripMargin
-    )
-    val pullRequestsFile =
-      config.workspace / s"store/pull_requests/v2/github/${repo.show}/pull_requests.json"
-    val pullRequestsContent =
-      s"""|{
-          |  "https://github.com/${repo.show}/pull/27" : {
-          |    "baseSha1" : "12def27a837ba6dc9e17406cbbe342fba3527c14",
-          |    "update" : {
-          |      "Single" : {
-          |        "crossDependency" : [
-          |          {
-          |            "groupId" : "org.scalatest",
-          |            "artifactId" : {
-          |              "name" : "scalatest",
-          |              "maybeCrossName" : "scalatest_2.12"
-          |            },
-          |            "version" : "3.0.8",
-          |            "sbtVersion" : null,
-          |            "scalaVersion" : null,
-          |            "configurations" : null
-          |          }
-          |        ],
-          |        "newerVersions" : [
-          |          "3.1.0"
-          |        ],
-          |        "newerGroupId" : null
-          |      }
-          |    },
-          |    "state" : "open",
-          |    "entryCreatedAt" : 1581969227183
-          |  }
-          |}""".stripMargin
-    val versionsFile =
-      config.workspace / "store/versions/v2/https/foobar.org/maven2/org/scala-lang/scala-library/versions.json"
-    val versionsContent =
-      s"""|{
-          |  "updatedAt" : 9999999999999,
-          |  "versions" : [
-          |    "2.12.9",
-          |    "2.12.10",
-          |    "2.12.11",
-          |    "2.13.0",
-          |    "2.13.1"
-          |  ]
-          |}
-          |""".stripMargin
-    val initial = MockState.empty
-      .addFiles(pullRequestsFile -> pullRequestsContent, versionsFile -> versionsContent)
-      .unsafeRunSync()
-    val data = RepoData(repo, repoCache, repoCache.maybeRepoConfig.getOrElse(RepoConfig.empty))
-    val state = pruningAlg.needsAttention(data).runS(initial).unsafeRunSync()
-    val expected = initial.copy(
-      trace = Vector(
-        Log(s"Find updates for ${repo.show}"),
-        Cmd("read", versionsFile.toString),
-        Cmd("read", pullRequestsFile.toString),
-        Cmd("read", versionsFile.toString),
-        Log("Found 1 update:\n  org.scala-lang:scala-library : 2.12.10 -> 2.12.11"),
-        Log(
-          s"${repo.show} is outdated:\n  new version: org.scala-lang:scala-library : 2.12.10 -> 2.12.11"
-        )
-      )
-    )
-    assertEquals(state, expected)
-  }
-
   test("needsAttention: no overtaking updates") {
     val repo = Repo("pruning-test", "repo5")
     val repoCache = dummyRepoCache.copy(dependencyInfos =
diff --git a/modules/core/src/test/scala/org/scalasteward/core/vcs/data/NewPullRequestDataTest.scala b/modules/core/src/test/scala/org/scalasteward/core/vcs/data/NewPullRequestDataTest.scala
index ef7d8c3b..614ea4ba 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/vcs/data/NewPullRequestDataTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/vcs/data/NewPullRequestDataTest.scala
@@ -9,7 +9,7 @@ import org.scalasteward.core.buildtool.sbt.data.SbtVersion
 import org.scalasteward.core.data._
 import org.scalasteward.core.edit.scalafix.ScalafixMigration
 import org.scalasteward.core.git.{Branch, Sha1}
-import org.scalasteward.core.repoconfig.{IncludeScalaStrategy, RepoConfig, UpdatesConfig}
+import org.scalasteward.core.repoconfig.RepoConfig
 import org.scalasteward.core.util.Nel
 
 class NewPullRequestDataTest extends FunSuite {
@@ -37,65 +37,6 @@ class NewPullRequestDataTest extends FunSuite {
     assertEquals(obtained, expected)
   }
 
-  test("asJson for scala update with includeScalaStrategy=draft") {
-    val data = UpdateData(
-      RepoData(
-        Repo("foo", "bar"),
-        dummyRepoCache,
-        RepoConfig(updates = UpdatesConfig(includeScala = Some(IncludeScalaStrategy.Draft)))
-      ),
-      Repo("scala-steward", "bar"),
-      Update.Single("org.scala-lang" % "scala-library" % "2.12.10", Nel.of("2.12.11")),
-      Branch("master"),
-      Sha1(Sha1.HexString.unsafeFrom("d6b6791d2ea11df1d156fe70979ab8c3a5ba3433")),
-      Branch("update/scala-library-2.12.11")
-    )
-    val obtained = NewPullRequestData
-      .from(data, "scala-steward:update/scala-library-2.12.11")
-      .asJson
-      .spaces2
-    val expected =
-      raw"""|{
-            |  "title" : "Update scala-library to 2.12.11",
-            |  "body" : "Updates org.scala-lang:scala-library from 2.12.10 to 2.12.11.\n\n\nI'll automatically update this PR to resolve conflicts as long as you don't change it yourself.\n\nIf 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.\n\nConfigure 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.\n\nHave a fantastic day writing Scala!\n\n<details>\n<summary>Ignore future updates</summary>\n\nAdd this to your `.scala-steward.conf` file to ignore future updates of this dependency:\n```\nupdates.ignore = [ { groupId = \"org.scala-lang\", artifactId = \"scala-library\" } ]\n```\n</details>\n\nlabels: library-update, semver-patch",
-            |  "head" : "scala-steward:update/scala-library-2.12.11",
-            |  "base" : "master",
-            |  "draft" : true
-            |}""".stripMargin
-    assertEquals(obtained, expected)
-  }
-
-  test("asJson for group scala update with includeScalaStrategy=draft") {
-    val data = UpdateData(
-      RepoData(
-        Repo("foo", "bar"),
-        dummyRepoCache,
-        RepoConfig(updates = UpdatesConfig(includeScala = Some(IncludeScalaStrategy.Draft)))
-      ),
-      Repo("scala-steward", "bar"),
-      Update.Group(
-        "org.scala-lang" % Nel.of("scala-library", "scala-reflect") % "2.12.10",
-        Nel.of("2.12.11")
-      ),
-      Branch("master"),
-      Sha1(Sha1.HexString.unsafeFrom("d6b6791d2ea11df1d156fe70979ab8c3a5ba3433")),
-      Branch("update/scala-library-2.12.11")
-    )
-    val obtained = NewPullRequestData
-      .from(data, "scala-steward:update/scala-library-2.12.11")
-      .asJson
-      .spaces2
-    val expected =
-      raw"""|{
-            |  "title" : "Update scala-library, scala-reflect to 2.12.11",
-            |  "body" : "Updates \n* org.scala-lang:scala-library\n* org.scala-lang:scala-reflect\n\n from 2.12.10 to 2.12.11.\n\n\nI'll automatically update this PR to resolve conflicts as long as you don't change it yourself.\n\nIf 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.\n\nConfigure 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.\n\nHave a fantastic day writing Scala!\n\n<details>\n<summary>Ignore future updates</summary>\n\nAdd this to your `.scala-steward.conf` file to ignore future updates of this dependency:\n```\nupdates.ignore = [ { groupId = \"org.scala-lang\" } ]\n```\n</details>\n\nlabels: library-update, semver-patch",
-            |  "head" : "scala-steward:update/scala-library-2.12.11",
-            |  "base" : "master",
-            |  "draft" : true
-            |}""".stripMargin
-    assertEquals(obtained, expected)
-  }
-
   test("fromTo") {
     assertEquals(
       NewPullRequestData.fromTo(