{"action":"created","comment":{"url":"https://api.github.com/repos/hadley/devtools/pulls/comments/37190225","id":37190225,"diff_hunk":"@@ -8,7 +8,9 @@ github_auth <- function(token) {\n \n github_response <- function(req) {\n   text <- httr::content(req, as = \"text\")\n-  parsed <- jsonlite::fromJSON(text, simplifyVector = FALSE)\n+  parsed <-\n+    if (identical(text, '')) text else","path":"R/github.R","position":6,"original_position":6,"commit_id":"aaa01a37714e189bb23d1a9bdc8f8c34ede5f1f7","original_commit_id":"aaa01a37714e189bb23d1a9bdc8f8c34ede5f1f7","user":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"body":"This doesn't seem like the right test to me. I think it `httr::has_content()` on `req` would be better. (I presume this was added to handle the delete repo case)","created_at":"2015-08-17T14:05:11Z","updated_at":"2015-08-17T14:05:11Z","html_url":"https://github.com/hadley/devtools/pull/896#discussion_r37190225","pull_request_url":"https://api.github.com/repos/hadley/devtools/pulls/896","_links":{"self":{"href":"https://api.github.com/repos/hadley/devtools/pulls/comments/37190225"},"html":{"href":"https://github.com/hadley/devtools/pull/896#discussion_r37190225"},"pull_request":{"href":"https://api.github.com/repos/hadley/devtools/pulls/896"}}},"pull_request":{"url":"https://api.github.com/repos/hadley/devtools/pulls/896","id":42558599,"html_url":"https://github.com/hadley/devtools/pull/896","diff_url":"https://github.com/hadley/devtools/pull/896.diff","patch_url":"https://github.com/hadley/devtools/pull/896.patch","issue_url":"https://api.github.com/repos/hadley/devtools/issues/896","number":896,"state":"open","locked":false,"title":"Extend github functionality","user":{"login":"jennybc","id":599454,"avatar_url":"https://avatars.githubusercontent.com/u/599454?v=3","gravatar_id":"","url":"https://api.github.com/users/jennybc","html_url":"https://github.com/jennybc","followers_url":"https://api.github.com/users/jennybc/followers","following_url":"https://api.github.com/users/jennybc/following{/other_user}","gists_url":"https://api.github.com/users/jennybc/gists{/gist_id}","starred_url":"https://api.github.com/users/jennybc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennybc/subscriptions","organizations_url":"https://api.github.com/users/jennybc/orgs","repos_url":"https://api.github.com/users/jennybc/repos","events_url":"https://api.github.com/users/jennybc/events{/privacy}","received_events_url":"https://api.github.com/users/jennybc/received_events","type":"User","site_admin":false},"body":"This PR works on #642 and adds a few other bits re: GitHub. It is a just a test balloon. If you think this looks promising, I will refine further and add tests for everything I can (but much of this requires auth).\r\n\r\n  * Adds unexported function uses_github() to create an explicit test for use in other functions. Previously, github usage was assessed by looking for a remote named \"origin\". Now the test is this: is there at least one remote with a URL that contains \"github\"? It is possible there should also be a requirement re: branch name and/or existence of a remote tracking branch.\r\n\r\n  * Existing unexported function `github_info()` becomes more flexible about the name of the github remote. \"origin\" is still the top choice, with \"github\" and \"upstream\" being accepted alternatives, in that order.\r\n\r\n  * Adds unexported function to delete a github repo. This was simply handy for development and informal testing.\r\n\r\n  * Extends `use_github()` to support https protocol, in addition to ssh.\r\n\r\n  * Extends `use_github()` to push the repo to GitHub and set a remote tracking branch. CAVEAT: I have not personally tested this with ssh -- only with https.\r\n\r\n  * Adds exported function `use_github_links()` that populates URL and BugReports fields of DESCRIPTION with the correct GitHub links. It is called from `use_github()`.","created_at":"2015-08-17T06:52:51Z","updated_at":"2015-08-17T14:05:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54f44e9ecd322c20bec43faf854570f67bc25ec6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hadley/devtools/pulls/896/commits","review_comments_url":"https://api.github.com/repos/hadley/devtools/pulls/896/comments","review_comment_url":"https://api.github.com/repos/hadley/devtools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hadley/devtools/issues/896/comments","statuses_url":"https://api.github.com/repos/hadley/devtools/statuses/aaa01a37714e189bb23d1a9bdc8f8c34ede5f1f7","head":{"label":"jennybc:github-functionality","ref":"github-functionality","sha":"aaa01a37714e189bb23d1a9bdc8f8c34ede5f1f7","user":{"login":"jennybc","id":599454,"avatar_url":"https://avatars.githubusercontent.com/u/599454?v=3","gravatar_id":"","url":"https://api.github.com/users/jennybc","html_url":"https://github.com/jennybc","followers_url":"https://api.github.com/users/jennybc/followers","following_url":"https://api.github.com/users/jennybc/following{/other_user}","gists_url":"https://api.github.com/users/jennybc/gists{/gist_id}","starred_url":"https://api.github.com/users/jennybc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennybc/subscriptions","organizations_url":"https://api.github.com/users/jennybc/orgs","repos_url":"https://api.github.com/users/jennybc/repos","events_url":"https://api.github.com/users/jennybc/events{/privacy}","received_events_url":"https://api.github.com/users/jennybc/received_events","type":"User","site_admin":false},"repo":{"id":40727345,"name":"devtools","full_name":"jennybc/devtools","owner":{"login":"jennybc","id":599454,"avatar_url":"https://avatars.githubusercontent.com/u/599454?v=3","gravatar_id":"","url":"https://api.github.com/users/jennybc","html_url":"https://github.com/jennybc","followers_url":"https://api.github.com/users/jennybc/followers","following_url":"https://api.github.com/users/jennybc/following{/other_user}","gists_url":"https://api.github.com/users/jennybc/gists{/gist_id}","starred_url":"https://api.github.com/users/jennybc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennybc/subscriptions","organizations_url":"https://api.github.com/users/jennybc/orgs","repos_url":"https://api.github.com/users/jennybc/repos","events_url":"https://api.github.com/users/jennybc/events{/privacy}","received_events_url":"https://api.github.com/users/jennybc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jennybc/devtools","description":"Tools to make an R developer's life easier","fork":true,"url":"https://api.github.com/repos/jennybc/devtools","forks_url":"https://api.github.com/repos/jennybc/devtools/forks","keys_url":"https://api.github.com/repos/jennybc/devtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jennybc/devtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jennybc/devtools/teams","hooks_url":"https://api.github.com/repos/jennybc/devtools/hooks","issue_events_url":"https://api.github.com/repos/jennybc/devtools/issues/events{/number}","events_url":"https://api.github.com/repos/jennybc/devtools/events","assignees_url":"https://api.github.com/repos/jennybc/devtools/assignees{/user}","branches_url":"https://api.github.com/repos/jennybc/devtools/branches{/branch}","tags_url":"https://api.github.com/repos/jennybc/devtools/tags","blobs_url":"https://api.github.com/repos/jennybc/devtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jennybc/devtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jennybc/devtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/jennybc/devtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jennybc/devtools/statuses/{sha}","languages_url":"https://api.github.com/repos/jennybc/devtools/languages","stargazers_url":"https://api.github.com/repos/jennybc/devtools/stargazers","contributors_url":"https://api.github.com/repos/jennybc/devtools/contributors","subscribers_url":"https://api.github.com/repos/jennybc/devtools/subscribers","subscription_url":"https://api.github.com/repos/jennybc/devtools/subscription","commits_url":"https://api.github.com/repos/jennybc/devtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/jennybc/devtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/jennybc/devtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/jennybc/devtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/jennybc/devtools/contents/{+path}","compare_url":"https://api.github.com/repos/jennybc/devtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jennybc/devtools/merges","archive_url":"https://api.github.com/repos/jennybc/devtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jennybc/devtools/downloads","issues_url":"https://api.github.com/repos/jennybc/devtools/issues{/number}","pulls_url":"https://api.github.com/repos/jennybc/devtools/pulls{/number}","milestones_url":"https://api.github.com/repos/jennybc/devtools/milestones{/number}","notifications_url":"https://api.github.com/repos/jennybc/devtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jennybc/devtools/labels{/name}","releases_url":"https://api.github.com/repos/jennybc/devtools/releases{/id}","created_at":"2015-08-14T17:23:33Z","updated_at":"2015-08-14T17:23:34Z","pushed_at":"2015-08-17T06:20:59Z","git_url":"git://github.com/jennybc/devtools.git","ssh_url":"git@github.com:jennybc/devtools.git","clone_url":"https://github.com/jennybc/devtools.git","svn_url":"https://github.com/jennybc/devtools","homepage":"","size":8761,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hadley:master","ref":"master","sha":"2881db5e6d9a7c41f42a2a9f840d80e681b9ebe0","user":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"repo":{"id":643909,"name":"devtools","full_name":"hadley/devtools","owner":{"login":"hadley","id":4196,"avatar_url":"https://avatars.githubusercontent.com/u/4196?v=3","gravatar_id":"","url":"https://api.github.com/users/hadley","html_url":"https://github.com/hadley","followers_url":"https://api.github.com/users/hadley/followers","following_url":"https://api.github.com/users/hadley/following{/other_user}","gists_url":"https://api.github.com/users/hadley/gists{/gist_id}","starred_url":"https://api.github.com/users/hadley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadley/subscriptions","organizations_url":"https://api.github.com/users/hadley/orgs","repos_url":"https://api.github.com/users/hadley/repos","events_url":"https://api.github.com/users/hadley/events{/privacy}","received_events_url":"https://api.github.com/users/hadley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hadley/devtools","description":"Tools to make an R developer's life easier","fork":false,"url":"https://api.github.com/repos/hadley/devtools","forks_url":"https://api.github.com/repos/hadley/devtools/forks","keys_url":"https://api.github.com/repos/hadley/devtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hadley/devtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hadley/devtools/teams","hooks_url":"https://api.github.com/repos/hadley/devtools/hooks","issue_events_url":"https://api.github.com/repos/hadley/devtools/issues/events{/number}","events_url":"https://api.github.com/repos/hadley/devtools/events","assignees_url":"https://api.github.com/repos/hadley/devtools/assignees{/user}","branches_url":"https://api.github.com/repos/hadley/devtools/branches{/branch}","tags_url":"https://api.github.com/repos/hadley/devtools/tags","blobs_url":"https://api.github.com/repos/hadley/devtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hadley/devtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hadley/devtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/hadley/devtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hadley/devtools/statuses/{sha}","languages_url":"https://api.github.com/repos/hadley/devtools/languages","stargazers_url":"https://api.github.com/repos/hadley/devtools/stargazers","contributors_url":"https://api.github.com/repos/hadley/devtools/contributors","subscribers_url":"https://api.github.com/repos/hadley/devtools/subscribers","subscription_url":"https://api.github.com/repos/hadley/devtools/subscription","commits_url":"https://api.github.com/repos/hadley/devtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/hadley/devtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/hadley/devtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/hadley/devtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/hadley/devtools/contents/{+path}","compare_url":"https://api.github.com/repos/hadley/devtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hadley/devtools/merges","archive_url":"https://api.github.com/repos/hadley/devtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hadley/devtools/downloads","issues_url":"https://api.github.com/repos/hadley/devtools/issues{/number}","pulls_url":"https://api.github.com/repos/hadley/devtools/pulls{/number}","milestones_url":"https://api.github.com/repos/hadley/devtools/milestones{/number}","notifications_url":"https://api.github.com/repos/hadley/devtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hadley/devtools/labels{/name}","releases_url":"https://api.github.com/repos/hadley/devtools/releases{/id}","created_at":"2010-05-03T04:08:49Z","updated_at":"2015-08-14T19:51:41Z","pushed_at":"2015-08-17T06:52:52Z","git_url":"git://github.com/hadley/devtools.git","ssh_url":"git@github.com:hadley/devtools.git","clone_url":"https://github.com/hadley/devtools.git","svn_url":"https://github.com/hadley/devtools","homepage":"","size":8761,"stargazers_count":1084,"watchers_count":1084,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":325,"mirror_url":null,"open_issues_count":43,"forks":325,"open_issues":43,"watchers":1084,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hadley/devtools/pulls/896"},"html":{"href":"https://github.com/hadley/devtools/pull/896"},"issue":{"href":"https://api.github.com/repos/hadley/devtools/issues/896"},"comments":{"href":"https://api.github.com/repos/hadley/devtools/issues/896/comments"},"review_comments":{"href":"https://api.github.com/repos/hadley/devtools/pulls/896/comments"},"review_comment":{"href":"https://api.github.com/repos/hadley/devtools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hadley/devtools/pulls/896/commits"},"statuses":{"href":"https://api.github.com/repos/hadley/devtools/statuses/aaa01a37714e189bb23d1a9bdc8f8c34ede5f1f7"}}}}