{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/25218502","id":25218502,"diff_hunk":"@@ -0,0 +1,69 @@\n+# -*- coding: utf-8 -*-\n+import httplib as http\n+\n+from flask import request\n+\n+from framework.auth.core import _get_current_user\n+from framework.auth.decorators import must_be_logged_in\n+\n+from website.project.decorators import (\n+    must_have_permission,\n+    must_have_addon,\n+    must_not_be_registration,\n+    must_be_addon_authorizer,\n+)\n+from website.util import api_url_for\n+from website.util import permissions\n+\n+from ..utils import serialize_settings, serialize_urls\n+\n+\n+@must_have_addon('gdrive', 'node')\n+@must_have_permission(permissions.WRITE)\n+def gdrive_config_get(node_addon, **kwargs):\n+    \"\"\"API that returns the serialized node settings.\"\"\"\n+    user = _get_current_user()\n+    return {\n+        'result': serialize_settings(node_addon, user),\n+    }, http.OK\n+\n+\n+@must_have_permission(permissions.WRITE)\n+@must_not_be_registration\n+@must_have_addon('gdrive', 'user')\n+@must_have_addon('gdrive', 'node')\n+@must_be_addon_authorizer('gdrive')\n+def gdrive_config_put(node_addon, user_addon, auth, **kwargs):\n+    \"\"\"View for changing a node's linked Drive folder/file.\"\"\"\n+    selected = request.json.get('selected')","path":"website/addons/gdrive/views/config.py","position":38,"original_position":38,"commit_id":"5b47e8b9a3367c2d9f7b1d43c5aba9df00cbec9d","original_commit_id":"5b47e8b9a3367c2d9f7b1d43c5aba9df00cbec9d","user":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"body":"Use `request.get_json()`; `request.json` is deprecated.","created_at":"2015-02-24T00:43:23Z","updated_at":"2015-02-24T00:43:23Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/1770#discussion_r25218502","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1770","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/25218502"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/1770#discussion_r25218502"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1770"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1770","id":29138999,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/1770","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/1770.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/1770.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1770","number":1770,"state":"open","locked":false,"title":"Feature/gdrive treebeard","user":{"login":"kushG","id":8779995,"avatar_url":"https://avatars.githubusercontent.com/u/8779995?v=3","gravatar_id":"","url":"https://api.github.com/users/kushG","html_url":"https://github.com/kushG","followers_url":"https://api.github.com/users/kushG/followers","following_url":"https://api.github.com/users/kushG/following{/other_user}","gists_url":"https://api.github.com/users/kushG/gists{/gist_id}","starred_url":"https://api.github.com/users/kushG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kushG/subscriptions","organizations_url":"https://api.github.com/users/kushG/orgs","repos_url":"https://api.github.com/users/kushG/repos","events_url":"https://api.github.com/users/kushG/events{/privacy}","received_events_url":"https://api.github.com/users/kushG/received_events","type":"User","site_admin":false},"body":"<h3> Purpose </h3>\r\nThis PR adds Google Drive Addon to OSF.\r\n\r\nNeed to install below requirement\r\n\r\ngoogle-api-python-client==1.2\r\n\r\n<h3> Changes </h3>\r\n\r\nUser can now use their files from Google Drive as an addon in OSF. \r\nAll changes are on User settings & node settings page.\r\n\r\n<h3> Side Effects </h3>\r\n\r\nPath of the files coming out from waterbutler server is pretty complex & might result in failure if some functions & changes are made to waterbutler's path handling code.\r\n\r\n","created_at":"2015-02-11T23:28:15Z","updated_at":"2015-02-24T00:43:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"567c31a615d4a81c1b52d4b7b4fa5d363ecc5ad3","assignee":null,"milestone":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/24","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/24/labels","id":983320,"number":24,"title":"0.27.0","description":"Mendeley + Zotero + Box Add-on + Google Drive Add-on + Notifications system + Wiki improvements","creator":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":1,"state":"open","created_at":"2015-02-17T18:17:25Z","updated_at":"2015-02-23T17:04:02Z","due_on":"2015-02-25T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1770/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1770/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1770/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/5b47e8b9a3367c2d9f7b1d43c5aba9df00cbec9d","head":{"label":"kushG:feature/gdrive_treebeard","ref":"feature/gdrive_treebeard","sha":"5b47e8b9a3367c2d9f7b1d43c5aba9df00cbec9d","user":{"login":"kushG","id":8779995,"avatar_url":"https://avatars.githubusercontent.com/u/8779995?v=3","gravatar_id":"","url":"https://api.github.com/users/kushG","html_url":"https://github.com/kushG","followers_url":"https://api.github.com/users/kushG/followers","following_url":"https://api.github.com/users/kushG/following{/other_user}","gists_url":"https://api.github.com/users/kushG/gists{/gist_id}","starred_url":"https://api.github.com/users/kushG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kushG/subscriptions","organizations_url":"https://api.github.com/users/kushG/orgs","repos_url":"https://api.github.com/users/kushG/repos","events_url":"https://api.github.com/users/kushG/events{/privacy}","received_events_url":"https://api.github.com/users/kushG/received_events","type":"User","site_admin":false},"repo":{"id":27187768,"name":"osf.io","full_name":"kushG/osf.io","owner":{"login":"kushG","id":8779995,"avatar_url":"https://avatars.githubusercontent.com/u/8779995?v=3","gravatar_id":"","url":"https://api.github.com/users/kushG","html_url":"https://github.com/kushG","followers_url":"https://api.github.com/users/kushG/followers","following_url":"https://api.github.com/users/kushG/following{/other_user}","gists_url":"https://api.github.com/users/kushG/gists{/gist_id}","starred_url":"https://api.github.com/users/kushG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kushG/subscriptions","organizations_url":"https://api.github.com/users/kushG/orgs","repos_url":"https://api.github.com/users/kushG/repos","events_url":"https://api.github.com/users/kushG/events{/privacy}","received_events_url":"https://api.github.com/users/kushG/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kushG/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/kushG/osf.io","forks_url":"https://api.github.com/repos/kushG/osf.io/forks","keys_url":"https://api.github.com/repos/kushG/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kushG/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kushG/osf.io/teams","hooks_url":"https://api.github.com/repos/kushG/osf.io/hooks","issue_events_url":"https://api.github.com/repos/kushG/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/kushG/osf.io/events","assignees_url":"https://api.github.com/repos/kushG/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/kushG/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/kushG/osf.io/tags","blobs_url":"https://api.github.com/repos/kushG/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kushG/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kushG/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/kushG/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kushG/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/kushG/osf.io/languages","stargazers_url":"https://api.github.com/repos/kushG/osf.io/stargazers","contributors_url":"https://api.github.com/repos/kushG/osf.io/contributors","subscribers_url":"https://api.github.com/repos/kushG/osf.io/subscribers","subscription_url":"https://api.github.com/repos/kushG/osf.io/subscription","commits_url":"https://api.github.com/repos/kushG/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/kushG/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/kushG/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/kushG/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/kushG/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/kushG/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kushG/osf.io/merges","archive_url":"https://api.github.com/repos/kushG/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kushG/osf.io/downloads","issues_url":"https://api.github.com/repos/kushG/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/kushG/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/kushG/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/kushG/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kushG/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/kushG/osf.io/releases{/id}","created_at":"2014-11-26T17:19:56Z","updated_at":"2015-01-28T20:18:38Z","pushed_at":"2015-02-23T21:46:59Z","git_url":"git://github.com/kushG/osf.io.git","ssh_url":"git@github.com:kushG/osf.io.git","clone_url":"https://github.com/kushG/osf.io.git","svn_url":"https://github.com/kushG/osf.io","homepage":"http://osf.io","size":133097,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"e2aedef303738889bee06cad352ea1a84e27c6ff","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","created_at":"2013-05-21T15:53:37Z","updated_at":"2015-02-23T21:53:01Z","pushed_at":"2015-02-23T21:53:00Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":88832,"stargazers_count":75,"watchers_count":75,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":351,"forks":50,"open_issues":351,"watchers":75,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1770"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/1770"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1770"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1770/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1770/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1770/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/5b47e8b9a3367c2d9f7b1d43c5aba9df00cbec9d"}}}}