{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/29927795","id":29927795,"diff_hunk":"@@ -3,19 +3,171 @@\n  */\n package akka\n \n-import sbt._\n-import sbt.Keys._\n import com.typesafe.tools.mima.plugin.MimaKeys.reportBinaryIssues\n+import net.virtualvoid.sbt.graph.IvyGraphMLDependencies\n+import net.virtualvoid.sbt.graph.IvyGraphMLDependencies.ModuleId\n+import org.kohsuke.github._\n+import sbt.Keys._\n+import sbt._\n+\n+import scala.collection.immutable\n+import scala.util.matching.Regex\n \n object ValidatePullRequest extends AutoPlugin {\n \n+  val ValidatePR = config(\"pr-validation\") extend Test\n+\n+  /*\n+    Assumptions:\n+      Env variables set \"by Jenkins\" are assumed to come from this plugin:\n+      https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin\n+   */\n+\n+  // settings\n+  val PullIdEnvVarName = \"ghprbPullId\" // Set by \"GitHub pull request builder plugin\"\n+\n+  val TargetBranchEnvVarName = \"PR_TARGET_BRANCH\"\n+  val TargetBranchJenkinsEnvVarName = \"ghprbTargetBranch\"\n+  val sourceBranch = settingKey[String](\"Branch containing the changes of this PR\")\n+\n+  val SourceBranchEnvVarName = \"PR_SOURCE_BRANCH\"\n+  val SourceBranchJenkinsEnvVarName = \"ghprbSourceBranch\"\n+  val targetBranch = settingKey[String](\"Branch with which the PR changes should be diffed against\")","path":"project/ValidatePullRequest.scala","position":35,"original_position":35,"commit_id":"6503a036c3c289b1bdec1685ee87d881789bef0e","original_commit_id":"6503a036c3c289b1bdec1685ee87d881789bef0e","user":{"login":"2m","id":422086,"avatar_url":"https://avatars.githubusercontent.com/u/422086?v=3","gravatar_id":"","url":"https://api.github.com/users/2m","html_url":"https://github.com/2m","followers_url":"https://api.github.com/users/2m/followers","following_url":"https://api.github.com/users/2m/following{/other_user}","gists_url":"https://api.github.com/users/2m/gists{/gist_id}","starred_url":"https://api.github.com/users/2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2m/subscriptions","organizations_url":"https://api.github.com/users/2m/orgs","repos_url":"https://api.github.com/users/2m/repos","events_url":"https://api.github.com/users/2m/events{/privacy}","received_events_url":"https://api.github.com/users/2m/received_events","type":"User","site_admin":false},"body":"Should this line be swapped with line 31 above?","created_at":"2015-05-08T09:36:26Z","updated_at":"2015-05-08T09:36:26Z","html_url":"https://github.com/akka/akka/pull/17397#discussion_r29927795","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/17397","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/29927795"},"html":{"href":"https://github.com/akka/akka/pull/17397#discussion_r29927795"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/17397"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/17397","id":34807951,"html_url":"https://github.com/akka/akka/pull/17397","diff_url":"https://github.com/akka/akka/pull/17397.diff","patch_url":"https://github.com/akka/akka/pull/17397.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/17397","number":17397,"state":"open","locked":false,"title":"=pro improve PR validation speed tremendously","user":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"body":"Good news everyone: Introducing PR validation with module dependency analysis!\r\nIt skips testing of modules which do not depend on the changed modules, so that changes in persistence (this commit does a mock change in persistence) only test things which depend on persistence, see logs:\r\n\r\n```\r\n[info] Comparing [master] with [HEAD] to determine changed modules in PR...\r\n[info] Detected changes in directories: [akka-persistence]\r\n[info] Project [akka-persistence-experimental] must be verified, because depends on akka-persistence-experimental_2.11\r\n[info] Skipping validation of [akka-sample-remote-java], as PR does NOT affect this project...\r\n[info] Changes in PR are affecting project [akka-persistence-experimental] - proceeding with test:test\r\n... \r\n[info] Changes in PR are affecting project [akka-sample-persistence-scala] - proceeding with test:test\r\n[info] Changes in PR are affecting project [akka-sample-persistence-java] - proceeding with test:test\r\n[info] Changes in PR are affecting project [akka-contrib] - proceeding with test:test\r\n[info] Changes in PR are affecting project [akka-docs] - proceeding with test:test\r\n...\r\n```\r\n\r\nThe dependency analysis uses @jrudolph's dependency graph plugin directly to analyse the deps (based on ivy reports) - This tremendously speeds up PR validation. \r\nWe should possibly increase the times a day we run the \"nightly\" one so we have some during the day coverage of \"everything\"?\r\n\r\n\r\nAlso: \r\n- enable parallel execution // TODO things did not blow up for me, but *might*\r\n- exclude perf tests (TODO mark more as such)\r\n- implement dependency tracking for testing of only these project which could have been affected by a given PR","created_at":"2015-05-06T11:17:16Z","updated_at":"2015-05-08T09:36:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4c05c35d9308238c43cc888e19f8acfa686ac8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/17397/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/17397/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka/issues/17397/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/6503a036c3c289b1bdec1685ee87d881789bef0e","head":{"label":"ktoso:wip-speedup-validation-ktoso","ref":"wip-speedup-validation-ktoso","sha":"6503a036c3c289b1bdec1685ee87d881789bef0e","user":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"repo":{"id":4462204,"name":"akka","full_name":"ktoso/akka","owner":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ktoso/akka","description":"Akka Project","fork":true,"url":"https://api.github.com/repos/ktoso/akka","forks_url":"https://api.github.com/repos/ktoso/akka/forks","keys_url":"https://api.github.com/repos/ktoso/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ktoso/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ktoso/akka/teams","hooks_url":"https://api.github.com/repos/ktoso/akka/hooks","issue_events_url":"https://api.github.com/repos/ktoso/akka/issues/events{/number}","events_url":"https://api.github.com/repos/ktoso/akka/events","assignees_url":"https://api.github.com/repos/ktoso/akka/assignees{/user}","branches_url":"https://api.github.com/repos/ktoso/akka/branches{/branch}","tags_url":"https://api.github.com/repos/ktoso/akka/tags","blobs_url":"https://api.github.com/repos/ktoso/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ktoso/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ktoso/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/ktoso/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ktoso/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/ktoso/akka/languages","stargazers_url":"https://api.github.com/repos/ktoso/akka/stargazers","contributors_url":"https://api.github.com/repos/ktoso/akka/contributors","subscribers_url":"https://api.github.com/repos/ktoso/akka/subscribers","subscription_url":"https://api.github.com/repos/ktoso/akka/subscription","commits_url":"https://api.github.com/repos/ktoso/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/ktoso/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/ktoso/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/ktoso/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/ktoso/akka/contents/{+path}","compare_url":"https://api.github.com/repos/ktoso/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ktoso/akka/merges","archive_url":"https://api.github.com/repos/ktoso/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ktoso/akka/downloads","issues_url":"https://api.github.com/repos/ktoso/akka/issues{/number}","pulls_url":"https://api.github.com/repos/ktoso/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/ktoso/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/ktoso/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ktoso/akka/labels{/name}","releases_url":"https://api.github.com/repos/ktoso/akka/releases{/id}","created_at":"2012-05-27T14:05:17Z","updated_at":"2015-04-03T11:58:56Z","pushed_at":"2015-05-07T14:10:12Z","git_url":"git://github.com/ktoso/akka.git","ssh_url":"git@github.com:ktoso/akka.git","clone_url":"https://github.com/ktoso/akka.git","svn_url":"https://github.com/ktoso/akka","homepage":"http://akka.io","size":164932,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"akka:master","ref":"master","sha":"76641d185a90b453d7b025c05918282acc69b037","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","created_at":"2009-02-16T12:51:54Z","updated_at":"2015-05-07T18:51:27Z","pushed_at":"2015-05-08T09:29:14Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":250125,"stargazers_count":3919,"watchers_count":3919,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1125,"mirror_url":null,"open_issues_count":656,"forks":1125,"open_issues":656,"watchers":3919,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/17397"},"html":{"href":"https://github.com/akka/akka/pull/17397"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/17397"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/17397/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/17397/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/17397/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/6503a036c3c289b1bdec1685ee87d881789bef0e"}}}}