{"action":"created","comment":{"url":"https://api.github.com/repos/clearlydefined/service/pulls/comments/241645039","pull_request_review_id":184969457,"id":241645039,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTY0NTAzOQ==","diff_hunk":"@@ -81,15 +90,31 @@ class ScanCodeSummarizer {\n       .filter(e => e)\n   }\n \n-  _toExpression(licenses) {\n-    if (!licenses) return null\n-    const list = setToArray(licenses)\n+  _joinExpressions(expressions) {\n+    if (!expressions) return null\n+    const list = setToArray(expressions)\n     if (!list) return null\n-    return list\n-      .map(SPDX.normalize)\n-      .filter(x => x)\n-      .join(' AND ')\n+    return list.join(' AND ')\n   }\n+\n+  _createExpressionFromRule(rule, licenseKey) {\n+    if (rule && rule.rule_relevance < 50) return null\n+    if (!rule || !rule.license_expression) return SPDX.normalize(licenseKey)\n+    const parsed = SPDX.parse(rule.license_expression, key => {\n+      return SPDX.normalizeSingle(scancode_lookup[key] || key)\n+    })\n+    const result = SPDX.stringify(parsed)\n+    if (result === 'NOASSERTION') {","path":"providers/summary/scancode.js","position":76,"original_position":76,"commit_id":"ac78088cde9db0aa5cfd2e9e78f73827c9d4d0bc","original_commit_id":"ac78088cde9db0aa5cfd2e9e78f73827c9d4d0bc","user":{"login":"jeffmcaffer","id":10070956,"node_id":"MDQ6VXNlcjEwMDcwOTU2","avatar_url":"https://avatars2.githubusercontent.com/u/10070956?v=4","gravatar_id":"","url":"https://api.github.com/users/jeffmcaffer","html_url":"https://github.com/jeffmcaffer","followers_url":"https://api.github.com/users/jeffmcaffer/followers","following_url":"https://api.github.com/users/jeffmcaffer/following{/other_user}","gists_url":"https://api.github.com/users/jeffmcaffer/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffmcaffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffmcaffer/subscriptions","organizations_url":"https://api.github.com/users/jeffmcaffer/orgs","repos_url":"https://api.github.com/users/jeffmcaffer/repos","events_url":"https://api.github.com/users/jeffmcaffer/events{/privacy}","received_events_url":"https://api.github.com/users/jeffmcaffer/received_events","type":"User","site_admin":false},"body":"OMG, so many {}s!","created_at":"2018-12-14T05:03:30Z","updated_at":"2018-12-14T05:07:49Z","html_url":"https://github.com/clearlydefined/service/pull/322#discussion_r241645039","pull_request_url":"https://api.github.com/repos/clearlydefined/service/pulls/322","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/clearlydefined/service/pulls/comments/241645039"},"html":{"href":"https://github.com/clearlydefined/service/pull/322#discussion_r241645039"},"pull_request":{"href":"https://api.github.com/repos/clearlydefined/service/pulls/322"}}},"pull_request":{"url":"https://api.github.com/repos/clearlydefined/service/pulls/322","id":237033330,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MDMzMzMw","html_url":"https://github.com/clearlydefined/service/pull/322","diff_url":"https://github.com/clearlydefined/service/pull/322.diff","patch_url":"https://github.com/clearlydefined/service/pull/322.patch","issue_url":"https://api.github.com/repos/clearlydefined/service/issues/322","number":322,"state":"open","locked":false,"title":"use the license_expression in scancode summarizer","user":{"login":"dabutvin","id":5168796,"node_id":"MDQ6VXNlcjUxNjg3OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5168796?v=4","gravatar_id":"","url":"https://api.github.com/users/dabutvin","html_url":"https://github.com/dabutvin","followers_url":"https://api.github.com/users/dabutvin/followers","following_url":"https://api.github.com/users/dabutvin/following{/other_user}","gists_url":"https://api.github.com/users/dabutvin/gists{/gist_id}","starred_url":"https://api.github.com/users/dabutvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dabutvin/subscriptions","organizations_url":"https://api.github.com/users/dabutvin/orgs","repos_url":"https://api.github.com/users/dabutvin/repos","events_url":"https://api.github.com/users/dabutvin/events{/privacy}","received_events_url":"https://api.github.com/users/dabutvin/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-08T01:08:50Z","updated_at":"2018-12-14T05:07:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"399469b8adbe70ef06d4f01d3ece564c797c92e4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/clearlydefined/service/pulls/322/commits","review_comments_url":"https://api.github.com/repos/clearlydefined/service/pulls/322/comments","review_comment_url":"https://api.github.com/repos/clearlydefined/service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clearlydefined/service/issues/322/comments","statuses_url":"https://api.github.com/repos/clearlydefined/service/statuses/ac78088cde9db0aa5cfd2e9e78f73827c9d4d0bc","head":{"label":"dabutvin:scancode-summary","ref":"scancode-summary","sha":"ac78088cde9db0aa5cfd2e9e78f73827c9d4d0bc","user":{"login":"dabutvin","id":5168796,"node_id":"MDQ6VXNlcjUxNjg3OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5168796?v=4","gravatar_id":"","url":"https://api.github.com/users/dabutvin","html_url":"https://github.com/dabutvin","followers_url":"https://api.github.com/users/dabutvin/followers","following_url":"https://api.github.com/users/dabutvin/following{/other_user}","gists_url":"https://api.github.com/users/dabutvin/gists{/gist_id}","starred_url":"https://api.github.com/users/dabutvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dabutvin/subscriptions","organizations_url":"https://api.github.com/users/dabutvin/orgs","repos_url":"https://api.github.com/users/dabutvin/repos","events_url":"https://api.github.com/users/dabutvin/events{/privacy}","received_events_url":"https://api.github.com/users/dabutvin/received_events","type":"User","site_admin":false},"repo":{"id":143779012,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM3NzkwMTI=","name":"service","full_name":"dabutvin/service","private":false,"owner":{"login":"dabutvin","id":5168796,"node_id":"MDQ6VXNlcjUxNjg3OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5168796?v=4","gravatar_id":"","url":"https://api.github.com/users/dabutvin","html_url":"https://github.com/dabutvin","followers_url":"https://api.github.com/users/dabutvin/followers","following_url":"https://api.github.com/users/dabutvin/following{/other_user}","gists_url":"https://api.github.com/users/dabutvin/gists{/gist_id}","starred_url":"https://api.github.com/users/dabutvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dabutvin/subscriptions","organizations_url":"https://api.github.com/users/dabutvin/orgs","repos_url":"https://api.github.com/users/dabutvin/repos","events_url":"https://api.github.com/users/dabutvin/events{/privacy}","received_events_url":"https://api.github.com/users/dabutvin/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dabutvin/service","description":"The service side of clearlydefined.io","fork":true,"url":"https://api.github.com/repos/dabutvin/service","forks_url":"https://api.github.com/repos/dabutvin/service/forks","keys_url":"https://api.github.com/repos/dabutvin/service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dabutvin/service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dabutvin/service/teams","hooks_url":"https://api.github.com/repos/dabutvin/service/hooks","issue_events_url":"https://api.github.com/repos/dabutvin/service/issues/events{/number}","events_url":"https://api.github.com/repos/dabutvin/service/events","assignees_url":"https://api.github.com/repos/dabutvin/service/assignees{/user}","branches_url":"https://api.github.com/repos/dabutvin/service/branches{/branch}","tags_url":"https://api.github.com/repos/dabutvin/service/tags","blobs_url":"https://api.github.com/repos/dabutvin/service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dabutvin/service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dabutvin/service/git/refs{/sha}","trees_url":"https://api.github.com/repos/dabutvin/service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dabutvin/service/statuses/{sha}","languages_url":"https://api.github.com/repos/dabutvin/service/languages","stargazers_url":"https://api.github.com/repos/dabutvin/service/stargazers","contributors_url":"https://api.github.com/repos/dabutvin/service/contributors","subscribers_url":"https://api.github.com/repos/dabutvin/service/subscribers","subscription_url":"https://api.github.com/repos/dabutvin/service/subscription","commits_url":"https://api.github.com/repos/dabutvin/service/commits{/sha}","git_commits_url":"https://api.github.com/repos/dabutvin/service/git/commits{/sha}","comments_url":"https://api.github.com/repos/dabutvin/service/comments{/number}","issue_comment_url":"https://api.github.com/repos/dabutvin/service/issues/comments{/number}","contents_url":"https://api.github.com/repos/dabutvin/service/contents/{+path}","compare_url":"https://api.github.com/repos/dabutvin/service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dabutvin/service/merges","archive_url":"https://api.github.com/repos/dabutvin/service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dabutvin/service/downloads","issues_url":"https://api.github.com/repos/dabutvin/service/issues{/number}","pulls_url":"https://api.github.com/repos/dabutvin/service/pulls{/number}","milestones_url":"https://api.github.com/repos/dabutvin/service/milestones{/number}","notifications_url":"https://api.github.com/repos/dabutvin/service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dabutvin/service/labels{/name}","releases_url":"https://api.github.com/repos/dabutvin/service/releases{/id}","deployments_url":"https://api.github.com/repos/dabutvin/service/deployments","created_at":"2018-08-06T20:21:52Z","updated_at":"2018-08-06T20:21:55Z","pushed_at":"2018-12-14T03:19:08Z","git_url":"git://github.com/dabutvin/service.git","ssh_url":"git@github.com:dabutvin/service.git","clone_url":"https://github.com/dabutvin/service.git","svn_url":"https://github.com/dabutvin/service","homepage":null,"size":1079,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"clearlydefined:master","ref":"master","sha":"cefd57af7c0252bc0f59b1e8bdd18a7190b39d01","user":{"login":"clearlydefined","id":34137144,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MTM3MTQ0","avatar_url":"https://avatars2.githubusercontent.com/u/34137144?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlydefined","html_url":"https://github.com/clearlydefined","followers_url":"https://api.github.com/users/clearlydefined/followers","following_url":"https://api.github.com/users/clearlydefined/following{/other_user}","gists_url":"https://api.github.com/users/clearlydefined/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlydefined/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlydefined/subscriptions","organizations_url":"https://api.github.com/users/clearlydefined/orgs","repos_url":"https://api.github.com/users/clearlydefined/repos","events_url":"https://api.github.com/users/clearlydefined/events{/privacy}","received_events_url":"https://api.github.com/users/clearlydefined/received_events","type":"Organization","site_admin":false},"repo":{"id":113903008,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM5MDMwMDg=","name":"service","full_name":"clearlydefined/service","private":false,"owner":{"login":"clearlydefined","id":34137144,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MTM3MTQ0","avatar_url":"https://avatars2.githubusercontent.com/u/34137144?v=4","gravatar_id":"","url":"https://api.github.com/users/clearlydefined","html_url":"https://github.com/clearlydefined","followers_url":"https://api.github.com/users/clearlydefined/followers","following_url":"https://api.github.com/users/clearlydefined/following{/other_user}","gists_url":"https://api.github.com/users/clearlydefined/gists{/gist_id}","starred_url":"https://api.github.com/users/clearlydefined/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clearlydefined/subscriptions","organizations_url":"https://api.github.com/users/clearlydefined/orgs","repos_url":"https://api.github.com/users/clearlydefined/repos","events_url":"https://api.github.com/users/clearlydefined/events{/privacy}","received_events_url":"https://api.github.com/users/clearlydefined/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/clearlydefined/service","description":"The service side of clearlydefined.io","fork":false,"url":"https://api.github.com/repos/clearlydefined/service","forks_url":"https://api.github.com/repos/clearlydefined/service/forks","keys_url":"https://api.github.com/repos/clearlydefined/service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clearlydefined/service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clearlydefined/service/teams","hooks_url":"https://api.github.com/repos/clearlydefined/service/hooks","issue_events_url":"https://api.github.com/repos/clearlydefined/service/issues/events{/number}","events_url":"https://api.github.com/repos/clearlydefined/service/events","assignees_url":"https://api.github.com/repos/clearlydefined/service/assignees{/user}","branches_url":"https://api.github.com/repos/clearlydefined/service/branches{/branch}","tags_url":"https://api.github.com/repos/clearlydefined/service/tags","blobs_url":"https://api.github.com/repos/clearlydefined/service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clearlydefined/service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clearlydefined/service/git/refs{/sha}","trees_url":"https://api.github.com/repos/clearlydefined/service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clearlydefined/service/statuses/{sha}","languages_url":"https://api.github.com/repos/clearlydefined/service/languages","stargazers_url":"https://api.github.com/repos/clearlydefined/service/stargazers","contributors_url":"https://api.github.com/repos/clearlydefined/service/contributors","subscribers_url":"https://api.github.com/repos/clearlydefined/service/subscribers","subscription_url":"https://api.github.com/repos/clearlydefined/service/subscription","commits_url":"https://api.github.com/repos/clearlydefined/service/commits{/sha}","git_commits_url":"https://api.github.com/repos/clearlydefined/service/git/commits{/sha}","comments_url":"https://api.github.com/repos/clearlydefined/service/comments{/number}","issue_comment_url":"https://api.github.com/repos/clearlydefined/service/issues/comments{/number}","contents_url":"https://api.github.com/repos/clearlydefined/service/contents/{+path}","compare_url":"https://api.github.com/repos/clearlydefined/service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clearlydefined/service/merges","archive_url":"https://api.github.com/repos/clearlydefined/service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clearlydefined/service/downloads","issues_url":"https://api.github.com/repos/clearlydefined/service/issues{/number}","pulls_url":"https://api.github.com/repos/clearlydefined/service/pulls{/number}","milestones_url":"https://api.github.com/repos/clearlydefined/service/milestones{/number}","notifications_url":"https://api.github.com/repos/clearlydefined/service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clearlydefined/service/labels{/name}","releases_url":"https://api.github.com/repos/clearlydefined/service/releases{/id}","deployments_url":"https://api.github.com/repos/clearlydefined/service/deployments","created_at":"2017-12-11T20:04:11Z","updated_at":"2018-12-14T00:29:18Z","pushed_at":"2018-12-14T03:19:09Z","git_url":"git://github.com/clearlydefined/service.git","ssh_url":"git@github.com:clearlydefined/service.git","clone_url":"https://github.com/clearlydefined/service.git","svn_url":"https://github.com/clearlydefined/service","homepage":null,"size":1097,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":12,"open_issues":34,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clearlydefined/service/pulls/322"},"html":{"href":"https://github.com/clearlydefined/service/pull/322"},"issue":{"href":"https://api.github.com/repos/clearlydefined/service/issues/322"},"comments":{"href":"https://api.github.com/repos/clearlydefined/service/issues/322/comments"},"review_comments":{"href":"https://api.github.com/repos/clearlydefined/service/pulls/322/comments"},"review_comment":{"href":"https://api.github.com/repos/clearlydefined/service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clearlydefined/service/pulls/322/commits"},"statuses":{"href":"https://api.github.com/repos/clearlydefined/service/statuses/ac78088cde9db0aa5cfd2e9e78f73827c9d4d0bc"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jeffmcaffer"}}