Skip to content

Commit

Permalink
Log reasons for not updating
Browse files Browse the repository at this point in the history
  • Loading branch information
dcsobral committed Mar 24, 2020
1 parent b0791f8 commit c06a1b4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/scala/sbttrickle/Autobump.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ trait Autobump {
workDir: File,
log: Logger): Seq[OutdatedRepository] = {
val lm = new Resolver(dependencyResolution, workDir, log)
outdatedRepositories.map { o =>
val (artifactsNotAvailable, artifactsAvailable) = outdatedRepositories.map { o =>
val available = o.updates.filter(updateInfo => lm.isArtifactAvailable(updateInfo.dependency))
o.copy(updates = available)
}.filterNot(_.updates.isEmpty)
.filterNot(isPullRequestOpen)
// TODO: log exclusions
}.partition(_.updates.isEmpty)
artifactsNotAvailable.foreach { outdatedRepository =>
log.info(s"Skipping ${outdatedRepository.repository} because it depends on artifacts that are not yet available")
}
val (pullRequestOpen, pullRequestNotOpen) = artifactsAvailable.partition(isPullRequestOpen)
pullRequestOpen.foreach { outdatedRepository =>
log.info(s"Skipping ${outdatedRepository.repository} because there's already an open pull request for it")
}
pullRequestNotOpen
}

/**
Expand Down

0 comments on commit c06a1b4

Please sign in to comment.