{"action":"opened","number":19,"pull_request":{"url":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls/19","id":49987681,"html_url":"https://github.com/himanshuo/OSF-Offline/pull/19","diff_url":"https://github.com/himanshuo/OSF-Offline/pull/19.diff","patch_url":"https://github.com/himanshuo/OSF-Offline/pull/19.patch","issue_url":"https://api.github.com/repos/himanshuo/OSF-Offline/issues/19","number":19,"state":"open","locked":false,"title":"Fix/last modified","user":{"login":"himanshuo","id":5808841,"avatar_url":"https://avatars.githubusercontent.com/u/5808841?v=3","gravatar_id":"","url":"https://api.github.com/users/himanshuo","html_url":"https://github.com/himanshuo","followers_url":"https://api.github.com/users/himanshuo/followers","following_url":"https://api.github.com/users/himanshuo/following{/other_user}","gists_url":"https://api.github.com/users/himanshuo/gists{/gist_id}","starred_url":"https://api.github.com/users/himanshuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himanshuo/subscriptions","organizations_url":"https://api.github.com/users/himanshuo/orgs","repos_url":"https://api.github.com/users/himanshuo/repos","events_url":"https://api.github.com/users/himanshuo/events{/privacy}","received_events_url":"https://api.github.com/users/himanshuo/received_events","type":"User","site_admin":false},"body":"We changed the code so that we default to the local flags for nodes and folders. We use date modified only for files. Also, we use the OSF API's response[attributes][modified] to determine the remote field.\r\nThe changes update the RemoteFile class to store the last modified string and then use @property to turn the string into a datetime on demand. The reason for this is that we need the conversion to fail on demand in order to allow us to know how to handle it. We dont want to handle it too early because that could be unnecessary extra api calls.\r\nThe specific functions in osfoffline/polling_osf_manager/polling.py are local_is_newer and remote_is_newer to be called local_file_is_newer and remote_file_is_newer and basically expect the inputs to be RemoteFile objects instead of something more generic.\r\nIn the future, perhaps we do want to make these functions more generic. The flags that we are setting are just heuristics and will certainly not yield accurate results. For example, if a folder is renamed locally and online, we do not know which is the newest. With our current heuristic, we just update the OSF if we see that the folder is changed locally.","created_at":"2015-11-06T18:27:03Z","updated_at":"2015-11-06T18:27:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls/19/commits","review_comments_url":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls/19/comments","review_comment_url":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/himanshuo/OSF-Offline/issues/19/comments","statuses_url":"https://api.github.com/repos/himanshuo/OSF-Offline/statuses/ac92233dc9035e2c93991dafb8cd7d272ae7e3c0","head":{"label":"himanshuo:fix/last_modified","ref":"fix/last_modified","sha":"ac92233dc9035e2c93991dafb8cd7d272ae7e3c0","user":{"login":"himanshuo","id":5808841,"avatar_url":"https://avatars.githubusercontent.com/u/5808841?v=3","gravatar_id":"","url":"https://api.github.com/users/himanshuo","html_url":"https://github.com/himanshuo","followers_url":"https://api.github.com/users/himanshuo/followers","following_url":"https://api.github.com/users/himanshuo/following{/other_user}","gists_url":"https://api.github.com/users/himanshuo/gists{/gist_id}","starred_url":"https://api.github.com/users/himanshuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himanshuo/subscriptions","organizations_url":"https://api.github.com/users/himanshuo/orgs","repos_url":"https://api.github.com/users/himanshuo/repos","events_url":"https://api.github.com/users/himanshuo/events{/privacy}","received_events_url":"https://api.github.com/users/himanshuo/received_events","type":"User","site_admin":false},"repo":{"id":37069756,"name":"OSF-Offline","full_name":"himanshuo/OSF-Offline","owner":{"login":"himanshuo","id":5808841,"avatar_url":"https://avatars.githubusercontent.com/u/5808841?v=3","gravatar_id":"","url":"https://api.github.com/users/himanshuo","html_url":"https://github.com/himanshuo","followers_url":"https://api.github.com/users/himanshuo/followers","following_url":"https://api.github.com/users/himanshuo/following{/other_user}","gists_url":"https://api.github.com/users/himanshuo/gists{/gist_id}","starred_url":"https://api.github.com/users/himanshuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himanshuo/subscriptions","organizations_url":"https://api.github.com/users/himanshuo/orgs","repos_url":"https://api.github.com/users/himanshuo/repos","events_url":"https://api.github.com/users/himanshuo/events{/privacy}","received_events_url":"https://api.github.com/users/himanshuo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/himanshuo/OSF-Offline","description":"Desktop Synchronization for OSF Projects ","fork":false,"url":"https://api.github.com/repos/himanshuo/OSF-Offline","forks_url":"https://api.github.com/repos/himanshuo/OSF-Offline/forks","keys_url":"https://api.github.com/repos/himanshuo/OSF-Offline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/himanshuo/OSF-Offline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/himanshuo/OSF-Offline/teams","hooks_url":"https://api.github.com/repos/himanshuo/OSF-Offline/hooks","issue_events_url":"https://api.github.com/repos/himanshuo/OSF-Offline/issues/events{/number}","events_url":"https://api.github.com/repos/himanshuo/OSF-Offline/events","assignees_url":"https://api.github.com/repos/himanshuo/OSF-Offline/assignees{/user}","branches_url":"https://api.github.com/repos/himanshuo/OSF-Offline/branches{/branch}","tags_url":"https://api.github.com/repos/himanshuo/OSF-Offline/tags","blobs_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/refs{/sha}","trees_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/himanshuo/OSF-Offline/statuses/{sha}","languages_url":"https://api.github.com/repos/himanshuo/OSF-Offline/languages","stargazers_url":"https://api.github.com/repos/himanshuo/OSF-Offline/stargazers","contributors_url":"https://api.github.com/repos/himanshuo/OSF-Offline/contributors","subscribers_url":"https://api.github.com/repos/himanshuo/OSF-Offline/subscribers","subscription_url":"https://api.github.com/repos/himanshuo/OSF-Offline/subscription","commits_url":"https://api.github.com/repos/himanshuo/OSF-Offline/commits{/sha}","git_commits_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/commits{/sha}","comments_url":"https://api.github.com/repos/himanshuo/OSF-Offline/comments{/number}","issue_comment_url":"https://api.github.com/repos/himanshuo/OSF-Offline/issues/comments{/number}","contents_url":"https://api.github.com/repos/himanshuo/OSF-Offline/contents/{+path}","compare_url":"https://api.github.com/repos/himanshuo/OSF-Offline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/himanshuo/OSF-Offline/merges","archive_url":"https://api.github.com/repos/himanshuo/OSF-Offline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/himanshuo/OSF-Offline/downloads","issues_url":"https://api.github.com/repos/himanshuo/OSF-Offline/issues{/number}","pulls_url":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls{/number}","milestones_url":"https://api.github.com/repos/himanshuo/OSF-Offline/milestones{/number}","notifications_url":"https://api.github.com/repos/himanshuo/OSF-Offline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/himanshuo/OSF-Offline/labels{/name}","releases_url":"https://api.github.com/repos/himanshuo/OSF-Offline/releases{/id}","created_at":"2015-06-08T13:50:50Z","updated_at":"2015-07-10T23:05:38Z","pushed_at":"2015-11-06T18:25:15Z","git_url":"git://github.com/himanshuo/OSF-Offline.git","ssh_url":"git@github.com:himanshuo/OSF-Offline.git","clone_url":"https://github.com/himanshuo/OSF-Offline.git","svn_url":"https://github.com/himanshuo/OSF-Offline","homepage":null,"size":2137,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"himanshuo:develop","ref":"develop","sha":"33ec827e722b41ba6bd1c2b7f718a784e2fdb257","user":{"login":"himanshuo","id":5808841,"avatar_url":"https://avatars.githubusercontent.com/u/5808841?v=3","gravatar_id":"","url":"https://api.github.com/users/himanshuo","html_url":"https://github.com/himanshuo","followers_url":"https://api.github.com/users/himanshuo/followers","following_url":"https://api.github.com/users/himanshuo/following{/other_user}","gists_url":"https://api.github.com/users/himanshuo/gists{/gist_id}","starred_url":"https://api.github.com/users/himanshuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himanshuo/subscriptions","organizations_url":"https://api.github.com/users/himanshuo/orgs","repos_url":"https://api.github.com/users/himanshuo/repos","events_url":"https://api.github.com/users/himanshuo/events{/privacy}","received_events_url":"https://api.github.com/users/himanshuo/received_events","type":"User","site_admin":false},"repo":{"id":37069756,"name":"OSF-Offline","full_name":"himanshuo/OSF-Offline","owner":{"login":"himanshuo","id":5808841,"avatar_url":"https://avatars.githubusercontent.com/u/5808841?v=3","gravatar_id":"","url":"https://api.github.com/users/himanshuo","html_url":"https://github.com/himanshuo","followers_url":"https://api.github.com/users/himanshuo/followers","following_url":"https://api.github.com/users/himanshuo/following{/other_user}","gists_url":"https://api.github.com/users/himanshuo/gists{/gist_id}","starred_url":"https://api.github.com/users/himanshuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himanshuo/subscriptions","organizations_url":"https://api.github.com/users/himanshuo/orgs","repos_url":"https://api.github.com/users/himanshuo/repos","events_url":"https://api.github.com/users/himanshuo/events{/privacy}","received_events_url":"https://api.github.com/users/himanshuo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/himanshuo/OSF-Offline","description":"Desktop Synchronization for OSF Projects ","fork":false,"url":"https://api.github.com/repos/himanshuo/OSF-Offline","forks_url":"https://api.github.com/repos/himanshuo/OSF-Offline/forks","keys_url":"https://api.github.com/repos/himanshuo/OSF-Offline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/himanshuo/OSF-Offline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/himanshuo/OSF-Offline/teams","hooks_url":"https://api.github.com/repos/himanshuo/OSF-Offline/hooks","issue_events_url":"https://api.github.com/repos/himanshuo/OSF-Offline/issues/events{/number}","events_url":"https://api.github.com/repos/himanshuo/OSF-Offline/events","assignees_url":"https://api.github.com/repos/himanshuo/OSF-Offline/assignees{/user}","branches_url":"https://api.github.com/repos/himanshuo/OSF-Offline/branches{/branch}","tags_url":"https://api.github.com/repos/himanshuo/OSF-Offline/tags","blobs_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/refs{/sha}","trees_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/himanshuo/OSF-Offline/statuses/{sha}","languages_url":"https://api.github.com/repos/himanshuo/OSF-Offline/languages","stargazers_url":"https://api.github.com/repos/himanshuo/OSF-Offline/stargazers","contributors_url":"https://api.github.com/repos/himanshuo/OSF-Offline/contributors","subscribers_url":"https://api.github.com/repos/himanshuo/OSF-Offline/subscribers","subscription_url":"https://api.github.com/repos/himanshuo/OSF-Offline/subscription","commits_url":"https://api.github.com/repos/himanshuo/OSF-Offline/commits{/sha}","git_commits_url":"https://api.github.com/repos/himanshuo/OSF-Offline/git/commits{/sha}","comments_url":"https://api.github.com/repos/himanshuo/OSF-Offline/comments{/number}","issue_comment_url":"https://api.github.com/repos/himanshuo/OSF-Offline/issues/comments{/number}","contents_url":"https://api.github.com/repos/himanshuo/OSF-Offline/contents/{+path}","compare_url":"https://api.github.com/repos/himanshuo/OSF-Offline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/himanshuo/OSF-Offline/merges","archive_url":"https://api.github.com/repos/himanshuo/OSF-Offline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/himanshuo/OSF-Offline/downloads","issues_url":"https://api.github.com/repos/himanshuo/OSF-Offline/issues{/number}","pulls_url":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls{/number}","milestones_url":"https://api.github.com/repos/himanshuo/OSF-Offline/milestones{/number}","notifications_url":"https://api.github.com/repos/himanshuo/OSF-Offline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/himanshuo/OSF-Offline/labels{/name}","releases_url":"https://api.github.com/repos/himanshuo/OSF-Offline/releases{/id}","created_at":"2015-06-08T13:50:50Z","updated_at":"2015-07-10T23:05:38Z","pushed_at":"2015-11-06T18:25:15Z","git_url":"git://github.com/himanshuo/OSF-Offline.git","ssh_url":"git@github.com:himanshuo/OSF-Offline.git","clone_url":"https://github.com/himanshuo/OSF-Offline.git","svn_url":"https://github.com/himanshuo/OSF-Offline","homepage":null,"size":2137,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls/19"},"html":{"href":"https://github.com/himanshuo/OSF-Offline/pull/19"},"issue":{"href":"https://api.github.com/repos/himanshuo/OSF-Offline/issues/19"},"comments":{"href":"https://api.github.com/repos/himanshuo/OSF-Offline/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/himanshuo/OSF-Offline/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/himanshuo/OSF-Offline/statuses/ac92233dc9035e2c93991dafb8cd7d272ae7e3c0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":36,"deletions":42,"changed_files":2}}