{"action":"created","comment":{"url":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/comments/30957009","id":30957009,"diff_hunk":"@@ -1,10 +1,34 @@\n Sourcemash.Collections.Categories = Backbone.Collection.extend({\n \t  model: Sourcemash.Models.Category,\n+\n     url: '/api/categories',\n+\n+    initialize : function(){\n+      _.bindAll(this, 'fetchResults');\n+    },\n+\n \t  parse: function(response) {\n \t  \treturn response.categories;\n \t  },\n+\n \t  comparator: function(category) {\n-\t  \treturn [!category.get('unread'), category.get('name')]\n-\t  }\n+\t  \treturn [!category.get('unread'), category.get('name')];\n+\t  },\n+\n+    startPolling: function(item_url) {\n+      $.get(\"/api/categorizer\", {'url': item_url}, this.fetchResults);\n+    },\n+\n+    fetchResults: function(data) {\n+      var callbackFn = _.bind(function(data, status, headers) {\n+        if (headers.status === 200){\n+          this.add(data.categories);\n+          clearInterval(poller);\n+        }\n+      }, this);\n+\n+      var poller = setInterval(function() {\n+        $.get('/api/categorizer/results', {'job_id': data.job_id}, callbackFn)\n+      }, 3000);","path":"sourcemash/frontend/static/js/collections/categories.js","position":34,"original_position":34,"commit_id":"e550a2a17564bad187a035cbb05d75d217390897","original_commit_id":"2d95ee4781b1bfc8b9edd7ac105a2e535c51165d","user":{"login":"swglad","id":5695548,"avatar_url":"https://avatars.githubusercontent.com/u/5695548?v=3","gravatar_id":"","url":"https://api.github.com/users/swglad","html_url":"https://github.com/swglad","followers_url":"https://api.github.com/users/swglad/followers","following_url":"https://api.github.com/users/swglad/following{/other_user}","gists_url":"https://api.github.com/users/swglad/gists{/gist_id}","starred_url":"https://api.github.com/users/swglad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swglad/subscriptions","organizations_url":"https://api.github.com/users/swglad/orgs","repos_url":"https://api.github.com/users/swglad/repos","events_url":"https://api.github.com/users/swglad/events{/privacy}","received_events_url":"https://api.github.com/users/swglad/received_events","type":"User","site_admin":false},"body":"Awesome, great work.","created_at":"2015-05-24T23:31:41Z","updated_at":"2015-05-24T23:31:41Z","html_url":"https://github.com/sourcemash/Sourcemash/pull/321#discussion_r30957009","pull_request_url":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/321","_links":{"self":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/comments/30957009"},"html":{"href":"https://github.com/sourcemash/Sourcemash/pull/321#discussion_r30957009"},"pull_request":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/321"}}},"pull_request":{"url":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/321","id":35990796,"html_url":"https://github.com/sourcemash/Sourcemash/pull/321","diff_url":"https://github.com/sourcemash/Sourcemash/pull/321.diff","patch_url":"https://github.com/sourcemash/Sourcemash/pull/321.patch","issue_url":"https://api.github.com/repos/sourcemash/Sourcemash/issues/321","number":321,"state":"open","locked":false,"title":"Spinoff","user":{"login":"alexgerstein","id":1390314,"avatar_url":"https://avatars.githubusercontent.com/u/1390314?v=3","gravatar_id":"","url":"https://api.github.com/users/alexgerstein","html_url":"https://github.com/alexgerstein","followers_url":"https://api.github.com/users/alexgerstein/followers","following_url":"https://api.github.com/users/alexgerstein/following{/other_user}","gists_url":"https://api.github.com/users/alexgerstein/gists{/gist_id}","starred_url":"https://api.github.com/users/alexgerstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexgerstein/subscriptions","organizations_url":"https://api.github.com/users/alexgerstein/orgs","repos_url":"https://api.github.com/users/alexgerstein/repos","events_url":"https://api.github.com/users/alexgerstein/events{/privacy}","received_events_url":"https://api.github.com/users/alexgerstein/received_events","type":"User","site_admin":false},"body":"Closes #172.","created_at":"2015-05-22T00:20:08Z","updated_at":"2015-05-24T23:31:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bcf6df18ac9bd8eab28a03daff62161bc1ecdc62","assignee":{"login":"swglad","id":5695548,"avatar_url":"https://avatars.githubusercontent.com/u/5695548?v=3","gravatar_id":"","url":"https://api.github.com/users/swglad","html_url":"https://github.com/swglad","followers_url":"https://api.github.com/users/swglad/followers","following_url":"https://api.github.com/users/swglad/following{/other_user}","gists_url":"https://api.github.com/users/swglad/gists{/gist_id}","starred_url":"https://api.github.com/users/swglad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swglad/subscriptions","organizations_url":"https://api.github.com/users/swglad/orgs","repos_url":"https://api.github.com/users/swglad/repos","events_url":"https://api.github.com/users/swglad/events{/privacy}","received_events_url":"https://api.github.com/users/swglad/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sourcemash/Sourcemash/milestones/18","html_url":"https://github.com/sourcemash/Sourcemash/milestones/Week%2018","labels_url":"https://api.github.com/repos/sourcemash/Sourcemash/milestones/18/labels","id":1105057,"number":18,"title":"Week 18","description":"","creator":{"login":"swglad","id":5695548,"avatar_url":"https://avatars.githubusercontent.com/u/5695548?v=3","gravatar_id":"","url":"https://api.github.com/users/swglad","html_url":"https://github.com/swglad","followers_url":"https://api.github.com/users/swglad/followers","following_url":"https://api.github.com/users/swglad/following{/other_user}","gists_url":"https://api.github.com/users/swglad/gists{/gist_id}","starred_url":"https://api.github.com/users/swglad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swglad/subscriptions","organizations_url":"https://api.github.com/users/swglad/orgs","repos_url":"https://api.github.com/users/swglad/repos","events_url":"https://api.github.com/users/swglad/events{/privacy}","received_events_url":"https://api.github.com/users/swglad/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":10,"state":"open","created_at":"2015-05-11T15:27:31Z","updated_at":"2015-05-24T22:55:55Z","due_on":"2015-05-25T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/321/commits","review_comments_url":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/321/comments","review_comment_url":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sourcemash/Sourcemash/issues/321/comments","statuses_url":"https://api.github.com/repos/sourcemash/Sourcemash/statuses/e550a2a17564bad187a035cbb05d75d217390897","head":{"label":"sourcemash:spinoff","ref":"spinoff","sha":"e550a2a17564bad187a035cbb05d75d217390897","user":{"login":"sourcemash","id":11763607,"avatar_url":"https://avatars.githubusercontent.com/u/11763607?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcemash","html_url":"https://github.com/sourcemash","followers_url":"https://api.github.com/users/sourcemash/followers","following_url":"https://api.github.com/users/sourcemash/following{/other_user}","gists_url":"https://api.github.com/users/sourcemash/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcemash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcemash/subscriptions","organizations_url":"https://api.github.com/users/sourcemash/orgs","repos_url":"https://api.github.com/users/sourcemash/repos","events_url":"https://api.github.com/users/sourcemash/events{/privacy}","received_events_url":"https://api.github.com/users/sourcemash/received_events","type":"Organization","site_admin":false},"repo":{"id":29208817,"name":"Sourcemash","full_name":"sourcemash/Sourcemash","owner":{"login":"sourcemash","id":11763607,"avatar_url":"https://avatars.githubusercontent.com/u/11763607?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcemash","html_url":"https://github.com/sourcemash","followers_url":"https://api.github.com/users/sourcemash/followers","following_url":"https://api.github.com/users/sourcemash/following{/other_user}","gists_url":"https://api.github.com/users/sourcemash/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcemash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcemash/subscriptions","organizations_url":"https://api.github.com/users/sourcemash/orgs","repos_url":"https://api.github.com/users/sourcemash/repos","events_url":"https://api.github.com/users/sourcemash/events{/privacy}","received_events_url":"https://api.github.com/users/sourcemash/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcemash/Sourcemash","description":"Read Your News Faster.","fork":false,"url":"https://api.github.com/repos/sourcemash/Sourcemash","forks_url":"https://api.github.com/repos/sourcemash/Sourcemash/forks","keys_url":"https://api.github.com/repos/sourcemash/Sourcemash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcemash/Sourcemash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcemash/Sourcemash/teams","hooks_url":"https://api.github.com/repos/sourcemash/Sourcemash/hooks","issue_events_url":"https://api.github.com/repos/sourcemash/Sourcemash/issues/events{/number}","events_url":"https://api.github.com/repos/sourcemash/Sourcemash/events","assignees_url":"https://api.github.com/repos/sourcemash/Sourcemash/assignees{/user}","branches_url":"https://api.github.com/repos/sourcemash/Sourcemash/branches{/branch}","tags_url":"https://api.github.com/repos/sourcemash/Sourcemash/tags","blobs_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcemash/Sourcemash/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcemash/Sourcemash/languages","stargazers_url":"https://api.github.com/repos/sourcemash/Sourcemash/stargazers","contributors_url":"https://api.github.com/repos/sourcemash/Sourcemash/contributors","subscribers_url":"https://api.github.com/repos/sourcemash/Sourcemash/subscribers","subscription_url":"https://api.github.com/repos/sourcemash/Sourcemash/subscription","commits_url":"https://api.github.com/repos/sourcemash/Sourcemash/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcemash/Sourcemash/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcemash/Sourcemash/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcemash/Sourcemash/contents/{+path}","compare_url":"https://api.github.com/repos/sourcemash/Sourcemash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcemash/Sourcemash/merges","archive_url":"https://api.github.com/repos/sourcemash/Sourcemash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcemash/Sourcemash/downloads","issues_url":"https://api.github.com/repos/sourcemash/Sourcemash/issues{/number}","pulls_url":"https://api.github.com/repos/sourcemash/Sourcemash/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcemash/Sourcemash/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcemash/Sourcemash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcemash/Sourcemash/labels{/name}","releases_url":"https://api.github.com/repos/sourcemash/Sourcemash/releases{/id}","created_at":"2015-01-13T20:12:47Z","updated_at":"2015-05-08T16:50:04Z","pushed_at":"2015-05-24T23:28:51Z","git_url":"git://github.com/sourcemash/Sourcemash.git","ssh_url":"git@github.com:sourcemash/Sourcemash.git","clone_url":"https://github.com/sourcemash/Sourcemash.git","svn_url":"https://github.com/sourcemash/Sourcemash","homepage":"http://sourcemash.com","size":5520,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":37,"forks":0,"open_issues":37,"watchers":2,"default_branch":"master"}},"base":{"label":"sourcemash:master","ref":"master","sha":"136cb1a2b26bf4e51cb08f9f3d718c9a70d91df9","user":{"login":"sourcemash","id":11763607,"avatar_url":"https://avatars.githubusercontent.com/u/11763607?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcemash","html_url":"https://github.com/sourcemash","followers_url":"https://api.github.com/users/sourcemash/followers","following_url":"https://api.github.com/users/sourcemash/following{/other_user}","gists_url":"https://api.github.com/users/sourcemash/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcemash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcemash/subscriptions","organizations_url":"https://api.github.com/users/sourcemash/orgs","repos_url":"https://api.github.com/users/sourcemash/repos","events_url":"https://api.github.com/users/sourcemash/events{/privacy}","received_events_url":"https://api.github.com/users/sourcemash/received_events","type":"Organization","site_admin":false},"repo":{"id":29208817,"name":"Sourcemash","full_name":"sourcemash/Sourcemash","owner":{"login":"sourcemash","id":11763607,"avatar_url":"https://avatars.githubusercontent.com/u/11763607?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcemash","html_url":"https://github.com/sourcemash","followers_url":"https://api.github.com/users/sourcemash/followers","following_url":"https://api.github.com/users/sourcemash/following{/other_user}","gists_url":"https://api.github.com/users/sourcemash/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcemash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcemash/subscriptions","organizations_url":"https://api.github.com/users/sourcemash/orgs","repos_url":"https://api.github.com/users/sourcemash/repos","events_url":"https://api.github.com/users/sourcemash/events{/privacy}","received_events_url":"https://api.github.com/users/sourcemash/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sourcemash/Sourcemash","description":"Read Your News Faster.","fork":false,"url":"https://api.github.com/repos/sourcemash/Sourcemash","forks_url":"https://api.github.com/repos/sourcemash/Sourcemash/forks","keys_url":"https://api.github.com/repos/sourcemash/Sourcemash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourcemash/Sourcemash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourcemash/Sourcemash/teams","hooks_url":"https://api.github.com/repos/sourcemash/Sourcemash/hooks","issue_events_url":"https://api.github.com/repos/sourcemash/Sourcemash/issues/events{/number}","events_url":"https://api.github.com/repos/sourcemash/Sourcemash/events","assignees_url":"https://api.github.com/repos/sourcemash/Sourcemash/assignees{/user}","branches_url":"https://api.github.com/repos/sourcemash/Sourcemash/branches{/branch}","tags_url":"https://api.github.com/repos/sourcemash/Sourcemash/tags","blobs_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourcemash/Sourcemash/statuses/{sha}","languages_url":"https://api.github.com/repos/sourcemash/Sourcemash/languages","stargazers_url":"https://api.github.com/repos/sourcemash/Sourcemash/stargazers","contributors_url":"https://api.github.com/repos/sourcemash/Sourcemash/contributors","subscribers_url":"https://api.github.com/repos/sourcemash/Sourcemash/subscribers","subscription_url":"https://api.github.com/repos/sourcemash/Sourcemash/subscription","commits_url":"https://api.github.com/repos/sourcemash/Sourcemash/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourcemash/Sourcemash/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourcemash/Sourcemash/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourcemash/Sourcemash/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourcemash/Sourcemash/contents/{+path}","compare_url":"https://api.github.com/repos/sourcemash/Sourcemash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourcemash/Sourcemash/merges","archive_url":"https://api.github.com/repos/sourcemash/Sourcemash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourcemash/Sourcemash/downloads","issues_url":"https://api.github.com/repos/sourcemash/Sourcemash/issues{/number}","pulls_url":"https://api.github.com/repos/sourcemash/Sourcemash/pulls{/number}","milestones_url":"https://api.github.com/repos/sourcemash/Sourcemash/milestones{/number}","notifications_url":"https://api.github.com/repos/sourcemash/Sourcemash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourcemash/Sourcemash/labels{/name}","releases_url":"https://api.github.com/repos/sourcemash/Sourcemash/releases{/id}","created_at":"2015-01-13T20:12:47Z","updated_at":"2015-05-08T16:50:04Z","pushed_at":"2015-05-24T23:28:51Z","git_url":"git://github.com/sourcemash/Sourcemash.git","ssh_url":"git@github.com:sourcemash/Sourcemash.git","clone_url":"https://github.com/sourcemash/Sourcemash.git","svn_url":"https://github.com/sourcemash/Sourcemash","homepage":"http://sourcemash.com","size":5520,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":37,"forks":0,"open_issues":37,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/321"},"html":{"href":"https://github.com/sourcemash/Sourcemash/pull/321"},"issue":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/issues/321"},"comments":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/issues/321/comments"},"review_comments":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/321/comments"},"review_comment":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/pulls/321/commits"},"statuses":{"href":"https://api.github.com/repos/sourcemash/Sourcemash/statuses/e550a2a17564bad187a035cbb05d75d217390897"}}}}