{"action":"created","comment":{"url":"https://api.github.com/repos/shapesecurity/shift-java/pulls/comments/208431958","pull_request_review_id":144239968,"id":208431958,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODQzMTk1OA==","diff_hunk":"@@ -137,19 +137,16 @@ public void testCustomMatcher() throws JsError {\n \t\tassertEquals(info.node, firstExpr.d(Branch.BinaryExpressionRight_()).apply(tree).fromJust());\n \t}\n \n-\tpublic void testCustomTypeCheck() throws JsError {\n-\t\tString source = \"a + /*$ b $*/ b + /*$ c $*/ c + /*$ d $*/ d;\";\n+\tpublic void testCustomPredicate() throws JsError {\n+\t\tString source = \"a + /*$ b $*/ b + /*$ c $*/ c + /*$ d $*/ d + e;\";\n \n \t\tF<String, Maybe<Pair<String, Predicate<Node>>>> commentMatcher = string -> {\n \t\t\tMatcher matcher = Pattern.compile(\"^\\\\$ ([^$]+) \\\\$$\").matcher(string);\n \t\t\tif (!matcher.matches()) {\n \t\t\t\treturn Maybe.empty();\n \t\t\t}\n \t\t\tString name = matcher.group(1);\n-\t\t\treturn Maybe.of(Pair.of(name, node -> {\n-\t\t\t\tassertEquals(IdentifierExpression.class, node.getClass());\n-\t\t\t\treturn ((IdentifierExpression) node).name.equals(name);\n-\t\t\t}));\n+\t\t\treturn Maybe.of(Pair.of(name, node -> node instanceof IdentifierExpression && ((IdentifierExpression) node).name.equals(name)));","path":"src/test/java/com/shapesecurity/shift/es2016/template/FindNodesTest.java","position":null,"original_position":19,"commit_id":"24a3daf72dbeebeafd6f4107ecdbd44b747725e5","original_commit_id":"24a3daf72dbeebeafd6f4107ecdbd44b747725e5","user":{"login":"michaelficarra","id":218840,"node_id":"MDQ6VXNlcjIxODg0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/218840?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelficarra","html_url":"https://github.com/michaelficarra","followers_url":"https://api.github.com/users/michaelficarra/followers","following_url":"https://api.github.com/users/michaelficarra/following{/other_user}","gists_url":"https://api.github.com/users/michaelficarra/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelficarra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelficarra/subscriptions","organizations_url":"https://api.github.com/users/michaelficarra/orgs","repos_url":"https://api.github.com/users/michaelficarra/repos","events_url":"https://api.github.com/users/michaelficarra/events{/privacy}","received_events_url":"https://api.github.com/users/michaelficarra/received_events","type":"User","site_admin":false},"body":"Uuhh the predicate never returns `false` for this input, right? I want to see it return `false` at least once.","created_at":"2018-08-08T01:25:05Z","updated_at":"2018-08-08T01:25:05Z","html_url":"https://github.com/shapesecurity/shift-java/pull/191#discussion_r208431958","pull_request_url":"https://api.github.com/repos/shapesecurity/shift-java/pulls/191","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/shapesecurity/shift-java/pulls/comments/208431958"},"html":{"href":"https://github.com/shapesecurity/shift-java/pull/191#discussion_r208431958"},"pull_request":{"href":"https://api.github.com/repos/shapesecurity/shift-java/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/shapesecurity/shift-java/pulls/191","id":206118272,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MTE4Mjcy","html_url":"https://github.com/shapesecurity/shift-java/pull/191","diff_url":"https://github.com/shapesecurity/shift-java/pull/191.diff","patch_url":"https://github.com/shapesecurity/shift-java/pull/191.patch","issue_url":"https://api.github.com/repos/shapesecurity/shift-java/issues/191","number":191,"state":"open","locked":false,"title":"Templates","user":{"login":"bakkot","id":1653598,"node_id":"MDQ6VXNlcjE2NTM1OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1653598?v=4","gravatar_id":"","url":"https://api.github.com/users/bakkot","html_url":"https://github.com/bakkot","followers_url":"https://api.github.com/users/bakkot/followers","following_url":"https://api.github.com/users/bakkot/following{/other_user}","gists_url":"https://api.github.com/users/bakkot/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkot/subscriptions","organizations_url":"https://api.github.com/users/bakkot/orgs","repos_url":"https://api.github.com/users/bakkot/repos","events_url":"https://api.github.com/users/bakkot/events{/privacy}","received_events_url":"https://api.github.com/users/bakkot/received_events","type":"User","site_admin":false},"body":"Should be good to go.\r\n\r\nAdds a new package, `Template`, which provides static functions `findNodes` and `applyTemplate` for treating source files as comment-annotated templates. The first is fairly low-level, the second is a convenience wrapper built on top of it.","created_at":"2018-08-03T19:25:06Z","updated_at":"2018-08-08T01:25:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e8cdf2dc5a27a872f4c59c482e5734fb7a55ce2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"disnet","id":2362,"node_id":"MDQ6VXNlcjIzNjI=","avatar_url":"https://avatars0.githubusercontent.com/u/2362?v=4","gravatar_id":"","url":"https://api.github.com/users/disnet","html_url":"https://github.com/disnet","followers_url":"https://api.github.com/users/disnet/followers","following_url":"https://api.github.com/users/disnet/following{/other_user}","gists_url":"https://api.github.com/users/disnet/gists{/gist_id}","starred_url":"https://api.github.com/users/disnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/disnet/subscriptions","organizations_url":"https://api.github.com/users/disnet/orgs","repos_url":"https://api.github.com/users/disnet/repos","events_url":"https://api.github.com/users/disnet/events{/privacy}","received_events_url":"https://api.github.com/users/disnet/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/shapesecurity/shift-java/pulls/191/commits","review_comments_url":"https://api.github.com/repos/shapesecurity/shift-java/pulls/191/comments","review_comment_url":"https://api.github.com/repos/shapesecurity/shift-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shapesecurity/shift-java/issues/191/comments","statuses_url":"https://api.github.com/repos/shapesecurity/shift-java/statuses/24a3daf72dbeebeafd6f4107ecdbd44b747725e5","head":{"label":"shapesecurity:templates","ref":"templates","sha":"24a3daf72dbeebeafd6f4107ecdbd44b747725e5","user":{"login":"shapesecurity","id":7728313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3MjgzMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7728313?v=4","gravatar_id":"","url":"https://api.github.com/users/shapesecurity","html_url":"https://github.com/shapesecurity","followers_url":"https://api.github.com/users/shapesecurity/followers","following_url":"https://api.github.com/users/shapesecurity/following{/other_user}","gists_url":"https://api.github.com/users/shapesecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/shapesecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shapesecurity/subscriptions","organizations_url":"https://api.github.com/users/shapesecurity/orgs","repos_url":"https://api.github.com/users/shapesecurity/repos","events_url":"https://api.github.com/users/shapesecurity/events{/privacy}","received_events_url":"https://api.github.com/users/shapesecurity/received_events","type":"Organization","site_admin":false},"repo":{"id":27738435,"node_id":"MDEwOlJlcG9zaXRvcnkyNzczODQzNQ==","name":"shift-java","full_name":"shapesecurity/shift-java","owner":{"login":"shapesecurity","id":7728313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3MjgzMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7728313?v=4","gravatar_id":"","url":"https://api.github.com/users/shapesecurity","html_url":"https://github.com/shapesecurity","followers_url":"https://api.github.com/users/shapesecurity/followers","following_url":"https://api.github.com/users/shapesecurity/following{/other_user}","gists_url":"https://api.github.com/users/shapesecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/shapesecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shapesecurity/subscriptions","organizations_url":"https://api.github.com/users/shapesecurity/orgs","repos_url":"https://api.github.com/users/shapesecurity/repos","events_url":"https://api.github.com/users/shapesecurity/events{/privacy}","received_events_url":"https://api.github.com/users/shapesecurity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shapesecurity/shift-java","description":"Shift format ECMAScript AST tooling","fork":false,"url":"https://api.github.com/repos/shapesecurity/shift-java","forks_url":"https://api.github.com/repos/shapesecurity/shift-java/forks","keys_url":"https://api.github.com/repos/shapesecurity/shift-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shapesecurity/shift-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shapesecurity/shift-java/teams","hooks_url":"https://api.github.com/repos/shapesecurity/shift-java/hooks","issue_events_url":"https://api.github.com/repos/shapesecurity/shift-java/issues/events{/number}","events_url":"https://api.github.com/repos/shapesecurity/shift-java/events","assignees_url":"https://api.github.com/repos/shapesecurity/shift-java/assignees{/user}","branches_url":"https://api.github.com/repos/shapesecurity/shift-java/branches{/branch}","tags_url":"https://api.github.com/repos/shapesecurity/shift-java/tags","blobs_url":"https://api.github.com/repos/shapesecurity/shift-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shapesecurity/shift-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shapesecurity/shift-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/shapesecurity/shift-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shapesecurity/shift-java/statuses/{sha}","languages_url":"https://api.github.com/repos/shapesecurity/shift-java/languages","stargazers_url":"https://api.github.com/repos/shapesecurity/shift-java/stargazers","contributors_url":"https://api.github.com/repos/shapesecurity/shift-java/contributors","subscribers_url":"https://api.github.com/repos/shapesecurity/shift-java/subscribers","subscription_url":"https://api.github.com/repos/shapesecurity/shift-java/subscription","commits_url":"https://api.github.com/repos/shapesecurity/shift-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/shapesecurity/shift-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/shapesecurity/shift-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/shapesecurity/shift-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/shapesecurity/shift-java/contents/{+path}","compare_url":"https://api.github.com/repos/shapesecurity/shift-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shapesecurity/shift-java/merges","archive_url":"https://api.github.com/repos/shapesecurity/shift-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shapesecurity/shift-java/downloads","issues_url":"https://api.github.com/repos/shapesecurity/shift-java/issues{/number}","pulls_url":"https://api.github.com/repos/shapesecurity/shift-java/pulls{/number}","milestones_url":"https://api.github.com/repos/shapesecurity/shift-java/milestones{/number}","notifications_url":"https://api.github.com/repos/shapesecurity/shift-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shapesecurity/shift-java/labels{/name}","releases_url":"https://api.github.com/repos/shapesecurity/shift-java/releases{/id}","deployments_url":"https://api.github.com/repos/shapesecurity/shift-java/deployments","created_at":"2014-12-08T22:30:40Z","updated_at":"2018-07-17T08:55:40Z","pushed_at":"2018-08-08T01:18:43Z","git_url":"git://github.com/shapesecurity/shift-java.git","ssh_url":"git@github.com:shapesecurity/shift-java.git","clone_url":"https://github.com/shapesecurity/shift-java.git","svn_url":"https://github.com/shapesecurity/shift-java","homepage":"http://shift-ast.org/","size":13834,"stargazers_count":63,"watchers_count":63,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":20,"open_issues":10,"watchers":63,"default_branch":"es2016"}},"base":{"label":"shapesecurity:es2016","ref":"es2016","sha":"536003ae345887543ec7a1a83ecd1d0c2a0a8612","user":{"login":"shapesecurity","id":7728313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3MjgzMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7728313?v=4","gravatar_id":"","url":"https://api.github.com/users/shapesecurity","html_url":"https://github.com/shapesecurity","followers_url":"https://api.github.com/users/shapesecurity/followers","following_url":"https://api.github.com/users/shapesecurity/following{/other_user}","gists_url":"https://api.github.com/users/shapesecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/shapesecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shapesecurity/subscriptions","organizations_url":"https://api.github.com/users/shapesecurity/orgs","repos_url":"https://api.github.com/users/shapesecurity/repos","events_url":"https://api.github.com/users/shapesecurity/events{/privacy}","received_events_url":"https://api.github.com/users/shapesecurity/received_events","type":"Organization","site_admin":false},"repo":{"id":27738435,"node_id":"MDEwOlJlcG9zaXRvcnkyNzczODQzNQ==","name":"shift-java","full_name":"shapesecurity/shift-java","owner":{"login":"shapesecurity","id":7728313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3MjgzMTM=","avatar_url":"https://avatars2.githubusercontent.com/u/7728313?v=4","gravatar_id":"","url":"https://api.github.com/users/shapesecurity","html_url":"https://github.com/shapesecurity","followers_url":"https://api.github.com/users/shapesecurity/followers","following_url":"https://api.github.com/users/shapesecurity/following{/other_user}","gists_url":"https://api.github.com/users/shapesecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/shapesecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shapesecurity/subscriptions","organizations_url":"https://api.github.com/users/shapesecurity/orgs","repos_url":"https://api.github.com/users/shapesecurity/repos","events_url":"https://api.github.com/users/shapesecurity/events{/privacy}","received_events_url":"https://api.github.com/users/shapesecurity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shapesecurity/shift-java","description":"Shift format ECMAScript AST tooling","fork":false,"url":"https://api.github.com/repos/shapesecurity/shift-java","forks_url":"https://api.github.com/repos/shapesecurity/shift-java/forks","keys_url":"https://api.github.com/repos/shapesecurity/shift-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shapesecurity/shift-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shapesecurity/shift-java/teams","hooks_url":"https://api.github.com/repos/shapesecurity/shift-java/hooks","issue_events_url":"https://api.github.com/repos/shapesecurity/shift-java/issues/events{/number}","events_url":"https://api.github.com/repos/shapesecurity/shift-java/events","assignees_url":"https://api.github.com/repos/shapesecurity/shift-java/assignees{/user}","branches_url":"https://api.github.com/repos/shapesecurity/shift-java/branches{/branch}","tags_url":"https://api.github.com/repos/shapesecurity/shift-java/tags","blobs_url":"https://api.github.com/repos/shapesecurity/shift-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shapesecurity/shift-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shapesecurity/shift-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/shapesecurity/shift-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shapesecurity/shift-java/statuses/{sha}","languages_url":"https://api.github.com/repos/shapesecurity/shift-java/languages","stargazers_url":"https://api.github.com/repos/shapesecurity/shift-java/stargazers","contributors_url":"https://api.github.com/repos/shapesecurity/shift-java/contributors","subscribers_url":"https://api.github.com/repos/shapesecurity/shift-java/subscribers","subscription_url":"https://api.github.com/repos/shapesecurity/shift-java/subscription","commits_url":"https://api.github.com/repos/shapesecurity/shift-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/shapesecurity/shift-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/shapesecurity/shift-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/shapesecurity/shift-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/shapesecurity/shift-java/contents/{+path}","compare_url":"https://api.github.com/repos/shapesecurity/shift-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shapesecurity/shift-java/merges","archive_url":"https://api.github.com/repos/shapesecurity/shift-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shapesecurity/shift-java/downloads","issues_url":"https://api.github.com/repos/shapesecurity/shift-java/issues{/number}","pulls_url":"https://api.github.com/repos/shapesecurity/shift-java/pulls{/number}","milestones_url":"https://api.github.com/repos/shapesecurity/shift-java/milestones{/number}","notifications_url":"https://api.github.com/repos/shapesecurity/shift-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shapesecurity/shift-java/labels{/name}","releases_url":"https://api.github.com/repos/shapesecurity/shift-java/releases{/id}","deployments_url":"https://api.github.com/repos/shapesecurity/shift-java/deployments","created_at":"2014-12-08T22:30:40Z","updated_at":"2018-07-17T08:55:40Z","pushed_at":"2018-08-08T01:18:43Z","git_url":"git://github.com/shapesecurity/shift-java.git","ssh_url":"git@github.com:shapesecurity/shift-java.git","clone_url":"https://github.com/shapesecurity/shift-java.git","svn_url":"https://github.com/shapesecurity/shift-java","homepage":"http://shift-ast.org/","size":13834,"stargazers_count":63,"watchers_count":63,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":20,"open_issues":10,"watchers":63,"default_branch":"es2016"}},"_links":{"self":{"href":"https://api.github.com/repos/shapesecurity/shift-java/pulls/191"},"html":{"href":"https://github.com/shapesecurity/shift-java/pull/191"},"issue":{"href":"https://api.github.com/repos/shapesecurity/shift-java/issues/191"},"comments":{"href":"https://api.github.com/repos/shapesecurity/shift-java/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/shapesecurity/shift-java/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/shapesecurity/shift-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shapesecurity/shift-java/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/shapesecurity/shift-java/statuses/24a3daf72dbeebeafd6f4107ecdbd44b747725e5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"michaelficarra"}}