{"action":"created","issue":{"url":"https://api.github.com/repos/github/linguist/issues/2568","labels_url":"https://api.github.com/repos/github/linguist/issues/2568/labels{/name}","comments_url":"https://api.github.com/repos/github/linguist/issues/2568/comments","events_url":"https://api.github.com/repos/github/linguist/issues/2568/events","html_url":"https://github.com/github/linguist/pull/2568","id":101946712,"number":2568,"title":"Use Licensee to classify submodule licenses","user":{"login":"benbalter","id":282759,"avatar_url":"https://avatars.githubusercontent.com/u/282759?v=3","gravatar_id":"","url":"https://api.github.com/users/benbalter","html_url":"https://github.com/benbalter","followers_url":"https://api.github.com/users/benbalter/followers","following_url":"https://api.github.com/users/benbalter/following{/other_user}","gists_url":"https://api.github.com/users/benbalter/gists{/gist_id}","starred_url":"https://api.github.com/users/benbalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbalter/subscriptions","organizations_url":"https://api.github.com/users/benbalter/orgs","repos_url":"https://api.github.com/users/benbalter/repos","events_url":"https://api.github.com/users/benbalter/events{/privacy}","received_events_url":"https://api.github.com/users/benbalter/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":{"login":"benbalter","id":282759,"avatar_url":"https://avatars.githubusercontent.com/u/282759?v=3","gravatar_id":"","url":"https://api.github.com/users/benbalter","html_url":"https://github.com/benbalter","followers_url":"https://api.github.com/users/benbalter/followers","following_url":"https://api.github.com/users/benbalter/following{/other_user}","gists_url":"https://api.github.com/users/benbalter/gists{/gist_id}","starred_url":"https://api.github.com/users/benbalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbalter/subscriptions","organizations_url":"https://api.github.com/users/benbalter/orgs","repos_url":"https://api.github.com/users/benbalter/repos","events_url":"https://api.github.com/users/benbalter/events{/privacy}","received_events_url":"https://api.github.com/users/benbalter/received_events","type":"User","site_admin":true},"milestone":null,"comments":2,"created_at":"2015-08-19T17:00:05Z","updated_at":"2015-08-19T18:32:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/github/linguist/pulls/2568","html_url":"https://github.com/github/linguist/pull/2568","diff_url":"https://github.com/github/linguist/pull/2568.diff","patch_url":"https://github.com/github/linguist/pull/2568.patch"},"body":"This pull requests updates the grammars test to lean on Licensee to do much of the license-detection heavy lifting. Specifically:\r\n\r\n1. Look to Licensee first to see if it can detect a license\r\n2. If licensee couldn't detect the license, but found a license file, use [Licensee's more nuanced license file detection](https://github.com/benbalter/licensee/blob/master/lib/licensee/project.rb#L37-L50), passing the license file to the existing license detection\r\n3. If all else fails, look to the readme\r\n\r\nBeyond the updated logic, rather than break things out into `:unlicensed` and `:unrecognized`, the test now contains an explicit whitelist of approved licenses which it compare the detected license, if any against. This allows for more descriptive failure messages (e.g., `the submodule FOO is licensed under the XYZ license, but the XYZ license isn't an approved license`). \r\n\r\nTo implement this, I added a private `submodule_license` method to separate the license detection logic, and a private `submodule_licenses` which returns a hash containing each submodule and its license."},"comment":{"url":"https://api.github.com/repos/github/linguist/issues/comments/132734526","html_url":"https://github.com/github/linguist/pull/2568#issuecomment-132734526","issue_url":"https://api.github.com/repos/github/linguist/issues/2568","id":132734526,"user":{"login":"aroben","id":917945,"avatar_url":"https://avatars.githubusercontent.com/u/917945?v=3","gravatar_id":"","url":"https://api.github.com/users/aroben","html_url":"https://github.com/aroben","followers_url":"https://api.github.com/users/aroben/followers","following_url":"https://api.github.com/users/aroben/following{/other_user}","gists_url":"https://api.github.com/users/aroben/gists{/gist_id}","starred_url":"https://api.github.com/users/aroben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aroben/subscriptions","organizations_url":"https://api.github.com/users/aroben/orgs","repos_url":"https://api.github.com/users/aroben/repos","events_url":"https://api.github.com/users/aroben/events{/privacy}","received_events_url":"https://api.github.com/users/aroben/received_events","type":"User","site_admin":true},"created_at":"2015-08-19T18:32:56Z","updated_at":"2015-08-19T18:32:56Z","body":"Is this fixing a bug in the current test? If we have to look at README files for some repos anyway, what's the benefit to using Licensee?"}}