Skip to content

Commit

Permalink
Use better-monadic-for
Browse files Browse the repository at this point in the history
  • Loading branch information
fthomas committed Jun 12, 2019
1 parent d4b7fc8 commit 6f97dd8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ lazy val core = myCrossProject("core")
.settings(dockerSettings)
.settings(
libraryDependencies ++= Seq(
compilerPlugin(Dependencies.betterMonadicFor),
compilerPlugin(Dependencies.kindProjector),
Dependencies.betterFiles,
Dependencies.caseApp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ final class DependencyService[F[_]](
def checkDependencies(repo: Repo): F[Unit] =
logAlg.attemptLog_(s"Check dependencies of ${repo.show}") {
for {
res <- gitHubApiAlg.createForkOrGetRepoWithDefaultBranch(config, repo)
(repoOut, branchOut) = res
(repoOut, branchOut) <- gitHubApiAlg.createForkOrGetRepoWithDefaultBranch(config, repo)
foundSha1 <- dependencyRepository.findSha1(repo)
latestSha1 = branchOut.commit.sha
refreshRequired = foundSha1.fold(true)(_ =!= latestSha1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ final class NurtureAlg[F[_]](
logAlg.infoTotalTime(repo.show) {
logAlg.attemptLog_(s"Nurture ${repo.show}") {
for {
res <- cloneAndSync(repo)
(fork, baseBranch) = res
(fork, baseBranch) <- cloneAndSync(repo)
_ <- updateDependencies(repo, fork, baseBranch)
_ <- gitAlg.removeClone(repo)
} yield ()
Expand Down
1 change: 1 addition & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ object Versions {

object Dependencies {
val betterFiles = "com.github.pathikrit" %% "better-files" % "3.8.0"
val betterMonadicFor = "com.olegpy" %% "better-monadic-for" % "0.3.0"
val caseApp = "com.github.alexarchambault" %% "case-app" % "2.0.0-M9"
val catsEffect = "org.typelevel" %% "cats-effect" % "1.3.1"
val circeConfig = "io.circe" %% "circe-config" % "0.6.1"
Expand Down

0 comments on commit 6f97dd8

Please sign in to comment.