GitHub PullRequestReviewCommentEvent at 2014-11-24 04:41:30
Repository: drive
Actor: rakyll
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rakyll/drive/pulls/comments/20772907","id":20772907,"diff_hunk":"@@ -90,20 +90,29 @@ func (r *Remote) FindByPath(p string) (file *File, err error) {\n }\n \n func (r *Remote) FindByParentId(parentId string) (files []*File, err error) {\n-\treq := r.service.Files.List()\n-\t// TODO: use field selectors\n-\treq.Q(fmt.Sprintf(\"'%s' in parents and trashed=false\", parentId))\n-\tresults, err := req.Do()\n-\t// TODO: handle paging\n-\tif err != nil {\n-\t\treturn\n-\t}\n-\tfor _, f := range results.Items {\n-\t\tif !strings.HasPrefix(f.Title, \".\") { // ignore hidden files\n-\t\t\tfiles = append(files, NewRemoteFile(f))\n+\n+\tpageToken := \"\"\n+\tfor {\n+\t\treq := r.service.Files.List()\n+\t\t// TODO: use field selectors\n+\t\treq.Q(fmt.Sprintf(\"'%s' in parents and trashed=false\", parentId))\n+\t\tif pageToken != \"\" {\n+\t\t\treq.PageToken(pageToken)\n+\t\t}\n+\t\tresults, err := req.Do()\n+\t\tif err != nil {\n+\t\t\treturn files, err\n+\t\t}\n+\t\tfor _, f := range results.Items {\n+\t\t\tif !strings.HasPrefix(f.Title, \".\") { // ignore hidden files\n+\t\t\t\tfiles = append(files, NewRemoteFile(f))\n+\t\t\t}\n+\t\t}\n+\t\tpageToken = results.NextPageToken\n+\t\tif (pageToken == \"\") {\n+\t\t\treturn files, err\n \t\t}\n \t}\n-\treturn","path":"remote.go","position":38,"original_position":38,"commit_id":"cb345b199b178189c404b7e35acb237986ec4840","original_commit_id":"cb345b199b178189c404b7e35acb237986ec4840","user":{"login":"rakyll","id":108380,"avatar_url":"https://avatars.githubusercontent.com/u/108380?v=3","gravatar_id":"","url":"https://api.github.com/users/rakyll","html_url":"https://github.com/rakyll","followers_url":"https://api.github.com/users/rakyll/followers","following_url":"https://api.github.com/users/rakyll/following{/other_user}","gists_url":"https://api.github.com/users/rakyll/gists{/gist_id}","starred_url":"https://api.github.com/users/rakyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakyll/subscriptions","organizations_url":"https://api.github.com/users/rakyll/orgs","repos_url":"https://api.github.com/users/rakyll/repos","events_url":"https://api.github.com/users/rakyll/events{/privacy}","received_events_url":"https://api.github.com/users/rakyll/received_events","type":"User","site_admin":false},"body":"Does this code compile? You should need a panic(\"unreachable\") here.","created_at":"2014-11-24T04:41:30Z","updated_at":"2014-11-24T04:41:30Z","html_url":"https://github.com/rakyll/drive/pull/24#discussion_r20772907","pull_request_url":"https://api.github.com/repos/rakyll/drive/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/rakyll/drive/pulls/comments/20772907"},"html":{"href":"https://github.com/rakyll/drive/pull/24#discussion_r20772907"},"pull_request":{"href":"https://api.github.com/repos/rakyll/drive/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/rakyll/drive/pulls/24","id":24346683,"html_url":"https://github.com/rakyll/drive/pull/24","diff_url":"https://github.com/rakyll/drive/pull/24.diff","patch_url":"https://github.com/rakyll/drive/pull/24.patch","issue_url":"https://api.github.com/repos/rakyll/drive/issues/24","number":24,"state":"open","locked":false,"title":"Add support for file request paging to Remote::FindParentById","user":{"login":"arolett2","id":8868058,"avatar_url":"https://avatars.githubusercontent.com/u/8868058?v=3","gravatar_id":"","url":"https://api.github.com/users/arolett2","html_url":"https://github.com/arolett2","followers_url":"https://api.github.com/users/arolett2/followers","following_url":"https://api.github.com/users/arolett2/following{/other_user}","gists_url":"https://api.github.com/users/arolett2/gists{/gist_id}","starred_url":"https://api.github.com/users/arolett2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arolett2/subscriptions","organizations_url":"https://api.github.com/users/arolett2/orgs","repos_url":"https://api.github.com/users/arolett2/repos","events_url":"https://api.github.com/users/arolett2/events{/privacy}","received_events_url":"https://api.github.com/users/arolett2/received_events","type":"User","site_admin":false},"body":"While issuing pull requests on a few of my directories I noticed that\r\nI was missing files. Implement paging so pull requests on directories\r\nthat have more than 100 files work.","created_at":"2014-11-13T05:16:28Z","updated_at":"2014-11-24T04:41:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1419609038e62f0657e32e1960b880cc9e2e486","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rakyll/drive/pulls/24/commits","review_comments_url":"https://api.github.com/repos/rakyll/drive/pulls/24/comments","review_comment_url":"https://api.github.com/repos/rakyll/drive/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rakyll/drive/issues/24/comments","statuses_url":"https://api.github.com/repos/rakyll/drive/statuses/cb345b199b178189c404b7e35acb237986ec4840","head":{"label":"arolett2:master","ref":"master","sha":"cb345b199b178189c404b7e35acb237986ec4840","user":{"login":"arolett2","id":8868058,"avatar_url":"https://avatars.githubusercontent.com/u/8868058?v=3","gravatar_id":"","url":"https://api.github.com/users/arolett2","html_url":"https://github.com/arolett2","followers_url":"https://api.github.com/users/arolett2/followers","following_url":"https://api.github.com/users/arolett2/following{/other_user}","gists_url":"https://api.github.com/users/arolett2/gists{/gist_id}","starred_url":"https://api.github.com/users/arolett2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arolett2/subscriptions","organizations_url":"https://api.github.com/users/arolett2/orgs","repos_url":"https://api.github.com/users/arolett2/repos","events_url":"https://api.github.com/users/arolett2/events{/privacy}","received_events_url":"https://api.github.com/users/arolett2/received_events","type":"User","site_admin":false},"repo":{"id":26571227,"name":"drive","full_name":"arolett2/drive","owner":{"login":"arolett2","id":8868058,"avatar_url":"https://avatars.githubusercontent.com/u/8868058?v=3","gravatar_id":"","url":"https://api.github.com/users/arolett2","html_url":"https://github.com/arolett2","followers_url":"https://api.github.com/users/arolett2/followers","following_url":"https://api.github.com/users/arolett2/following{/other_user}","gists_url":"https://api.github.com/users/arolett2/gists{/gist_id}","starred_url":"https://api.github.com/users/arolett2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arolett2/subscriptions","organizations_url":"https://api.github.com/users/arolett2/orgs","repos_url":"https://api.github.com/users/arolett2/repos","events_url":"https://api.github.com/users/arolett2/events{/privacy}","received_events_url":"https://api.github.com/users/arolett2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arolett2/drive","description":"Pull or push Google Drive files","fork":true,"url":"https://api.github.com/repos/arolett2/drive","forks_url":"https://api.github.com/repos/arolett2/drive/forks","keys_url":"https://api.github.com/repos/arolett2/drive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arolett2/drive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arolett2/drive/teams","hooks_url":"https://api.github.com/repos/arolett2/drive/hooks","issue_events_url":"https://api.github.com/repos/arolett2/drive/issues/events{/number}","events_url":"https://api.github.com/repos/arolett2/drive/events","assignees_url":"https://api.github.com/repos/arolett2/drive/assignees{/user}","branches_url":"https://api.github.com/repos/arolett2/drive/branches{/branch}","tags_url":"https://api.github.com/repos/arolett2/drive/tags","blobs_url":"https://api.github.com/repos/arolett2/drive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arolett2/drive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arolett2/drive/git/refs{/sha}","trees_url":"https://api.github.com/repos/arolett2/drive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arolett2/drive/statuses/{sha}","languages_url":"https://api.github.com/repos/arolett2/drive/languages","stargazers_url":"https://api.github.com/repos/arolett2/drive/stargazers","contributors_url":"https://api.github.com/repos/arolett2/drive/contributors","subscribers_url":"https://api.github.com/repos/arolett2/drive/subscribers","subscription_url":"https://api.github.com/repos/arolett2/drive/subscription","commits_url":"https://api.github.com/repos/arolett2/drive/commits{/sha}","git_commits_url":"https://api.github.com/repos/arolett2/drive/git/commits{/sha}","comments_url":"https://api.github.com/repos/arolett2/drive/comments{/number}","issue_comment_url":"https://api.github.com/repos/arolett2/drive/issues/comments/{number}","contents_url":"https://api.github.com/repos/arolett2/drive/contents/{+path}","compare_url":"https://api.github.com/repos/arolett2/drive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arolett2/drive/merges","archive_url":"https://api.github.com/repos/arolett2/drive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arolett2/drive/downloads","issues_url":"https://api.github.com/repos/arolett2/drive/issues{/number}","pulls_url":"https://api.github.com/repos/arolett2/drive/pulls{/number}","milestones_url":"https://api.github.com/repos/arolett2/drive/milestones{/number}","notifications_url":"https://api.github.com/repos/arolett2/drive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arolett2/drive/labels{/name}","releases_url":"https://api.github.com/repos/arolett2/drive/releases{/id}","created_at":"2014-11-13T04:50:30Z","updated_at":"2014-11-23T10:37:23Z","pushed_at":"2014-11-16T04:01:59Z","git_url":"git://github.com/arolett2/drive.git","ssh_url":"git@github.com:arolett2/drive.git","clone_url":"https://github.com/arolett2/drive.git","svn_url":"https://github.com/arolett2/drive","homepage":"","size":251,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"rakyll:master","ref":"master","sha":"3ef6932050bc77e05d6f684796b4af42360868a9","user":{"login":"rakyll","id":108380,"avatar_url":"https://avatars.githubusercontent.com/u/108380?v=3","gravatar_id":"","url":"https://api.github.com/users/rakyll","html_url":"https://github.com/rakyll","followers_url":"https://api.github.com/users/rakyll/followers","following_url":"https://api.github.com/users/rakyll/following{/other_user}","gists_url":"https://api.github.com/users/rakyll/gists{/gist_id}","starred_url":"https://api.github.com/users/rakyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakyll/subscriptions","organizations_url":"https://api.github.com/users/rakyll/orgs","repos_url":"https://api.github.com/users/rakyll/repos","events_url":"https://api.github.com/users/rakyll/events{/privacy}","received_events_url":"https://api.github.com/users/rakyll/received_events","type":"User","site_admin":false},"repo":{"id":15086710,"name":"drive","full_name":"rakyll/drive","owner":{"login":"rakyll","id":108380,"avatar_url":"https://avatars.githubusercontent.com/u/108380?v=3","gravatar_id":"","url":"https://api.github.com/users/rakyll","html_url":"https://github.com/rakyll","followers_url":"https://api.github.com/users/rakyll/followers","following_url":"https://api.github.com/users/rakyll/following{/other_user}","gists_url":"https://api.github.com/users/rakyll/gists{/gist_id}","starred_url":"https://api.github.com/users/rakyll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakyll/subscriptions","organizations_url":"https://api.github.com/users/rakyll/orgs","repos_url":"https://api.github.com/users/rakyll/repos","events_url":"https://api.github.com/users/rakyll/events{/privacy}","received_events_url":"https://api.github.com/users/rakyll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rakyll/drive","description":"Pull or push Google Drive files","fork":false,"url":"https://api.github.com/repos/rakyll/drive","forks_url":"https://api.github.com/repos/rakyll/drive/forks","keys_url":"https://api.github.com/repos/rakyll/drive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rakyll/drive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rakyll/drive/teams","hooks_url":"https://api.github.com/repos/rakyll/drive/hooks","issue_events_url":"https://api.github.com/repos/rakyll/drive/issues/events{/number}","events_url":"https://api.github.com/repos/rakyll/drive/events","assignees_url":"https://api.github.com/repos/rakyll/drive/assignees{/user}","branches_url":"https://api.github.com/repos/rakyll/drive/branches{/branch}","tags_url":"https://api.github.com/repos/rakyll/drive/tags","blobs_url":"https://api.github.com/repos/rakyll/drive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rakyll/drive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rakyll/drive/git/refs{/sha}","trees_url":"https://api.github.com/repos/rakyll/drive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rakyll/drive/statuses/{sha}","languages_url":"https://api.github.com/repos/rakyll/drive/languages","stargazers_url":"https://api.github.com/repos/rakyll/drive/stargazers","contributors_url":"https://api.github.com/repos/rakyll/drive/contributors","subscribers_url":"https://api.github.com/repos/rakyll/drive/subscribers","subscription_url":"https://api.github.com/repos/rakyll/drive/subscription","commits_url":"https://api.github.com/repos/rakyll/drive/commits{/sha}","git_commits_url":"https://api.github.com/repos/rakyll/drive/git/commits{/sha}","comments_url":"https://api.github.com/repos/rakyll/drive/comments{/number}","issue_comment_url":"https://api.github.com/repos/rakyll/drive/issues/comments/{number}","contents_url":"https://api.github.com/repos/rakyll/drive/contents/{+path}","compare_url":"https://api.github.com/repos/rakyll/drive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rakyll/drive/merges","archive_url":"https://api.github.com/repos/rakyll/drive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rakyll/drive/downloads","issues_url":"https://api.github.com/repos/rakyll/drive/issues{/number}","pulls_url":"https://api.github.com/repos/rakyll/drive/pulls{/number}","milestones_url":"https://api.github.com/repos/rakyll/drive/milestones{/number}","notifications_url":"https://api.github.com/repos/rakyll/drive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rakyll/drive/labels{/name}","releases_url":"https://api.github.com/repos/rakyll/drive/releases{/id}","created_at":"2013-12-10T19:14:14Z","updated_at":"2014-11-24T02:57:01Z","pushed_at":"2014-11-13T04:18:18Z","git_url":"git://github.com/rakyll/drive.git","ssh_url":"git@github.com:rakyll/drive.git","clone_url":"https://github.com/rakyll/drive.git","svn_url":"https://github.com/rakyll/drive","homepage":"","size":3663,"stargazers_count":180,"watchers_count":180,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":19,"forks":19,"open_issues":19,"watchers":180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rakyll/drive/pulls/24"},"html":{"href":"https://github.com/rakyll/drive/pull/24"},"issue":{"href":"https://api.github.com/repos/rakyll/drive/issues/24"},"comments":{"href":"https://api.github.com/repos/rakyll/drive/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/rakyll/drive/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/rakyll/drive/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rakyll/drive/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/rakyll/drive/statuses/cb345b199b178189c404b7e35acb237986ec4840"}}}}