Skip to content

Commit 86a7fa1

Browse files
authored
Merge branch 'master' into mergeable-repo-configurations
2 parents be30eb5 + 6525ca6 commit 86a7fa1

File tree

102 files changed

+643
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+643
-370
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 2.6.4
1+
version = 2.7.2
22
assumeStandardLibraryStripMargin = true
33
align.openParenCallSite = false
44
align.openParenDefnSite = false

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ os: linux
55
dist: xenial
66

77
scala:
8-
- 2.13.2
8+
- 2.13.3
99
- 2.12.10
1010

1111
jdk:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Thanks goes to these wonderful people for contributing to Scala Steward:
7878
* [Dale Wijnand](https://github.com/dwijnand)
7979
* [Daniel Pfeiffer](https://github.com/dpfeiffer)
8080
* [David Francoeur](https://github.com/daddykotex)
81+
* [Don Smith III](https://github.com/cactauz)
8182
* [Doug Roper](https://github.com/htmldoug)
8283
* [Eldar Yusupov](https://github.com/eyusupov)
8384
* [Erik Erlandson](https://github.com/erikerlandson)
@@ -151,9 +152,9 @@ Consider creating PR to add your company to the list and join the community.
151152
* [Lightbend](https://www.lightbend.com/)
152153
* [Ocado Technology](https://ocadotechnology.com/)
153154
* [PlayQ](https://www.playq.com/)
155+
* [Precog](https://precog.com/)
154156
* [Rewards Network](https://www.rewardsnetwork.com/)
155157
* [Septeni Original](https://www.septeni-original.co.jp)
156-
* [SlamData](https://slamdata.com/)
157158
* [Snowplow Analytics](https://snowplowanalytics.com/)
158159
* [SoftwareMill](https://softwaremill.com)
159160
* [Spotify](https://www.spotify.com)

build.sbt

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ val moduleCrossPlatformMatrix: Map[String, List[Platform]] = Map(
1515
)
1616

1717
val Scala212 = "2.12.10"
18-
val Scala213 = "2.13.2"
18+
val Scala213 = "2.13.3"
1919

2020
/// projects
2121

@@ -35,6 +35,7 @@ lazy val core = myCrossProject("core")
3535
Dependencies.attoCore,
3636
Dependencies.betterFiles,
3737
Dependencies.caseApp,
38+
Dependencies.catsCore,
3839
Dependencies.catsEffect,
3940
Dependencies.circeConfig,
4041
Dependencies.circeGeneric,
@@ -61,7 +62,8 @@ lazy val core = myCrossProject("core")
6162
Dependencies.http4sDsl % Test,
6263
Dependencies.refinedScalacheck % Test,
6364
Dependencies.scalacheck % Test,
64-
Dependencies.scalaTest % Test
65+
Dependencies.scalaTestFunSuite % Test,
66+
Dependencies.scalaTestShouldMatcher % Test
6567
),
6668
assembly / test := {},
6769
assemblyMergeStrategy in assembly := {
@@ -90,14 +92,14 @@ lazy val core = myCrossProject("core")
9092
scalaBinaryVersion,
9193
sbtVersion,
9294
BuildInfoKey.map(git.gitHeadCommit) { case (k, v) => k -> v.getOrElse("master") },
93-
BuildInfoKey.map(`sbt-plugin`.jvm / moduleRootPkg) {
94-
case (_, v) => "sbtPluginModuleRootPkg" -> v
95+
BuildInfoKey.map(`sbt-plugin`.jvm / moduleRootPkg) { case (_, v) =>
96+
"sbtPluginModuleRootPkg" -> v
9597
},
96-
BuildInfoKey.map(`mill-plugin`.jvm / moduleName) {
97-
case (_, v) => "millPluginModuleName" -> v
98+
BuildInfoKey.map(`mill-plugin`.jvm / moduleName) { case (_, v) =>
99+
"millPluginModuleName" -> v
98100
},
99-
BuildInfoKey.map(`mill-plugin`.jvm / moduleRootPkg) {
100-
case (_, v) => "millPluginModuleRootPkg" -> v
101+
BuildInfoKey.map(`mill-plugin`.jvm / moduleRootPkg) { case (_, v) =>
102+
"millPluginModuleRootPkg" -> v
101103
}
102104
),
103105
buildInfoPackage := moduleRootPkg.value,
@@ -119,7 +121,7 @@ lazy val core = myCrossProject("core")
119121
implicit val ioContextShift: ContextShift[IO] = IO.contextShift(ExecutionContext.global)
120122
implicit val ioTimer: Timer[IO] = IO.timer(ExecutionContext.global)
121123
implicit val logger: Logger[IO] = Slf4jLogger.getLogger[IO]
122-
implicit val client: Client[IO] = AsyncHttpClient.allocate[IO]().map(_._1).unsafeRunSync
124+
implicit val client: Client[IO] = AsyncHttpClient.allocate[IO]().map(_._1).unsafeRunSync()
123125
""",
124126
fork in run := true,
125127
fork in Test := true,
@@ -137,7 +139,7 @@ lazy val `sbt-plugin` = myCrossProject("sbt-plugin")
137139
lazy val `mill-plugin` = myCrossProject("mill-plugin")
138140
.settings(
139141
crossScalaVersions := Seq(Scala213, Scala212),
140-
libraryDependencies += Dependencies.mill.value % Provided
142+
libraryDependencies += Dependencies.millScalalib.value % Provided
141143
)
142144

143145
/// settings
@@ -203,14 +205,14 @@ lazy val dockerSettings = Def.settings(
203205
val getSbtVersion = sbtVersion.value
204206
val sbtTgz = s"sbt-$getSbtVersion.tgz"
205207
val sbtUrl = s"https://github.com/sbt/sbt/releases/download/v$getSbtVersion/$sbtTgz"
206-
val millVersion = Dependencies.mill.value.revision
208+
val millVersion = Dependencies.millVersion.value
207209
Seq(
208210
Cmd("USER", "root"),
209211
Cmd("RUN", "apk --no-cache add bash git ca-certificates curl maven"),
210212
Cmd("RUN", s"wget $sbtUrl && tar -xf $sbtTgz && rm -f $sbtTgz"),
211213
Cmd(
212214
"RUN",
213-
s"curl -L https://github.com/lihaoyi/mill/releases/download/$millVersion/$millVersion > /usr/local/bin/mill && chmod +x /usr/local/bin/mill"
215+
s"curl -L https://github.com/lihaoyi/mill/releases/download/${millVersion.split("-").head}/$millVersion > /usr/local/bin/mill && chmod +x /usr/local/bin/mill"
214216
)
215217
)
216218
},
Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
migrations = [
2-
{
3-
groupId: "org.scalaz",
4-
artifactIds: ["scalaz-.*"],
5-
newVersion: "7.3.0",
6-
rewriteRules: ["https://raw.githubusercontent.com/scalaz/scalazfix/master/rules/src/main/scala/scalaz/ScalazFix.scala"]
7-
},
82
{
93
groupId: "co.fs2",
104
artifactIds: ["fs2-.*"],
115
newVersion: "1.0.0",
126
rewriteRules: ["github:functional-streams-for-scala/fs2/v1?sha=v1.0.5"]
137
},
8+
{
9+
groupId: "com.spotify",
10+
artifactIds: ["scio-.*"],
11+
newVersion: "0.8.0",
12+
rewriteRules: ["github:spotify/scio/MigrateV0_8?sha=v0.8.0"]
13+
},
1414
{
1515
groupId: "com.spotify",
1616
artifactIds: ["scio-.*"],
@@ -23,24 +23,25 @@ migrations = [
2323
],
2424
doc: "https://github.com/spotify/scio/blob/v0.7.0/site/src/paradox/migrations/v0.7.0-Migration-Guide.md#automated-migration"
2525
},
26-
{
27-
groupId: "com.spotify",
28-
artifactIds: ["scio-.*"],
29-
newVersion: "0.8.0",
30-
rewriteRules: ["github:spotify/scio/MigrateV0_8?sha=v0.8.0"]
31-
},
3226
{
3327
groupId: "com.twilio",
3428
artifactIds: ["sbt-guardrail"],
3529
newVersion: "0.59.0.1",
3630
rewriteRules: ["https://raw.githubusercontent.com/blast-hardcheese/guardrail-scalafix-rules/master/rules/src/main/scala/fix/GuardrailScalaResponseTypes.scala"],
3731
doc: "https://github.com/twilio/guardrail/blob/master/MIGRATING.md#0590-may-contain-type-and-package-naming-changes-that-will-require-changes-in-consuming-code"
3832
},
33+
{
34+
groupId: "com.typesafe.akka",
35+
artifactIds: ["akka-http.*"],
36+
newVersion: "10.2.0",
37+
rewriteRules: ["dependency:[email protected]:akka-http-scalafix-rules:10.2.0"],
38+
doc: "https://doc.akka.io/docs/akka-http/10.2/migration-guide/migration-guide-10.2.x.html#akka-http-10-1-x-10-2-0"
39+
},
3940
{
4041
groupId: "dev.zio",
4142
artifactIds: ["zio-test"],
4243
newVersion: "1.0.0-RC18",
43-
rewriteRules: ["github:zio/zio/CurriedAssert"]
44+
rewriteRules: ["github:zio/zio/CurriedAssert?sha=v1.0.0-RC18"]
4445
},
4546
{
4647
groupId: "org.http4s",
@@ -57,18 +58,17 @@ migrations = [
5758
doc: "https://github.com/http4s/http4s/blob/v0.20.0/docs/src/main/tut/upgrading.md"
5859
},
5960
{
60-
groupId: "org.typelevel",
61-
artifactIds: ["cats-core"],
62-
newVersion: "1.0.0",
63-
rewriteRules: ["https://raw.githubusercontent.com/typelevel/cats/master/scalafix/rules/src/main/scala/fix/Cats_v1_0_0.scala"],
64-
doc: "https://github.com/typelevel/cats/blob/v1.0.0/scalafix/README.md"
61+
groupId: "org.manatki",
62+
artifactIds: ["derevo-.*"],
63+
newVersion: "0.11.0",
64+
rewriteRules: ["https://gist.githubusercontent.com/REDNBLACK/9bc56ad71e4b01a63001339fa61b4cfd/raw/5f1cd32713c3235a83fe2d1d182bd71a001ef464/derevo-v0.11.0.scala"],
65+
doc: "https://github.com/manatki/derevo/blob/0.11.3/README.md#breaking-changes-in-011"
6566
},
6667
{
67-
groupId: "org.scalatest",
68-
artifactIds: ["scalatest"],
69-
newVersion: "3.0.8",
70-
rewriteRules: ["https://raw.githubusercontent.com/scalatest/autofix/e4de53fa40fac423bd64d165ff36bde38ce52388/3.0.x/rules/src/main/scala/org/scalatest/autofix/v3_0_x/RenameDeprecatedPackage.scala"],
71-
doc: "https://github.com/scalatest/autofix/blob/master/3.0.x/README.md"
68+
groupId: "org.scalacheck",
69+
artifactIds: ["scalacheck"],
70+
newVersion: "1.14.1",
71+
rewriteRules: ["github:typelevel/scalacheck/v1_14_1?sha=1.14.1"]
7272
},
7373
{
7474
groupId: "org.scalatest",
@@ -78,23 +78,31 @@ migrations = [
7878
doc: "https://github.com/scalatest/autofix/blob/master/3.1.x/README.md"
7979
},
8080
{
81-
groupId: "org.scalacheck",
82-
artifactIds: ["scalacheck"],
83-
newVersion: "1.14.1",
84-
rewriteRules: ["github:typelevel/scalacheck/v1_14_1?sha=3fc537dde9d8fdf951503a8d8b027a568d52d055"]
81+
groupId: "org.scalatest",
82+
artifactIds: ["scalatest"],
83+
newVersion: "3.0.8",
84+
rewriteRules: ["https://raw.githubusercontent.com/scalatest/autofix/e4de53fa40fac423bd64d165ff36bde38ce52388/3.0.x/rules/src/main/scala/org/scalatest/autofix/v3_0_x/RenameDeprecatedPackage.scala"],
85+
doc: "https://github.com/scalatest/autofix/blob/master/3.0.x/README.md"
8586
},
8687
{
87-
groupId: "org.manatki",
88-
artifactIds: ["derevo-.*"],
89-
newVersion: "0.11.0",
90-
rewriteRules: ["https://gist.githubusercontent.com/REDNBLACK/9bc56ad71e4b01a63001339fa61b4cfd/raw/5f1cd32713c3235a83fe2d1d182bd71a001ef464/derevo-v0.11.0.scala"],
91-
doc: "https://github.com/manatki/derevo/blob/0.11.3/README.md#breaking-changes-in-011"
88+
groupId: "org.scalaz",
89+
artifactIds: ["scalaz-.*"],
90+
newVersion: "7.3.0",
91+
rewriteRules: ["https://raw.githubusercontent.com/scalaz/scalazfix/v0.1.2/rules/src/main/scala/scalaz/ScalazFix.scala"]
9292
},
9393
{
94-
groupId: "com.typesafe.akka",
95-
artifactIds: ["akka-http.*"],
96-
newVersion: "10.2.0",
97-
rewriteRules: ["dependency:[email protected]:akka-http-scalafix-rules:10.2.0"],
98-
doc: "https://doc.akka.io/docs/akka-http/10.2/migration-guide/migration-guide-10.2.x.html#akka-http-10-1-x-10-2-0"
94+
groupId: "org.typelevel",
95+
artifactIds: ["cats-core"],
96+
newVersion: "2.2.0",
97+
rewriteRules: ["github:typelevel/cats/Cats_v2_2_0"],
98+
doc: "https://github.com/typelevel/cats/blob/master/scalafix/README.md#migration-to-cats-v220",
99+
scalacOptions: ["-P:semanticdb:synthetics:on"]
100+
},
101+
{
102+
groupId: "org.typelevel",
103+
artifactIds: ["cats-core"],
104+
newVersion: "1.0.0",
105+
rewriteRules: ["https://raw.githubusercontent.com/typelevel/cats/v2.1.1/scalafix/rules/src/main/scala/fix/Cats_v1_0_0.scala"],
106+
doc: "https://github.com/typelevel/cats/blob/v2.1.1/scalafix/README.md"
99107
}
100108
]

modules/core/src/main/scala/org/scalasteward/core/application/Cli.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package org.scalasteward.core.application
1919
import caseapp._
2020
import caseapp.core.Error.MalformedValue
2121
import caseapp.core.argparser.{ArgParser, SimpleArgParser}
22-
import cats.implicits._
22+
import cats.syntax.all._
2323
import org.http4s.Uri
2424
import org.http4s.syntax.literals._
2525
import org.scalasteward.core.application.Cli._
@@ -56,7 +56,8 @@ object Cli {
5656
groupMigrations: Option[String] = None,
5757
cacheTtl: FiniteDuration = 2.hours,
5858
cacheMissDelay: FiniteDuration = 0.milliseconds,
59-
bitbucketServerUseDefaultReviewers: Boolean = false
59+
bitbucketServerUseDefaultReviewers: Boolean = false,
60+
gitlabMergeWhenPipelineSucceeds: Boolean = false
6061
)
6162

6263
final case class EnvVar(name: String, value: String)

modules/core/src/main/scala/org/scalasteward/core/application/Config.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ final case class Config(
7272
groupMigrations: Option[File],
7373
cacheTtl: FiniteDuration,
7474
cacheMissDelay: FiniteDuration,
75-
bitbucketServerUseDefaultReviewers: Boolean
75+
bitbucketServerUseDefaultReviewers: Boolean,
76+
gitlabMergeWhenPipelineSucceeds: Boolean
7677
) {
7778
def vcsUser[F[_]](implicit F: Sync[F]): F[AuthenticatedUser] = {
7879
val urlWithUser = util.uri.withUserInfo.set(UserInfo(vcsLogin, None))(vcsApiHost).renderString
@@ -108,7 +109,8 @@ object Config {
108109
groupMigrations = args.groupMigrations.map(_.toFile),
109110
cacheTtl = args.cacheTtl,
110111
cacheMissDelay = args.cacheMissDelay,
111-
bitbucketServerUseDefaultReviewers = args.bitbucketServerUseDefaultReviewers
112+
bitbucketServerUseDefaultReviewers = args.bitbucketServerUseDefaultReviewers,
113+
gitlabMergeWhenPipelineSucceeds = args.gitlabMergeWhenPipelineSucceeds
112114
)
113115
}
114116
}

modules/core/src/main/scala/org/scalasteward/core/application/SelfCheckAlg.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.scalasteward.core.application
1818

19-
import cats.implicits._
19+
import cats.syntax.all._
2020
import io.chrisdavenport.log4cats.Logger
2121
import org.http4s.Uri
2222
import org.scalasteward.core.util.{HttpExistenceClient, MonadThrowable}

modules/core/src/main/scala/org/scalasteward/core/application/StewardAlg.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package org.scalasteward.core.application
1919
import better.files.File
2020
import cats.Monad
2121
import cats.effect.ExitCode
22-
import cats.implicits._
22+
import cats.syntax.all._
2323
import fs2.Stream
2424
import io.chrisdavenport.log4cats.Logger
2525
import org.scalasteward.core.buildtool.sbt.SbtAlg
@@ -64,8 +64,8 @@ final class StewardAlg[F[_]](implicit
6464
fileAlg.readFile(reposFile).map { maybeContent =>
6565
val regex = """-\s+(.+)/([^/]+)""".r
6666
val content = maybeContent.getOrElse("")
67-
content.linesIterator.collect {
68-
case regex(owner, repo) => Repo(owner.trim, repo.trim)
67+
content.linesIterator.collect { case regex(owner, repo) =>
68+
Repo(owner.trim, repo.trim)
6969
}.toList
7070
}
7171

modules/core/src/main/scala/org/scalasteward/core/application/SupportedVCS.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package org.scalasteward.core.application
1919
import caseapp.core.Error.MalformedValue
2020
import caseapp.core.argparser.ArgParser
2121
import cats.Eq
22-
import cats.implicits._
22+
import cats.syntax.all._
2323

2424
sealed trait SupportedVCS {
2525
import SupportedVCS.{Bitbucket, BitbucketServer, GitHub, Gitlab}

0 commit comments

Comments
 (0)