GitHub PullRequestReviewCommentEvent at 2014-10-22 16:46:26
Repository: cozy-data-proxy
Actor: frankrousseau
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/comments/19226551","id":19226551,"diff_hunk":"@@ -106,27 +106,23 @@ module.exports =\n \n         client.get \"cozy/#{remoteId}\", checkErrors\n \n-    docAlreadyExists: (filePath, callback) ->\n+    docAlreadyExists: (checksum, callback) ->\n         # Check if a binary already exists\n         # If so, return local binary DB document\n         # else, return null\n-        @checksum filePath, (err, checksum) ->\n+        pouch.allBinaries true, (err, existingDocs) ->","path":"backend/binary.coffee","position":10,"original_position":10,"commit_id":"9a6161af3abd81ffdbbad8e7595b34cad19c3be1","original_commit_id":"9a6161af3abd81ffdbbad8e7595b34cad19c3be1","user":{"login":"frankrousseau","id":1336623,"avatar_url":"https://avatars.githubusercontent.com/u/1336623?v=2","gravatar_id":"","url":"https://api.github.com/users/frankrousseau","html_url":"https://github.com/frankrousseau","followers_url":"https://api.github.com/users/frankrousseau/followers","following_url":"https://api.github.com/users/frankrousseau/following{/other_user}","gists_url":"https://api.github.com/users/frankrousseau/gists{/gist_id}","starred_url":"https://api.github.com/users/frankrousseau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankrousseau/subscriptions","organizations_url":"https://api.github.com/users/frankrousseau/orgs","repos_url":"https://api.github.com/users/frankrousseau/repos","events_url":"https://api.github.com/users/frankrousseau/events{/privacy}","received_events_url":"https://api.github.com/users/frankrousseau/received_events","type":"User","site_admin":false},"body":"That's not the right way to check if a binary exists. You could use a PouchDB request to retrieve only doc that match a given key. Then you could check if existingDocs is empty or not.","created_at":"2014-10-22T16:46:26Z","updated_at":"2014-10-22T16:46:26Z","html_url":"https://github.com/cozy-labs/cozy-data-proxy/pull/5#discussion_r19226551","pull_request_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/comments/19226551"},"html":{"href":"https://github.com/cozy-labs/cozy-data-proxy/pull/5#discussion_r19226551"},"pull_request":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/5","id":23157487,"html_url":"https://github.com/cozy-labs/cozy-data-proxy/pull/5","diff_url":"https://github.com/cozy-labs/cozy-data-proxy/pull/5.diff","patch_url":"https://github.com/cozy-labs/cozy-data-proxy/pull/5.patch","issue_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/issues/5","number":5,"state":"open","locked":false,"title":"[fix] Get catchup watching to work","user":{"login":"Kloadut","id":1279740,"avatar_url":"https://avatars.githubusercontent.com/u/1279740?v=2","gravatar_id":"","url":"https://api.github.com/users/Kloadut","html_url":"https://github.com/Kloadut","followers_url":"https://api.github.com/users/Kloadut/followers","following_url":"https://api.github.com/users/Kloadut/following{/other_user}","gists_url":"https://api.github.com/users/Kloadut/gists{/gist_id}","starred_url":"https://api.github.com/users/Kloadut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kloadut/subscriptions","organizations_url":"https://api.github.com/users/Kloadut/orgs","repos_url":"https://api.github.com/users/Kloadut/repos","events_url":"https://api.github.com/users/Kloadut/events{/privacy}","received_events_url":"https://api.github.com/users/Kloadut/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-22T13:38:00Z","updated_at":"2014-10-22T16:46:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"073af004112d17d2f00b8d49ec78c0b5c0022351","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/5/commits","review_comments_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/5/comments","review_comment_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/issues/5/comments","statuses_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/statuses/9a6161af3abd81ffdbbad8e7595b34cad19c3be1","head":{"label":"Kloadut:master","ref":"master","sha":"9a6161af3abd81ffdbbad8e7595b34cad19c3be1","user":{"login":"Kloadut","id":1279740,"avatar_url":"https://avatars.githubusercontent.com/u/1279740?v=2","gravatar_id":"","url":"https://api.github.com/users/Kloadut","html_url":"https://github.com/Kloadut","followers_url":"https://api.github.com/users/Kloadut/followers","following_url":"https://api.github.com/users/Kloadut/following{/other_user}","gists_url":"https://api.github.com/users/Kloadut/gists{/gist_id}","starred_url":"https://api.github.com/users/Kloadut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kloadut/subscriptions","organizations_url":"https://api.github.com/users/Kloadut/orgs","repos_url":"https://api.github.com/users/Kloadut/repos","events_url":"https://api.github.com/users/Kloadut/events{/privacy}","received_events_url":"https://api.github.com/users/Kloadut/received_events","type":"User","site_admin":false},"repo":{"id":23469710,"name":"cozy-data-proxy","full_name":"Kloadut/cozy-data-proxy","owner":{"login":"Kloadut","id":1279740,"avatar_url":"https://avatars.githubusercontent.com/u/1279740?v=2","gravatar_id":"","url":"https://api.github.com/users/Kloadut","html_url":"https://github.com/Kloadut","followers_url":"https://api.github.com/users/Kloadut/followers","following_url":"https://api.github.com/users/Kloadut/following{/other_user}","gists_url":"https://api.github.com/users/Kloadut/gists{/gist_id}","starred_url":"https://api.github.com/users/Kloadut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kloadut/subscriptions","organizations_url":"https://api.github.com/users/Kloadut/orgs","repos_url":"https://api.github.com/users/Kloadut/repos","events_url":"https://api.github.com/users/Kloadut/events{/privacy}","received_events_url":"https://api.github.com/users/Kloadut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kloadut/cozy-data-proxy","description":"Synchronisation and offline mode for Cozy apps on desktop and laptop","fork":true,"url":"https://api.github.com/repos/Kloadut/cozy-data-proxy","forks_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/forks","keys_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/teams","hooks_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/hooks","issue_events_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/issues/events{/number}","events_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/events","assignees_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/assignees{/user}","branches_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/branches{/branch}","tags_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/tags","blobs_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/languages","stargazers_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/stargazers","contributors_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/contributors","subscribers_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/subscribers","subscription_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/subscription","commits_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/issues/comments/{number}","contents_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/contents/{+path}","compare_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/merges","archive_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/downloads","issues_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/issues{/number}","pulls_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/labels{/name}","releases_url":"https://api.github.com/repos/Kloadut/cozy-data-proxy/releases{/id}","created_at":"2014-08-29T16:07:24Z","updated_at":"2014-10-16T10:27:02Z","pushed_at":"2014-10-22T13:37:38Z","git_url":"git://github.com/Kloadut/cozy-data-proxy.git","ssh_url":"git@github.com:Kloadut/cozy-data-proxy.git","clone_url":"https://github.com/Kloadut/cozy-data-proxy.git","svn_url":"https://github.com/Kloadut/cozy-data-proxy","homepage":null,"size":2465,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","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":0,"default_branch":"master"}},"base":{"label":"cozy-labs:master","ref":"master","sha":"592f3aa021484f21b54bd52b97ea21eb95e7ff7f","user":{"login":"cozy-labs","id":8415593,"avatar_url":"https://avatars.githubusercontent.com/u/8415593?v=2","gravatar_id":"","url":"https://api.github.com/users/cozy-labs","html_url":"https://github.com/cozy-labs","followers_url":"https://api.github.com/users/cozy-labs/followers","following_url":"https://api.github.com/users/cozy-labs/following{/other_user}","gists_url":"https://api.github.com/users/cozy-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy-labs/subscriptions","organizations_url":"https://api.github.com/users/cozy-labs/orgs","repos_url":"https://api.github.com/users/cozy-labs/repos","events_url":"https://api.github.com/users/cozy-labs/events{/privacy}","received_events_url":"https://api.github.com/users/cozy-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":23385363,"name":"cozy-data-proxy","full_name":"cozy-labs/cozy-data-proxy","owner":{"login":"cozy-labs","id":8415593,"avatar_url":"https://avatars.githubusercontent.com/u/8415593?v=2","gravatar_id":"","url":"https://api.github.com/users/cozy-labs","html_url":"https://github.com/cozy-labs","followers_url":"https://api.github.com/users/cozy-labs/followers","following_url":"https://api.github.com/users/cozy-labs/following{/other_user}","gists_url":"https://api.github.com/users/cozy-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy-labs/subscriptions","organizations_url":"https://api.github.com/users/cozy-labs/orgs","repos_url":"https://api.github.com/users/cozy-labs/repos","events_url":"https://api.github.com/users/cozy-labs/events{/privacy}","received_events_url":"https://api.github.com/users/cozy-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cozy-labs/cozy-data-proxy","description":"Synchronisation and offline mode for Cozy apps on desktop and laptop","fork":false,"url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy","forks_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/forks","keys_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/teams","hooks_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/hooks","issue_events_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/issues/events{/number}","events_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/events","assignees_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/assignees{/user}","branches_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/branches{/branch}","tags_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/tags","blobs_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/languages","stargazers_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/stargazers","contributors_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/contributors","subscribers_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/subscribers","subscription_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/subscription","commits_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/issues/comments/{number}","contents_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/contents/{+path}","compare_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/merges","archive_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/downloads","issues_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/issues{/number}","pulls_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/labels{/name}","releases_url":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/releases{/id}","created_at":"2014-08-27T10:10:38Z","updated_at":"2014-10-15T20:05:24Z","pushed_at":"2014-10-17T11:00:19Z","git_url":"git://github.com/cozy-labs/cozy-data-proxy.git","ssh_url":"git@github.com:cozy-labs/cozy-data-proxy.git","clone_url":"https://github.com/cozy-labs/cozy-data-proxy.git","svn_url":"https://github.com/cozy-labs/cozy-data-proxy","homepage":null,"size":2527,"stargazers_count":1,"watchers_count":1,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/5"},"html":{"href":"https://github.com/cozy-labs/cozy-data-proxy/pull/5"},"issue":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/issues/5"},"comments":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/cozy-labs/cozy-data-proxy/statuses/9a6161af3abd81ffdbbad8e7595b34cad19c3be1"}}}}