{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb-js/repo-list/pulls/comments/67756982","id":67756982,"diff_hunk":"@@ -16,44 +18,44 @@ function isObject(obj) {\n \n function hasProperties(obj) {\n   return obj.hasOwnProperty('name')\n-    && obj.hasOwnProperty('url');\n+    && obj.hasOwnProperty('html_url');\n }\n \n describe('RepoOrgs', function() {\n \n-  it('should return a stream', function (done) {\n-    reposForOrg({'org' : 'mongodb-js'}, function(err, res) {\n-      assert.isTrue(res instanceof stream.Readable);\n-      done();\n-    });\n+  before(function(done) {\n+    sinon.stub(GitHubApi.prototype, 'authenticate');\n+    done();\n   });\n \n-  it('should return a stream of objects', function(done) {\n-    reposForOrg({'org' : 'mongodb-js'}, function(err, res) {\n-      var data = []\n-      res.on('data', function(chunk) {\n-        data.push(chunk);\n-      });\n-\n-      res.on('end', function() {\n-        assert.isTrue(data.every(isObject));\n-        done();\n-      });\n-    });\n+  after(function(done){\n+    GitHubApi.prototype.authenticate.restore();\n+    done();\n   });\n \n-  it('objects have property name and url', function(done) {\n-    reposForOrg({'org' : 'mongodb-js'}, function(err, res) {\n-      var data = []\n-      res.on('data', function(chunk) {\n-        data.push(chunk);\n-      });\n-\n-      res.on('end', function() {\n-        assert.isTrue(data.every(hasProperties));\n-        done();\n-      });\n+  keys = ['name', 'html_url']\n+\n+  it('should return a stream of objects', function() {\n+    var str = reposForOrg({'org' : 'mongodb-js', 'keys' : keys});\n+    var data = []","path":"test/test.js","position":69,"original_position":69,"commit_id":"f7b16c9f6770e790f31a69025c5c56c6eca77d22","original_commit_id":"f7b16c9f6770e790f31a69025c5c56c6eca77d22","user":{"login":"rueckstiess","id":99221,"avatar_url":"https://avatars.githubusercontent.com/u/99221?v=3","gravatar_id":"","url":"https://api.github.com/users/rueckstiess","html_url":"https://github.com/rueckstiess","followers_url":"https://api.github.com/users/rueckstiess/followers","following_url":"https://api.github.com/users/rueckstiess/following{/other_user}","gists_url":"https://api.github.com/users/rueckstiess/gists{/gist_id}","starred_url":"https://api.github.com/users/rueckstiess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rueckstiess/subscriptions","organizations_url":"https://api.github.com/users/rueckstiess/orgs","repos_url":"https://api.github.com/users/rueckstiess/repos","events_url":"https://api.github.com/users/rueckstiess/events{/privacy}","received_events_url":"https://api.github.com/users/rueckstiess/received_events","type":"User","site_admin":false},"body":"semicolon","created_at":"2016-06-20T20:08:06Z","updated_at":"2016-06-20T20:08:06Z","html_url":"https://github.com/mongodb-js/repo-list/pull/2#discussion_r67756982","pull_request_url":"https://api.github.com/repos/mongodb-js/repo-list/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/mongodb-js/repo-list/pulls/comments/67756982"},"html":{"href":"https://github.com/mongodb-js/repo-list/pull/2#discussion_r67756982"},"pull_request":{"href":"https://api.github.com/repos/mongodb-js/repo-list/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb-js/repo-list/pulls/2","id":74501404,"html_url":"https://github.com/mongodb-js/repo-list/pull/2","diff_url":"https://github.com/mongodb-js/repo-list/pull/2.diff","patch_url":"https://github.com/mongodb-js/repo-list/pull/2.patch","issue_url":"https://api.github.com/repos/mongodb-js/repo-list/issues/2","number":2,"state":"open","locked":false,"title":"Stream export","user":{"login":"brahmgardner","id":17131239,"avatar_url":"https://avatars.githubusercontent.com/u/17131239?v=3","gravatar_id":"","url":"https://api.github.com/users/brahmgardner","html_url":"https://github.com/brahmgardner","followers_url":"https://api.github.com/users/brahmgardner/followers","following_url":"https://api.github.com/users/brahmgardner/following{/other_user}","gists_url":"https://api.github.com/users/brahmgardner/gists{/gist_id}","starred_url":"https://api.github.com/users/brahmgardner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brahmgardner/subscriptions","organizations_url":"https://api.github.com/users/brahmgardner/orgs","repos_url":"https://api.github.com/users/brahmgardner/repos","events_url":"https://api.github.com/users/brahmgardner/events{/privacy}","received_events_url":"https://api.github.com/users/brahmgardner/received_events","type":"User","site_admin":false},"body":"This pull request tackles three major changes.\r\n\r\n- 1.) The readable stream is now created by es.readable(). This allows the module to export a function that when called returns a stream. The previous behavior of the function exported by the module was to return a stream in the callback, so this is far cleaner.\r\n- 2.) The module now handles github authentication. This allows for far more API requests, meaning the number of API requests will not be a bottleneck for the module.\r\n- 3.) More options for making the module more useful. These include --format (formats output into either JSON, YAML, or a table), --grep (filters the repo search), --out (writes output to a file), and --keys (allows user to choose the topics on each repo returned by the search),\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/mongodb-js/repo-list/2)\n<!-- Reviewable:end -->\n","created_at":"2016-06-20T19:46:25Z","updated_at":"2016-06-20T20:08:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ea7efb0ce4bb1013dbb22b408e6ecea9c0d1bb0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mongodb-js/repo-list/pulls/2/commits","review_comments_url":"https://api.github.com/repos/mongodb-js/repo-list/pulls/2/comments","review_comment_url":"https://api.github.com/repos/mongodb-js/repo-list/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb-js/repo-list/issues/2/comments","statuses_url":"https://api.github.com/repos/mongodb-js/repo-list/statuses/f7b16c9f6770e790f31a69025c5c56c6eca77d22","head":{"label":"mongodb-js:streamExport","ref":"streamExport","sha":"f7b16c9f6770e790f31a69025c5c56c6eca77d22","user":{"login":"mongodb-js","id":11214950,"avatar_url":"https://avatars.githubusercontent.com/u/11214950?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"repo":{"id":60877163,"name":"repo-list","full_name":"mongodb-js/repo-list","owner":{"login":"mongodb-js","id":11214950,"avatar_url":"https://avatars.githubusercontent.com/u/11214950?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb-js/repo-list","description":"Small module to list all repos for a given GitHub organization","fork":false,"url":"https://api.github.com/repos/mongodb-js/repo-list","forks_url":"https://api.github.com/repos/mongodb-js/repo-list/forks","keys_url":"https://api.github.com/repos/mongodb-js/repo-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb-js/repo-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb-js/repo-list/teams","hooks_url":"https://api.github.com/repos/mongodb-js/repo-list/hooks","issue_events_url":"https://api.github.com/repos/mongodb-js/repo-list/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb-js/repo-list/events","assignees_url":"https://api.github.com/repos/mongodb-js/repo-list/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb-js/repo-list/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb-js/repo-list/tags","blobs_url":"https://api.github.com/repos/mongodb-js/repo-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb-js/repo-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb-js/repo-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb-js/repo-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb-js/repo-list/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb-js/repo-list/languages","stargazers_url":"https://api.github.com/repos/mongodb-js/repo-list/stargazers","contributors_url":"https://api.github.com/repos/mongodb-js/repo-list/contributors","subscribers_url":"https://api.github.com/repos/mongodb-js/repo-list/subscribers","subscription_url":"https://api.github.com/repos/mongodb-js/repo-list/subscription","commits_url":"https://api.github.com/repos/mongodb-js/repo-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb-js/repo-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb-js/repo-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb-js/repo-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb-js/repo-list/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb-js/repo-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb-js/repo-list/merges","archive_url":"https://api.github.com/repos/mongodb-js/repo-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb-js/repo-list/downloads","issues_url":"https://api.github.com/repos/mongodb-js/repo-list/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb-js/repo-list/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb-js/repo-list/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb-js/repo-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb-js/repo-list/labels{/name}","releases_url":"https://api.github.com/repos/mongodb-js/repo-list/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb-js/repo-list/deployments","created_at":"2016-06-10T21:13:00Z","updated_at":"2016-06-17T14:30:56Z","pushed_at":"2016-06-20T19:46:31Z","git_url":"git://github.com/mongodb-js/repo-list.git","ssh_url":"git@github.com:mongodb-js/repo-list.git","clone_url":"https://github.com/mongodb-js/repo-list.git","svn_url":"https://github.com/mongodb-js/repo-list","homepage":null,"size":17,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mongodb-js:master","ref":"master","sha":"e8f4d6f8c404d3b666626da3f7dd81faa120fb86","user":{"login":"mongodb-js","id":11214950,"avatar_url":"https://avatars.githubusercontent.com/u/11214950?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"repo":{"id":60877163,"name":"repo-list","full_name":"mongodb-js/repo-list","owner":{"login":"mongodb-js","id":11214950,"avatar_url":"https://avatars.githubusercontent.com/u/11214950?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb-js","html_url":"https://github.com/mongodb-js","followers_url":"https://api.github.com/users/mongodb-js/followers","following_url":"https://api.github.com/users/mongodb-js/following{/other_user}","gists_url":"https://api.github.com/users/mongodb-js/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb-js/subscriptions","organizations_url":"https://api.github.com/users/mongodb-js/orgs","repos_url":"https://api.github.com/users/mongodb-js/repos","events_url":"https://api.github.com/users/mongodb-js/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb-js/repo-list","description":"Small module to list all repos for a given GitHub organization","fork":false,"url":"https://api.github.com/repos/mongodb-js/repo-list","forks_url":"https://api.github.com/repos/mongodb-js/repo-list/forks","keys_url":"https://api.github.com/repos/mongodb-js/repo-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb-js/repo-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb-js/repo-list/teams","hooks_url":"https://api.github.com/repos/mongodb-js/repo-list/hooks","issue_events_url":"https://api.github.com/repos/mongodb-js/repo-list/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb-js/repo-list/events","assignees_url":"https://api.github.com/repos/mongodb-js/repo-list/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb-js/repo-list/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb-js/repo-list/tags","blobs_url":"https://api.github.com/repos/mongodb-js/repo-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb-js/repo-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb-js/repo-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb-js/repo-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb-js/repo-list/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb-js/repo-list/languages","stargazers_url":"https://api.github.com/repos/mongodb-js/repo-list/stargazers","contributors_url":"https://api.github.com/repos/mongodb-js/repo-list/contributors","subscribers_url":"https://api.github.com/repos/mongodb-js/repo-list/subscribers","subscription_url":"https://api.github.com/repos/mongodb-js/repo-list/subscription","commits_url":"https://api.github.com/repos/mongodb-js/repo-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb-js/repo-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb-js/repo-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb-js/repo-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb-js/repo-list/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb-js/repo-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb-js/repo-list/merges","archive_url":"https://api.github.com/repos/mongodb-js/repo-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb-js/repo-list/downloads","issues_url":"https://api.github.com/repos/mongodb-js/repo-list/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb-js/repo-list/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb-js/repo-list/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb-js/repo-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb-js/repo-list/labels{/name}","releases_url":"https://api.github.com/repos/mongodb-js/repo-list/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb-js/repo-list/deployments","created_at":"2016-06-10T21:13:00Z","updated_at":"2016-06-17T14:30:56Z","pushed_at":"2016-06-20T19:46:31Z","git_url":"git://github.com/mongodb-js/repo-list.git","ssh_url":"git@github.com:mongodb-js/repo-list.git","clone_url":"https://github.com/mongodb-js/repo-list.git","svn_url":"https://github.com/mongodb-js/repo-list","homepage":null,"size":17,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb-js/repo-list/pulls/2"},"html":{"href":"https://github.com/mongodb-js/repo-list/pull/2"},"issue":{"href":"https://api.github.com/repos/mongodb-js/repo-list/issues/2"},"comments":{"href":"https://api.github.com/repos/mongodb-js/repo-list/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb-js/repo-list/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb-js/repo-list/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb-js/repo-list/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb-js/repo-list/statuses/f7b16c9f6770e790f31a69025c5c56c6eca77d22"}}}}
{"actor":{"display_login":"rueckstiess"}}