{"action":"created","comment":{"url":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/comments/24042831","id":24042831,"diff_hunk":"@@ -52,9 +53,22 @@ object TemplateCacheSeedGenerator {\n           location = cacheDir,\n           remote = remoteRepo,\n           autoUpdate = false)\n+\n+      val templateList =\n+        if (arg.templates.isEmpty) cache.featured\n+        else {\n+          cache.metadata.map { it =>\n+            val filtered = it.filter { tpl =>\n+              arg.templates.contains(tpl.name)\n+            }\n+            if (filtered.toList.length == 0) throw new RuntimeException(s\"Could not find any template matching name(s): ${arg.templates.mkString(\",\")}\")","path":"templates-cache/src/main/scala/activator/templates/TemplateCacheSeedGenerator.scala","position":57,"original_position":57,"commit_id":"2cbb99a321e5b1f91c74b23147f86a1ae05db689","original_commit_id":"2cbb99a321e5b1f91c74b23147f86a1ae05db689","user":{"login":"havocp","id":218689,"avatar_url":"https://avatars.githubusercontent.com/u/218689?v=3","gravatar_id":"","url":"https://api.github.com/users/havocp","html_url":"https://github.com/havocp","followers_url":"https://api.github.com/users/havocp/followers","following_url":"https://api.github.com/users/havocp/following{/other_user}","gists_url":"https://api.github.com/users/havocp/gists{/gist_id}","starred_url":"https://api.github.com/users/havocp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/havocp/subscriptions","organizations_url":"https://api.github.com/users/havocp/orgs","repos_url":"https://api.github.com/users/havocp/repos","events_url":"https://api.github.com/users/havocp/events{/privacy}","received_events_url":"https://api.github.com/users/havocp/received_events","type":"User","site_admin":false},"body":"isEmpty is better practice for zero-length, but maybe even better here would be `arg.templates.length == filtered.length` ?  otherwise you don't catch if one name is bad","created_at":"2015-02-03T21:45:50Z","updated_at":"2015-02-03T21:45:50Z","html_url":"https://github.com/typesafehub/activator-template-cache/pull/38#discussion_r24042831","pull_request_url":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/comments/24042831"},"html":{"href":"https://github.com/typesafehub/activator-template-cache/pull/38#discussion_r24042831"},"pull_request":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/38","id":28590409,"html_url":"https://github.com/typesafehub/activator-template-cache/pull/38","diff_url":"https://github.com/typesafehub/activator-template-cache/pull/38.diff","patch_url":"https://github.com/typesafehub/activator-template-cache/pull/38.patch","issue_url":"https://api.github.com/repos/typesafehub/activator-template-cache/issues/38","number":38,"state":"open","locked":false,"title":"Adds capability to specify templates used to override the standard featu...","user":{"login":"henrikengstrom","id":506945,"avatar_url":"https://avatars.githubusercontent.com/u/506945?v=3","gravatar_id":"","url":"https://api.github.com/users/henrikengstrom","html_url":"https://github.com/henrikengstrom","followers_url":"https://api.github.com/users/henrikengstrom/followers","following_url":"https://api.github.com/users/henrikengstrom/following{/other_user}","gists_url":"https://api.github.com/users/henrikengstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/henrikengstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrikengstrom/subscriptions","organizations_url":"https://api.github.com/users/henrikengstrom/orgs","repos_url":"https://api.github.com/users/henrikengstrom/repos","events_url":"https://api.github.com/users/henrikengstrom/events{/privacy}","received_events_url":"https://api.github.com/users/henrikengstrom/received_events","type":"User","site_admin":false},"body":"...red ones","created_at":"2015-02-03T21:25:30Z","updated_at":"2015-02-03T21:45:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cec80cc2b43daaf8bfe8e74b1d78d292f2dea84","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/38/commits","review_comments_url":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/38/comments","review_comment_url":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/comments/{number}","comments_url":"https://api.github.com/repos/typesafehub/activator-template-cache/issues/38/comments","statuses_url":"https://api.github.com/repos/typesafehub/activator-template-cache/statuses/2cbb99a321e5b1f91c74b23147f86a1ae05db689","head":{"label":"typesafehub:wip/h3nk3-template-handling","ref":"wip/h3nk3-template-handling","sha":"2cbb99a321e5b1f91c74b23147f86a1ae05db689","user":{"login":"typesafehub","id":784923,"avatar_url":"https://avatars.githubusercontent.com/u/784923?v=3","gravatar_id":"","url":"https://api.github.com/users/typesafehub","html_url":"https://github.com/typesafehub","followers_url":"https://api.github.com/users/typesafehub/followers","following_url":"https://api.github.com/users/typesafehub/following{/other_user}","gists_url":"https://api.github.com/users/typesafehub/gists{/gist_id}","starred_url":"https://api.github.com/users/typesafehub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typesafehub/subscriptions","organizations_url":"https://api.github.com/users/typesafehub/orgs","repos_url":"https://api.github.com/users/typesafehub/repos","events_url":"https://api.github.com/users/typesafehub/events{/privacy}","received_events_url":"https://api.github.com/users/typesafehub/received_events","type":"Organization","site_admin":false},"repo":{"id":11101676,"name":"activator-template-cache","full_name":"typesafehub/activator-template-cache","owner":{"login":"typesafehub","id":784923,"avatar_url":"https://avatars.githubusercontent.com/u/784923?v=3","gravatar_id":"","url":"https://api.github.com/users/typesafehub","html_url":"https://github.com/typesafehub","followers_url":"https://api.github.com/users/typesafehub/followers","following_url":"https://api.github.com/users/typesafehub/following{/other_user}","gists_url":"https://api.github.com/users/typesafehub/gists{/gist_id}","starred_url":"https://api.github.com/users/typesafehub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typesafehub/subscriptions","organizations_url":"https://api.github.com/users/typesafehub/orgs","repos_url":"https://api.github.com/users/typesafehub/repos","events_url":"https://api.github.com/users/typesafehub/events{/privacy}","received_events_url":"https://api.github.com/users/typesafehub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/typesafehub/activator-template-cache","description":"Creating and resolving templates for the activator project","fork":false,"url":"https://api.github.com/repos/typesafehub/activator-template-cache","forks_url":"https://api.github.com/repos/typesafehub/activator-template-cache/forks","keys_url":"https://api.github.com/repos/typesafehub/activator-template-cache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/typesafehub/activator-template-cache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/typesafehub/activator-template-cache/teams","hooks_url":"https://api.github.com/repos/typesafehub/activator-template-cache/hooks","issue_events_url":"https://api.github.com/repos/typesafehub/activator-template-cache/issues/events{/number}","events_url":"https://api.github.com/repos/typesafehub/activator-template-cache/events","assignees_url":"https://api.github.com/repos/typesafehub/activator-template-cache/assignees{/user}","branches_url":"https://api.github.com/repos/typesafehub/activator-template-cache/branches{/branch}","tags_url":"https://api.github.com/repos/typesafehub/activator-template-cache/tags","blobs_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/refs{/sha}","trees_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/typesafehub/activator-template-cache/statuses/{sha}","languages_url":"https://api.github.com/repos/typesafehub/activator-template-cache/languages","stargazers_url":"https://api.github.com/repos/typesafehub/activator-template-cache/stargazers","contributors_url":"https://api.github.com/repos/typesafehub/activator-template-cache/contributors","subscribers_url":"https://api.github.com/repos/typesafehub/activator-template-cache/subscribers","subscription_url":"https://api.github.com/repos/typesafehub/activator-template-cache/subscription","commits_url":"https://api.github.com/repos/typesafehub/activator-template-cache/commits{/sha}","git_commits_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/commits{/sha}","comments_url":"https://api.github.com/repos/typesafehub/activator-template-cache/comments{/number}","issue_comment_url":"https://api.github.com/repos/typesafehub/activator-template-cache/issues/comments/{number}","contents_url":"https://api.github.com/repos/typesafehub/activator-template-cache/contents/{+path}","compare_url":"https://api.github.com/repos/typesafehub/activator-template-cache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/typesafehub/activator-template-cache/merges","archive_url":"https://api.github.com/repos/typesafehub/activator-template-cache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/typesafehub/activator-template-cache/downloads","issues_url":"https://api.github.com/repos/typesafehub/activator-template-cache/issues{/number}","pulls_url":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls{/number}","milestones_url":"https://api.github.com/repos/typesafehub/activator-template-cache/milestones{/number}","notifications_url":"https://api.github.com/repos/typesafehub/activator-template-cache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/typesafehub/activator-template-cache/labels{/name}","releases_url":"https://api.github.com/repos/typesafehub/activator-template-cache/releases{/id}","created_at":"2013-07-01T17:15:33Z","updated_at":"2015-01-22T15:25:36Z","pushed_at":"2015-02-03T20:34:24Z","git_url":"git://github.com/typesafehub/activator-template-cache.git","ssh_url":"git@github.com:typesafehub/activator-template-cache.git","clone_url":"https://github.com/typesafehub/activator-template-cache.git","svn_url":"https://github.com/typesafehub/activator-template-cache","homepage":null,"size":669,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":6,"default_branch":"master"}},"base":{"label":"typesafehub:master","ref":"master","sha":"f08006ff8edfcfe7462b035c6c06c3623f0c6044","user":{"login":"typesafehub","id":784923,"avatar_url":"https://avatars.githubusercontent.com/u/784923?v=3","gravatar_id":"","url":"https://api.github.com/users/typesafehub","html_url":"https://github.com/typesafehub","followers_url":"https://api.github.com/users/typesafehub/followers","following_url":"https://api.github.com/users/typesafehub/following{/other_user}","gists_url":"https://api.github.com/users/typesafehub/gists{/gist_id}","starred_url":"https://api.github.com/users/typesafehub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typesafehub/subscriptions","organizations_url":"https://api.github.com/users/typesafehub/orgs","repos_url":"https://api.github.com/users/typesafehub/repos","events_url":"https://api.github.com/users/typesafehub/events{/privacy}","received_events_url":"https://api.github.com/users/typesafehub/received_events","type":"Organization","site_admin":false},"repo":{"id":11101676,"name":"activator-template-cache","full_name":"typesafehub/activator-template-cache","owner":{"login":"typesafehub","id":784923,"avatar_url":"https://avatars.githubusercontent.com/u/784923?v=3","gravatar_id":"","url":"https://api.github.com/users/typesafehub","html_url":"https://github.com/typesafehub","followers_url":"https://api.github.com/users/typesafehub/followers","following_url":"https://api.github.com/users/typesafehub/following{/other_user}","gists_url":"https://api.github.com/users/typesafehub/gists{/gist_id}","starred_url":"https://api.github.com/users/typesafehub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typesafehub/subscriptions","organizations_url":"https://api.github.com/users/typesafehub/orgs","repos_url":"https://api.github.com/users/typesafehub/repos","events_url":"https://api.github.com/users/typesafehub/events{/privacy}","received_events_url":"https://api.github.com/users/typesafehub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/typesafehub/activator-template-cache","description":"Creating and resolving templates for the activator project","fork":false,"url":"https://api.github.com/repos/typesafehub/activator-template-cache","forks_url":"https://api.github.com/repos/typesafehub/activator-template-cache/forks","keys_url":"https://api.github.com/repos/typesafehub/activator-template-cache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/typesafehub/activator-template-cache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/typesafehub/activator-template-cache/teams","hooks_url":"https://api.github.com/repos/typesafehub/activator-template-cache/hooks","issue_events_url":"https://api.github.com/repos/typesafehub/activator-template-cache/issues/events{/number}","events_url":"https://api.github.com/repos/typesafehub/activator-template-cache/events","assignees_url":"https://api.github.com/repos/typesafehub/activator-template-cache/assignees{/user}","branches_url":"https://api.github.com/repos/typesafehub/activator-template-cache/branches{/branch}","tags_url":"https://api.github.com/repos/typesafehub/activator-template-cache/tags","blobs_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/refs{/sha}","trees_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/typesafehub/activator-template-cache/statuses/{sha}","languages_url":"https://api.github.com/repos/typesafehub/activator-template-cache/languages","stargazers_url":"https://api.github.com/repos/typesafehub/activator-template-cache/stargazers","contributors_url":"https://api.github.com/repos/typesafehub/activator-template-cache/contributors","subscribers_url":"https://api.github.com/repos/typesafehub/activator-template-cache/subscribers","subscription_url":"https://api.github.com/repos/typesafehub/activator-template-cache/subscription","commits_url":"https://api.github.com/repos/typesafehub/activator-template-cache/commits{/sha}","git_commits_url":"https://api.github.com/repos/typesafehub/activator-template-cache/git/commits{/sha}","comments_url":"https://api.github.com/repos/typesafehub/activator-template-cache/comments{/number}","issue_comment_url":"https://api.github.com/repos/typesafehub/activator-template-cache/issues/comments/{number}","contents_url":"https://api.github.com/repos/typesafehub/activator-template-cache/contents/{+path}","compare_url":"https://api.github.com/repos/typesafehub/activator-template-cache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/typesafehub/activator-template-cache/merges","archive_url":"https://api.github.com/repos/typesafehub/activator-template-cache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/typesafehub/activator-template-cache/downloads","issues_url":"https://api.github.com/repos/typesafehub/activator-template-cache/issues{/number}","pulls_url":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls{/number}","milestones_url":"https://api.github.com/repos/typesafehub/activator-template-cache/milestones{/number}","notifications_url":"https://api.github.com/repos/typesafehub/activator-template-cache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/typesafehub/activator-template-cache/labels{/name}","releases_url":"https://api.github.com/repos/typesafehub/activator-template-cache/releases{/id}","created_at":"2013-07-01T17:15:33Z","updated_at":"2015-01-22T15:25:36Z","pushed_at":"2015-02-03T20:34:24Z","git_url":"git://github.com/typesafehub/activator-template-cache.git","ssh_url":"git@github.com:typesafehub/activator-template-cache.git","clone_url":"https://github.com/typesafehub/activator-template-cache.git","svn_url":"https://github.com/typesafehub/activator-template-cache","homepage":null,"size":669,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/38"},"html":{"href":"https://github.com/typesafehub/activator-template-cache/pull/38"},"issue":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/issues/38"},"comments":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/typesafehub/activator-template-cache/statuses/2cbb99a321e5b1f91c74b23147f86a1ae05db689"}}}}