{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/comments/32650156","id":32650156,"diff_hunk":"@@ -342,6 +355,9 @@ def metadata(self, path, **kwargs):\n             ] if x]\n \n         file_json = figshare_utils.file_or_error(article_json, path.identifier)\n+\n+        if article_json['status'] == 'Public':\n+            file_json['figshare_url'] = yield from self.get_published_article_url()","path":"waterbutler/providers/figshare/provider.py","position":null,"original_position":33,"commit_id":"4f76e6f7e9126b362062d4a326259fcfd33282f6","original_commit_id":"f5b02084d6d8153bdd2891735447cef8ec485564","user":{"login":"chrisseto","id":5532905,"avatar_url":"https://avatars.githubusercontent.com/u/5532905?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisseto","html_url":"https://github.com/chrisseto","followers_url":"https://api.github.com/users/chrisseto/followers","following_url":"https://api.github.com/users/chrisseto/following{/other_user}","gists_url":"https://api.github.com/users/chrisseto/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisseto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisseto/subscriptions","organizations_url":"https://api.github.com/users/chrisseto/orgs","repos_url":"https://api.github.com/users/chrisseto/repos","events_url":"https://api.github.com/users/chrisseto/events{/privacy}","received_events_url":"https://api.github.com/users/chrisseto/received_events","type":"User","site_admin":false},"body":"This does not look like the best place to put this, I'd suggest just building the url yourself in the metadata object","created_at":"2015-06-17T17:11:10Z","updated_at":"2015-06-17T17:11:10Z","html_url":"https://github.com/CenterForOpenScience/waterbutler/pull/48#discussion_r32650156","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/comments/32650156"},"html":{"href":"https://github.com/CenterForOpenScience/waterbutler/pull/48#discussion_r32650156"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/48","id":37593729,"html_url":"https://github.com/CenterForOpenScience/waterbutler/pull/48","diff_url":"https://github.com/CenterForOpenScience/waterbutler/pull/48.diff","patch_url":"https://github.com/CenterForOpenScience/waterbutler/pull/48.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/issues/48","number":48,"state":"open","locked":false,"title":"feature/file-source-urls","user":{"login":"caseyrollins","id":7913604,"avatar_url":"https://avatars.githubusercontent.com/u/7913604?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyrollins","html_url":"https://github.com/caseyrollins","followers_url":"https://api.github.com/users/caseyrollins/followers","following_url":"https://api.github.com/users/caseyrollins/following{/other_user}","gists_url":"https://api.github.com/users/caseyrollins/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyrollins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyrollins/subscriptions","organizations_url":"https://api.github.com/users/caseyrollins/orgs","repos_url":"https://api.github.com/users/caseyrollins/repos","events_url":"https://api.github.com/users/caseyrollins/events{/privacy}","received_events_url":"https://api.github.com/users/caseyrollins/received_events","type":"User","site_admin":false},"body":"#### Purpose\r\n- Adds source_url to the file metadata that is returned from WaterButler.\r\n- Addresses [#2926](https://github.com/CenterForOpenScience/osf.io/issues/2926)\r\n- Addons:\r\n - [x] GitHub: file view url built from current metadata\r\n - [x] Google Drive: file view url retrieved from Google Drive API\r\n - [x] Figshare: file view url retrieved from Figshare API (for published articles only)\r\n - [x] Dropbox: share link generated from Dropbox API\r\n - [x] Box: share link generated from Box API\r\n - [x] S3: unsupported\r\n - [x] Dataverse: unsupported","created_at":"2015-06-12T18:57:20Z","updated_at":"2015-06-17T17:11:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e83cc667a9592cc5f2fe4507160ced70a9fede8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/48/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/48/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/issues/48/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/statuses/4f76e6f7e9126b362062d4a326259fcfd33282f6","head":{"label":"caseyrollins:feature/source-urls","ref":"feature/source-urls","sha":"4f76e6f7e9126b362062d4a326259fcfd33282f6","user":{"login":"caseyrollins","id":7913604,"avatar_url":"https://avatars.githubusercontent.com/u/7913604?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyrollins","html_url":"https://github.com/caseyrollins","followers_url":"https://api.github.com/users/caseyrollins/followers","following_url":"https://api.github.com/users/caseyrollins/following{/other_user}","gists_url":"https://api.github.com/users/caseyrollins/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyrollins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyrollins/subscriptions","organizations_url":"https://api.github.com/users/caseyrollins/orgs","repos_url":"https://api.github.com/users/caseyrollins/repos","events_url":"https://api.github.com/users/caseyrollins/events{/privacy}","received_events_url":"https://api.github.com/users/caseyrollins/received_events","type":"User","site_admin":false},"repo":{"id":37142835,"name":"waterbutler","full_name":"caseyrollins/waterbutler","owner":{"login":"caseyrollins","id":7913604,"avatar_url":"https://avatars.githubusercontent.com/u/7913604?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyrollins","html_url":"https://github.com/caseyrollins","followers_url":"https://api.github.com/users/caseyrollins/followers","following_url":"https://api.github.com/users/caseyrollins/following{/other_user}","gists_url":"https://api.github.com/users/caseyrollins/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyrollins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyrollins/subscriptions","organizations_url":"https://api.github.com/users/caseyrollins/orgs","repos_url":"https://api.github.com/users/caseyrollins/repos","events_url":"https://api.github.com/users/caseyrollins/events{/privacy}","received_events_url":"https://api.github.com/users/caseyrollins/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caseyrollins/waterbutler","description":"","fork":true,"url":"https://api.github.com/repos/caseyrollins/waterbutler","forks_url":"https://api.github.com/repos/caseyrollins/waterbutler/forks","keys_url":"https://api.github.com/repos/caseyrollins/waterbutler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caseyrollins/waterbutler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caseyrollins/waterbutler/teams","hooks_url":"https://api.github.com/repos/caseyrollins/waterbutler/hooks","issue_events_url":"https://api.github.com/repos/caseyrollins/waterbutler/issues/events{/number}","events_url":"https://api.github.com/repos/caseyrollins/waterbutler/events","assignees_url":"https://api.github.com/repos/caseyrollins/waterbutler/assignees{/user}","branches_url":"https://api.github.com/repos/caseyrollins/waterbutler/branches{/branch}","tags_url":"https://api.github.com/repos/caseyrollins/waterbutler/tags","blobs_url":"https://api.github.com/repos/caseyrollins/waterbutler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caseyrollins/waterbutler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caseyrollins/waterbutler/git/refs{/sha}","trees_url":"https://api.github.com/repos/caseyrollins/waterbutler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caseyrollins/waterbutler/statuses/{sha}","languages_url":"https://api.github.com/repos/caseyrollins/waterbutler/languages","stargazers_url":"https://api.github.com/repos/caseyrollins/waterbutler/stargazers","contributors_url":"https://api.github.com/repos/caseyrollins/waterbutler/contributors","subscribers_url":"https://api.github.com/repos/caseyrollins/waterbutler/subscribers","subscription_url":"https://api.github.com/repos/caseyrollins/waterbutler/subscription","commits_url":"https://api.github.com/repos/caseyrollins/waterbutler/commits{/sha}","git_commits_url":"https://api.github.com/repos/caseyrollins/waterbutler/git/commits{/sha}","comments_url":"https://api.github.com/repos/caseyrollins/waterbutler/comments{/number}","issue_comment_url":"https://api.github.com/repos/caseyrollins/waterbutler/issues/comments{/number}","contents_url":"https://api.github.com/repos/caseyrollins/waterbutler/contents/{+path}","compare_url":"https://api.github.com/repos/caseyrollins/waterbutler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caseyrollins/waterbutler/merges","archive_url":"https://api.github.com/repos/caseyrollins/waterbutler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caseyrollins/waterbutler/downloads","issues_url":"https://api.github.com/repos/caseyrollins/waterbutler/issues{/number}","pulls_url":"https://api.github.com/repos/caseyrollins/waterbutler/pulls{/number}","milestones_url":"https://api.github.com/repos/caseyrollins/waterbutler/milestones{/number}","notifications_url":"https://api.github.com/repos/caseyrollins/waterbutler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caseyrollins/waterbutler/labels{/name}","releases_url":"https://api.github.com/repos/caseyrollins/waterbutler/releases{/id}","created_at":"2015-06-09T16:04:51Z","updated_at":"2015-06-09T16:04:52Z","pushed_at":"2015-06-17T16:52:10Z","git_url":"git://github.com/caseyrollins/waterbutler.git","ssh_url":"git@github.com:caseyrollins/waterbutler.git","clone_url":"https://github.com/caseyrollins/waterbutler.git","svn_url":"https://github.com/caseyrollins/waterbutler","homepage":"http://waterbutler.io","size":1517,"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":"8bb85f4177e071d9d82b491b733003a0453bf1b6","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":27130042,"name":"waterbutler","full_name":"CenterForOpenScience/waterbutler","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/waterbutler","description":"","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/waterbutler","forks_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/waterbutler/releases{/id}","created_at":"2014-11-25T14:42:31Z","updated_at":"2015-05-22T00:07:10Z","pushed_at":"2015-06-17T16:38:32Z","git_url":"git://github.com/CenterForOpenScience/waterbutler.git","ssh_url":"git@github.com:CenterForOpenScience/waterbutler.git","clone_url":"https://github.com/CenterForOpenScience/waterbutler.git","svn_url":"https://github.com/CenterForOpenScience/waterbutler","homepage":"http://waterbutler.io","size":2960,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":4,"forks":22,"open_issues":4,"watchers":9,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/48"},"html":{"href":"https://github.com/CenterForOpenScience/waterbutler/pull/48"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/issues/48"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/waterbutler/statuses/4f76e6f7e9126b362062d4a326259fcfd33282f6"}}}}