{"action":"created","comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments/60157097","id":60157097,"diff_hunk":"@@ -49,6 +49,15 @@ Attribution.prototype = util.inherit(Control, {\n             }\n         }\n \n+        // remove any entries that are duplicates or strict substrings of another entry.\n+        attributions.sort();","path":"js/ui/control/attribution.js","position":5,"original_position":5,"commit_id":"48d674ff472be3781b418199dcb78257ca963aaf","original_commit_id":"48d674ff472be3781b418199dcb78257ca963aaf","user":{"login":"lucaswoj","id":281306,"avatar_url":"https://avatars.githubusercontent.com/u/281306?v=3","gravatar_id":"","url":"https://api.github.com/users/lucaswoj","html_url":"https://github.com/lucaswoj","followers_url":"https://api.github.com/users/lucaswoj/followers","following_url":"https://api.github.com/users/lucaswoj/following{/other_user}","gists_url":"https://api.github.com/users/lucaswoj/gists{/gist_id}","starred_url":"https://api.github.com/users/lucaswoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucaswoj/subscriptions","organizations_url":"https://api.github.com/users/lucaswoj/orgs","repos_url":"https://api.github.com/users/lucaswoj/repos","events_url":"https://api.github.com/users/lucaswoj/events{/privacy}","received_events_url":"https://api.github.com/users/lucaswoj/received_events","type":"User","site_admin":false},"body":"Whether you sort or not, you're comparing every attribution string to every other attribution string. I don't think the sort is necessary. ","created_at":"2016-04-19T00:25:11Z","updated_at":"2016-04-19T00:25:11Z","html_url":"https://github.com/mapbox/mapbox-gl-js/pull/2453#discussion_r60157097","pull_request_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2453","_links":{"self":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments/60157097"},"html":{"href":"https://github.com/mapbox/mapbox-gl-js/pull/2453#discussion_r60157097"},"pull_request":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2453"}}},"pull_request":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2453","id":66663021,"html_url":"https://github.com/mapbox/mapbox-gl-js/pull/2453","diff_url":"https://github.com/mapbox/mapbox-gl-js/pull/2453.diff","patch_url":"https://github.com/mapbox/mapbox-gl-js/pull/2453.patch","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2453","number":2453,"state":"open","locked":false,"title":"Dedupe attributions that are substrings of others","user":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"body":"Refs #1804 \r\n","created_at":"2016-04-15T15:41:50Z","updated_at":"2016-04-19T00:25:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec184d880fd188138a33e5955757b6b2dcb278e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2453/commits","review_comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2453/comments","review_comment_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2453/comments","statuses_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/48d674ff472be3781b418199dcb78257ca963aaf","head":{"label":"anandthakker:fix-duplicate-attribution","ref":"fix-duplicate-attribution","sha":"48d674ff472be3781b418199dcb78257ca963aaf","user":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"repo":{"id":36953702,"name":"mapbox-gl-js","full_name":"anandthakker/mapbox-gl-js","owner":{"login":"anandthakker","id":4974151,"avatar_url":"https://avatars.githubusercontent.com/u/4974151?v=3","gravatar_id":"","url":"https://api.github.com/users/anandthakker","html_url":"https://github.com/anandthakker","followers_url":"https://api.github.com/users/anandthakker/followers","following_url":"https://api.github.com/users/anandthakker/following{/other_user}","gists_url":"https://api.github.com/users/anandthakker/gists{/gist_id}","starred_url":"https://api.github.com/users/anandthakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anandthakker/subscriptions","organizations_url":"https://api.github.com/users/anandthakker/orgs","repos_url":"https://api.github.com/users/anandthakker/repos","events_url":"https://api.github.com/users/anandthakker/events{/privacy}","received_events_url":"https://api.github.com/users/anandthakker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anandthakker/mapbox-gl-js","description":"JavaScript/WebGL vector maps library","fork":true,"url":"https://api.github.com/repos/anandthakker/mapbox-gl-js","forks_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/forks","keys_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/teams","hooks_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/hooks","issue_events_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/issues/events{/number}","events_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/events","assignees_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/assignees{/user}","branches_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/branches{/branch}","tags_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/tags","blobs_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/statuses/{sha}","languages_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/languages","stargazers_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/stargazers","contributors_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/contributors","subscribers_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/subscribers","subscription_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/subscription","commits_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/contents/{+path}","compare_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/merges","archive_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/downloads","issues_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/issues{/number}","pulls_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/pulls{/number}","milestones_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/milestones{/number}","notifications_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/labels{/name}","releases_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/releases{/id}","deployments_url":"https://api.github.com/repos/anandthakker/mapbox-gl-js/deployments","created_at":"2015-06-05T20:22:50Z","updated_at":"2015-06-05T20:22:50Z","pushed_at":"2016-04-15T15:40:24Z","git_url":"git://github.com/anandthakker/mapbox-gl-js.git","ssh_url":"git@github.com:anandthakker/mapbox-gl-js.git","clone_url":"https://github.com/anandthakker/mapbox-gl-js.git","svn_url":"https://github.com/anandthakker/mapbox-gl-js","homepage":"https://www.mapbox.com/mapbox-gl/","size":13110,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":0,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"1a913cb54adfb45583ee6979790e6744d13b7454","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":8629417,"name":"mapbox-gl-js","full_name":"mapbox/mapbox-gl-js","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/mapbox-gl-js","description":"Render Mapbox styles in the browser using JavaScript and WebGL","fork":false,"url":"https://api.github.com/repos/mapbox/mapbox-gl-js","forks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/forks","keys_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/teams","hooks_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/hooks","issue_events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/events","assignees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/tags","blobs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/languages","stargazers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/stargazers","contributors_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contributors","subscribers_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscribers","subscription_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/subscription","commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/merges","archive_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/downloads","issues_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/mapbox-gl-js/deployments","created_at":"2013-03-07T14:45:24Z","updated_at":"2016-04-18T20:54:17Z","pushed_at":"2016-04-19T00:18:53Z","git_url":"git://github.com/mapbox/mapbox-gl-js.git","ssh_url":"git@github.com:mapbox/mapbox-gl-js.git","clone_url":"https://github.com/mapbox/mapbox-gl-js.git","svn_url":"https://github.com/mapbox/mapbox-gl-js","homepage":"https://www.mapbox.com/mapbox-gl-js/","size":25722,"stargazers_count":944,"watchers_count":944,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":156,"mirror_url":null,"open_issues_count":279,"forks":156,"open_issues":279,"watchers":944,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2453"},"html":{"href":"https://github.com/mapbox/mapbox-gl-js/pull/2453"},"issue":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2453"},"comments":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/issues/2453/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2453/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/pulls/2453/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/mapbox-gl-js/statuses/48d674ff472be3781b418199dcb78257ca963aaf"}}}}