From da451718a59f4a4b087c1bade86a69cd83b1052b Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 30 Mar 2024 21:02:59 +0000 Subject: [PATCH 1/3] Update scalafmt-core to 3.8.1 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 0bb5f198..ea1c43b5 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,6 +1,6 @@ runner.dialect=scala3 -version = "3.5.9" +version = "3.8.1" maxColumn = 140 align.preset = some align.tokens."+" = [ From 5ca48ad9b2b7f0ae0fda87c781db676ead8b1488 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 30 Mar 2024 21:03:13 +0000 Subject: [PATCH 2/3] Reformat with scalafmt 3.8.1 Executed command: scalafmt --non-interactive --- bootstrap/src/main/scala/org/polyvariant/Gitlab.scala | 4 +++- bootstrap/src/main/scala/org/polyvariant/Logger.scala | 5 ++++- gitlab/src/main/scala/io/pg/gitlab/Gitlab.scala | 4 +++- src/main/scala/io/pg/MergeRequests.scala | 5 ++++- src/main/scala/io/pg/actions.scala | 5 ++++- src/main/scala/io/pg/config/DiscriminatedCodec.scala | 6 +++++- src/main/scala/io/pg/config/ProjectConfig.scala | 5 ++++- src/main/scala/io/pg/resolver.scala | 5 ++++- src/main/scala/io/pg/webhook/webhook.scala | 6 +----- src/test/scala/io/pg/fakes/ProjectActionsStateFake.scala | 6 +++--- 10 files changed, 35 insertions(+), 16 deletions(-) diff --git a/bootstrap/src/main/scala/org/polyvariant/Gitlab.scala b/bootstrap/src/main/scala/org/polyvariant/Gitlab.scala index c633e317..a6e241b0 100644 --- a/bootstrap/src/main/scala/org/polyvariant/Gitlab.scala +++ b/bootstrap/src/main/scala/org/polyvariant/Gitlab.scala @@ -32,7 +32,9 @@ trait Gitlab[F[_]] { object Gitlab { - def apply[F[_]](using ev: Gitlab[F]): Gitlab[F] = ev + def apply[F[_]]( + using ev: Gitlab[F] + ): Gitlab[F] = ev def sttpInstance[F[_]: Logger: MonadThrow]( baseUri: Uri, diff --git a/bootstrap/src/main/scala/org/polyvariant/Logger.scala b/bootstrap/src/main/scala/org/polyvariant/Logger.scala index 47274391..39d16cff 100644 --- a/bootstrap/src/main/scala/org/polyvariant/Logger.scala +++ b/bootstrap/src/main/scala/org/polyvariant/Logger.scala @@ -13,7 +13,10 @@ trait Logger[F[_]] { } object Logger { - def apply[F[_]](using ev: Logger[F]): Logger[F] = ev + + def apply[F[_]]( + using ev: Logger[F] + ): Logger[F] = ev def wrappedPrint[F[_]: Sync] = new Logger[F] { private def colorPrinter(color: String)(msg: String): F[Unit] = diff --git a/gitlab/src/main/scala/io/pg/gitlab/Gitlab.scala b/gitlab/src/main/scala/io/pg/gitlab/Gitlab.scala index 08b9e758..86803a9e 100644 --- a/gitlab/src/main/scala/io/pg/gitlab/Gitlab.scala +++ b/gitlab/src/main/scala/io/pg/gitlab/Gitlab.scala @@ -44,7 +44,9 @@ trait Gitlab[F[_]] { object Gitlab { - def apply[F[_]](using F: Gitlab[F]): Gitlab[F] = F + def apply[F[_]]( + using F: Gitlab[F] + ): Gitlab[F] = F // VCS-specific MR information // Not specific to the method of fetching (no graphql model references etc.) diff --git a/src/main/scala/io/pg/MergeRequests.scala b/src/main/scala/io/pg/MergeRequests.scala index 1f9faaf6..7be0eeff 100644 --- a/src/main/scala/io/pg/MergeRequests.scala +++ b/src/main/scala/io/pg/MergeRequests.scala @@ -20,7 +20,10 @@ trait MergeRequests[F[_]] { } object MergeRequests { - def apply[F[_]](using F: MergeRequests[F]): MergeRequests[F] = F + + def apply[F[_]]( + using F: MergeRequests[F] + ): MergeRequests[F] = F import scala.util.chaining._ diff --git a/src/main/scala/io/pg/actions.scala b/src/main/scala/io/pg/actions.scala index d780a7a6..35487cfa 100644 --- a/src/main/scala/io/pg/actions.scala +++ b/src/main/scala/io/pg/actions.scala @@ -28,7 +28,10 @@ trait ProjectActions[F[_]] { } object ProjectActions { - def apply[F[_]](implicit F: ProjectActions[F]): F.type = F + + def apply[F[_]]( + implicit F: ProjectActions[F] + ): F.type = F def defaultResolve[F[_]: Applicative: Logger](mr: MergeRequestState): F[Option[ProjectAction]] = mr.mergeability match { case CanMerge => diff --git a/src/main/scala/io/pg/config/DiscriminatedCodec.scala b/src/main/scala/io/pg/config/DiscriminatedCodec.scala index cb7a7e3f..f25170fd 100644 --- a/src/main/scala/io/pg/config/DiscriminatedCodec.scala +++ b/src/main/scala/io/pg/config/DiscriminatedCodec.scala @@ -23,7 +23,11 @@ object DiscriminatedCodec { ) :: deriveAll[t] } - inline def derived[A](discriminator: String)(using inline m: Mirror.SumOf[A]): Codec.AsObject[A] = { + inline def derived[A]( + discriminator: String + )( + using inline m: Mirror.SumOf[A] + ): Codec.AsObject[A] = { val codecs: List[Codec.AsObject[A]] = deriveAll[m.MirroredElemTypes].map(_.asInstanceOf[Codec.AsObject[A]]) diff --git a/src/main/scala/io/pg/config/ProjectConfig.scala b/src/main/scala/io/pg/config/ProjectConfig.scala index 8a6c87b5..ee8657b2 100644 --- a/src/main/scala/io/pg/config/ProjectConfig.scala +++ b/src/main/scala/io/pg/config/ProjectConfig.scala @@ -15,7 +15,10 @@ trait ProjectConfigReader[F[_]] { } object ProjectConfigReader { - def apply[F[_]](using F: ProjectConfigReader[F]): ProjectConfigReader[F] = F + + def apply[F[_]]( + using F: ProjectConfigReader[F] + ): ProjectConfigReader[F] = F def test[F[_]: Applicative]: ProjectConfigReader[F] = new ProjectConfigReader[F] { diff --git a/src/main/scala/io/pg/resolver.scala b/src/main/scala/io/pg/resolver.scala index c39ae189..b4b1f91f 100644 --- a/src/main/scala/io/pg/resolver.scala +++ b/src/main/scala/io/pg/resolver.scala @@ -16,7 +16,10 @@ trait StateResolver[F[_]] { } object StateResolver { - def apply[F[_]](using F: StateResolver[F]): StateResolver[F] = F + + def apply[F[_]]( + using F: StateResolver[F] + ): StateResolver[F] = F def instance[F[_]: Gitlab: Logger: MonadThrow]( implicit SC: fs2.Compiler[F, F] diff --git a/src/main/scala/io/pg/webhook/webhook.scala b/src/main/scala/io/pg/webhook/webhook.scala index 70171f0a..5f35a4cd 100644 --- a/src/main/scala/io/pg/webhook/webhook.scala +++ b/src/main/scala/io/pg/webhook/webhook.scala @@ -64,11 +64,7 @@ object WebhookRouter { object WebhookProcessor { - def instance[ - F[ - _ - ]: MergeRequests: ProjectActions: Logger: MonadThrow - ]: WebhookEvent => F[Unit] = { ev => + def instance[F[_]: MergeRequests: ProjectActions: Logger: MonadThrow]: WebhookEvent => F[Unit] = { ev => for { _ <- Logger[F].info("Received event", Map("event" -> ev.toString())) states <- MergeRequests[F].build(ev.project) diff --git a/src/test/scala/io/pg/fakes/ProjectActionsStateFake.scala b/src/test/scala/io/pg/fakes/ProjectActionsStateFake.scala index ea342f18..d08ea7ed 100644 --- a/src/test/scala/io/pg/fakes/ProjectActionsStateFake.scala +++ b/src/test/scala/io/pg/fakes/ProjectActionsStateFake.scala @@ -86,9 +86,9 @@ object ProjectActionsStateFake { /** This instance has both the capabilities of ProjectActions and StateResolver, because they operate on the same state, and the state is * sealed by convention. */ - def instance[ - F[_]: Data: Monad: Logger - ]: ProjectActions[F] with StateResolver[F] with State.Modifiers[F] = new ProjectActions[F] with StateResolver[F] with State.Modifiers[F] { + def instance[F[_]: Data: Monad: Logger]: ProjectActions[F] with StateResolver[F] with State.Modifiers[F] = new ProjectActions[F] + with StateResolver[F] + with State.Modifiers[F] { type Action = ProjectAction def resolve(mr: MergeRequestState): F[Option[ProjectAction]] = ProjectActions.defaultResolve[F](mr) From 17b409ee81dc9f88a00d7fc58e9ab33136127721 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sat, 30 Mar 2024 21:03:13 +0000 Subject: [PATCH 3/3] Add 'Reformat with scalafmt 3.8.1' to .git-blame-ignore-revs --- .git-blame-ignore-revs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..47d2b4dc --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,2 @@ +# Scala Steward: Reformat with scalafmt 3.8.1 +5ca48ad9b2b7f0ae0fda87c781db676ead8b1488