Skip to content

Instantly share code, notes, and snippets.

@ktoso
Created May 5, 2015 23:01
Show Gist options
  • Save ktoso/4f101980204b2a7a32c8 to your computer and use it in GitHub Desktop.
Save ktoso/4f101980204b2a7a32c8 to your computer and use it in GitHub Desktop.
validatePullRequest := Def.taskDyn {
val log = streams.value.log
val theVoid = Def.task { () }
if (projectIsAffectedByChanges.value) {
log.info(s"Changes in PR are affecting project [${name.value}] - proceeding with test:test")
theVoid.dependsOn(test in Test)
} else {
log.debug(s"Skipping validation of [${name.value}], as PR does NOT affect this project...")
theVoid
}
}.value,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment