{"action":"created","comment":{"url":"https://api.github.com/repos/r-lib/pkgdown/pulls/comments/177229668","pull_request_review_id":107067237,"id":177229668,"diff_hunk":"@@ -101,3 +101,16 @@ test_that(\"or local sites, if registered\", {\n   scoped_package_context(\"pkgdown\", local_packages = c(\"digest\" = \"digest\"))\n   expect_equal(href_expr_(vignette(\"sha1\", \"digest\")), \"digest/articles/sha1.html\")\n })\n+\n+test_that(\"github_source linking\", {\n+  base <- \"https://github.com/r-lib/pkgdown\"\n+  expect_silent(","path":"tests/testthat/test-href.R","position":7,"original_position":7,"commit_id":"22d61325e679f68ed6174303a4fdeb7649f8e1e4","original_commit_id":"22d61325e679f68ed6174303a4fdeb7649f8e1e4","user":{"login":"nealrichardson","id":2975928,"avatar_url":"https://avatars0.githubusercontent.com/u/2975928?v=4","gravatar_id":"","url":"https://api.github.com/users/nealrichardson","html_url":"https://github.com/nealrichardson","followers_url":"https://api.github.com/users/nealrichardson/followers","following_url":"https://api.github.com/users/nealrichardson/following{/other_user}","gists_url":"https://api.github.com/users/nealrichardson/gists{/gist_id}","starred_url":"https://api.github.com/users/nealrichardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealrichardson/subscriptions","organizations_url":"https://api.github.com/users/nealrichardson/orgs","repos_url":"https://api.github.com/users/nealrichardson/repos","events_url":"https://api.github.com/users/nealrichardson/events{/privacy}","received_events_url":"https://api.github.com/users/nealrichardson/received_events","type":"User","site_admin":false},"body":"Sure; this was part of my failing test because the initial symptom of the issue was a `warning`.","created_at":"2018-03-26T20:48:40Z","updated_at":"2018-03-26T20:48:41Z","html_url":"https://github.com/r-lib/pkgdown/pull/592#discussion_r177229668","pull_request_url":"https://api.github.com/repos/r-lib/pkgdown/pulls/592","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/r-lib/pkgdown/pulls/comments/177229668"},"html":{"href":"https://github.com/r-lib/pkgdown/pull/592#discussion_r177229668"},"pull_request":{"href":"https://api.github.com/repos/r-lib/pkgdown/pulls/592"}},"in_reply_to_id":177106716},"pull_request":{"url":"https://api.github.com/repos/r-lib/pkgdown/pulls/592","id":177263483,"html_url":"https://github.com/r-lib/pkgdown/pull/592","diff_url":"https://github.com/r-lib/pkgdown/pull/592.diff","patch_url":"https://github.com/r-lib/pkgdown/pull/592.patch","issue_url":"https://api.github.com/repos/r-lib/pkgdown/issues/592","number":592,"state":"open","locked":false,"title":"Fix warnings from github_source()","user":{"login":"nealrichardson","id":2975928,"avatar_url":"https://avatars0.githubusercontent.com/u/2975928?v=4","gravatar_id":"","url":"https://api.github.com/users/nealrichardson","html_url":"https://github.com/nealrichardson","followers_url":"https://api.github.com/users/nealrichardson/followers","following_url":"https://api.github.com/users/nealrichardson/following{/other_user}","gists_url":"https://api.github.com/users/nealrichardson/gists{/gist_id}","starred_url":"https://api.github.com/users/nealrichardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealrichardson/subscriptions","organizations_url":"https://api.github.com/users/nealrichardson/orgs","repos_url":"https://api.github.com/users/nealrichardson/repos","events_url":"https://api.github.com/users/nealrichardson/events{/privacy}","received_events_url":"https://api.github.com/users/nealrichardson/received_events","type":"User","site_admin":false},"body":"Rebuilding one of my sites with the latest `pkgdown` code, I noticed some warnings like this:\r\n\r\n```\r\nReading 'man/teams.Rd'\r\nWarning in if (grepl(\"^https?://\", path)) { :\r\n  the condition has length > 1 and only the first element will be used\r\n```\r\n\r\nI tracked it down to `github_source()`, which based on its logic and function signature, expected only a single `path` passed to it, while the function that calls it passes in `paths`. The condition that triggered the warning was when an .Rd file was created by roxygen from multiple .R files. \r\n\r\nThis patch vectorizes `github_source` so that the logic is correct and no warnings are emitted. ","created_at":"2018-03-24T23:08:25Z","updated_at":"2018-03-26T20:48:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8f2de4c156c527d107440d0757280628955b6f6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/r-lib/pkgdown/pulls/592/commits","review_comments_url":"https://api.github.com/repos/r-lib/pkgdown/pulls/592/comments","review_comment_url":"https://api.github.com/repos/r-lib/pkgdown/pulls/comments{/number}","comments_url":"https://api.github.com/repos/r-lib/pkgdown/issues/592/comments","statuses_url":"https://api.github.com/repos/r-lib/pkgdown/statuses/22d61325e679f68ed6174303a4fdeb7649f8e1e4","head":{"label":"nealrichardson:github-source-links","ref":"github-source-links","sha":"22d61325e679f68ed6174303a4fdeb7649f8e1e4","user":{"login":"nealrichardson","id":2975928,"avatar_url":"https://avatars0.githubusercontent.com/u/2975928?v=4","gravatar_id":"","url":"https://api.github.com/users/nealrichardson","html_url":"https://github.com/nealrichardson","followers_url":"https://api.github.com/users/nealrichardson/followers","following_url":"https://api.github.com/users/nealrichardson/following{/other_user}","gists_url":"https://api.github.com/users/nealrichardson/gists{/gist_id}","starred_url":"https://api.github.com/users/nealrichardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealrichardson/subscriptions","organizations_url":"https://api.github.com/users/nealrichardson/orgs","repos_url":"https://api.github.com/users/nealrichardson/repos","events_url":"https://api.github.com/users/nealrichardson/events{/privacy}","received_events_url":"https://api.github.com/users/nealrichardson/received_events","type":"User","site_admin":false},"repo":{"id":102560225,"name":"pkgdown","full_name":"nealrichardson/pkgdown","owner":{"login":"nealrichardson","id":2975928,"avatar_url":"https://avatars0.githubusercontent.com/u/2975928?v=4","gravatar_id":"","url":"https://api.github.com/users/nealrichardson","html_url":"https://github.com/nealrichardson","followers_url":"https://api.github.com/users/nealrichardson/followers","following_url":"https://api.github.com/users/nealrichardson/following{/other_user}","gists_url":"https://api.github.com/users/nealrichardson/gists{/gist_id}","starred_url":"https://api.github.com/users/nealrichardson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nealrichardson/subscriptions","organizations_url":"https://api.github.com/users/nealrichardson/orgs","repos_url":"https://api.github.com/users/nealrichardson/repos","events_url":"https://api.github.com/users/nealrichardson/events{/privacy}","received_events_url":"https://api.github.com/users/nealrichardson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nealrichardson/pkgdown","description":"Generate static html documentation for an R package","fork":true,"url":"https://api.github.com/repos/nealrichardson/pkgdown","forks_url":"https://api.github.com/repos/nealrichardson/pkgdown/forks","keys_url":"https://api.github.com/repos/nealrichardson/pkgdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nealrichardson/pkgdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nealrichardson/pkgdown/teams","hooks_url":"https://api.github.com/repos/nealrichardson/pkgdown/hooks","issue_events_url":"https://api.github.com/repos/nealrichardson/pkgdown/issues/events{/number}","events_url":"https://api.github.com/repos/nealrichardson/pkgdown/events","assignees_url":"https://api.github.com/repos/nealrichardson/pkgdown/assignees{/user}","branches_url":"https://api.github.com/repos/nealrichardson/pkgdown/branches{/branch}","tags_url":"https://api.github.com/repos/nealrichardson/pkgdown/tags","blobs_url":"https://api.github.com/repos/nealrichardson/pkgdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nealrichardson/pkgdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nealrichardson/pkgdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/nealrichardson/pkgdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nealrichardson/pkgdown/statuses/{sha}","languages_url":"https://api.github.com/repos/nealrichardson/pkgdown/languages","stargazers_url":"https://api.github.com/repos/nealrichardson/pkgdown/stargazers","contributors_url":"https://api.github.com/repos/nealrichardson/pkgdown/contributors","subscribers_url":"https://api.github.com/repos/nealrichardson/pkgdown/subscribers","subscription_url":"https://api.github.com/repos/nealrichardson/pkgdown/subscription","commits_url":"https://api.github.com/repos/nealrichardson/pkgdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/nealrichardson/pkgdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/nealrichardson/pkgdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/nealrichardson/pkgdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/nealrichardson/pkgdown/contents/{+path}","compare_url":"https://api.github.com/repos/nealrichardson/pkgdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nealrichardson/pkgdown/merges","archive_url":"https://api.github.com/repos/nealrichardson/pkgdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nealrichardson/pkgdown/downloads","issues_url":"https://api.github.com/repos/nealrichardson/pkgdown/issues{/number}","pulls_url":"https://api.github.com/repos/nealrichardson/pkgdown/pulls{/number}","milestones_url":"https://api.github.com/repos/nealrichardson/pkgdown/milestones{/number}","notifications_url":"https://api.github.com/repos/nealrichardson/pkgdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nealrichardson/pkgdown/labels{/name}","releases_url":"https://api.github.com/repos/nealrichardson/pkgdown/releases{/id}","deployments_url":"https://api.github.com/repos/nealrichardson/pkgdown/deployments","created_at":"2017-09-06T03:51:22Z","updated_at":"2018-03-24T22:45:35Z","pushed_at":"2018-03-24T22:59:52Z","git_url":"git://github.com/nealrichardson/pkgdown.git","ssh_url":"git@github.com:nealrichardson/pkgdown.git","clone_url":"https://github.com/nealrichardson/pkgdown.git","svn_url":"https://github.com/nealrichardson/pkgdown","homepage":"http://hadley.github.io/pkgdown","size":1865,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"r-lib:master","ref":"master","sha":"5e4825875751c009444c56ce43d06324ec53e910","user":{"login":"r-lib","id":22618716,"avatar_url":"https://avatars0.githubusercontent.com/u/22618716?v=4","gravatar_id":"","url":"https://api.github.com/users/r-lib","html_url":"https://github.com/r-lib","followers_url":"https://api.github.com/users/r-lib/followers","following_url":"https://api.github.com/users/r-lib/following{/other_user}","gists_url":"https://api.github.com/users/r-lib/gists{/gist_id}","starred_url":"https://api.github.com/users/r-lib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-lib/subscriptions","organizations_url":"https://api.github.com/users/r-lib/orgs","repos_url":"https://api.github.com/users/r-lib/repos","events_url":"https://api.github.com/users/r-lib/events{/privacy}","received_events_url":"https://api.github.com/users/r-lib/received_events","type":"Organization","site_admin":false},"repo":{"id":3723845,"name":"pkgdown","full_name":"r-lib/pkgdown","owner":{"login":"r-lib","id":22618716,"avatar_url":"https://avatars0.githubusercontent.com/u/22618716?v=4","gravatar_id":"","url":"https://api.github.com/users/r-lib","html_url":"https://github.com/r-lib","followers_url":"https://api.github.com/users/r-lib/followers","following_url":"https://api.github.com/users/r-lib/following{/other_user}","gists_url":"https://api.github.com/users/r-lib/gists{/gist_id}","starred_url":"https://api.github.com/users/r-lib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-lib/subscriptions","organizations_url":"https://api.github.com/users/r-lib/orgs","repos_url":"https://api.github.com/users/r-lib/repos","events_url":"https://api.github.com/users/r-lib/events{/privacy}","received_events_url":"https://api.github.com/users/r-lib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/r-lib/pkgdown","description":"Generate static html documentation for an R package","fork":false,"url":"https://api.github.com/repos/r-lib/pkgdown","forks_url":"https://api.github.com/repos/r-lib/pkgdown/forks","keys_url":"https://api.github.com/repos/r-lib/pkgdown/keys{/key_id}","collaborators_url":"https://api.github.com/repos/r-lib/pkgdown/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/r-lib/pkgdown/teams","hooks_url":"https://api.github.com/repos/r-lib/pkgdown/hooks","issue_events_url":"https://api.github.com/repos/r-lib/pkgdown/issues/events{/number}","events_url":"https://api.github.com/repos/r-lib/pkgdown/events","assignees_url":"https://api.github.com/repos/r-lib/pkgdown/assignees{/user}","branches_url":"https://api.github.com/repos/r-lib/pkgdown/branches{/branch}","tags_url":"https://api.github.com/repos/r-lib/pkgdown/tags","blobs_url":"https://api.github.com/repos/r-lib/pkgdown/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/r-lib/pkgdown/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/r-lib/pkgdown/git/refs{/sha}","trees_url":"https://api.github.com/repos/r-lib/pkgdown/git/trees{/sha}","statuses_url":"https://api.github.com/repos/r-lib/pkgdown/statuses/{sha}","languages_url":"https://api.github.com/repos/r-lib/pkgdown/languages","stargazers_url":"https://api.github.com/repos/r-lib/pkgdown/stargazers","contributors_url":"https://api.github.com/repos/r-lib/pkgdown/contributors","subscribers_url":"https://api.github.com/repos/r-lib/pkgdown/subscribers","subscription_url":"https://api.github.com/repos/r-lib/pkgdown/subscription","commits_url":"https://api.github.com/repos/r-lib/pkgdown/commits{/sha}","git_commits_url":"https://api.github.com/repos/r-lib/pkgdown/git/commits{/sha}","comments_url":"https://api.github.com/repos/r-lib/pkgdown/comments{/number}","issue_comment_url":"https://api.github.com/repos/r-lib/pkgdown/issues/comments{/number}","contents_url":"https://api.github.com/repos/r-lib/pkgdown/contents/{+path}","compare_url":"https://api.github.com/repos/r-lib/pkgdown/compare/{base}...{head}","merges_url":"https://api.github.com/repos/r-lib/pkgdown/merges","archive_url":"https://api.github.com/repos/r-lib/pkgdown/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/r-lib/pkgdown/downloads","issues_url":"https://api.github.com/repos/r-lib/pkgdown/issues{/number}","pulls_url":"https://api.github.com/repos/r-lib/pkgdown/pulls{/number}","milestones_url":"https://api.github.com/repos/r-lib/pkgdown/milestones{/number}","notifications_url":"https://api.github.com/repos/r-lib/pkgdown/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/r-lib/pkgdown/labels{/name}","releases_url":"https://api.github.com/repos/r-lib/pkgdown/releases{/id}","deployments_url":"https://api.github.com/repos/r-lib/pkgdown/deployments","created_at":"2012-03-15T00:36:24Z","updated_at":"2018-03-26T15:39:37Z","pushed_at":"2018-03-26T18:48:33Z","git_url":"git://github.com/r-lib/pkgdown.git","ssh_url":"git@github.com:r-lib/pkgdown.git","clone_url":"https://github.com/r-lib/pkgdown.git","svn_url":"https://github.com/r-lib/pkgdown","homepage":"http://pkgdown.r-lib.org","size":1834,"stargazers_count":303,"watchers_count":303,"language":"R","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":158,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":158,"open_issues":17,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/r-lib/pkgdown/pulls/592"},"html":{"href":"https://github.com/r-lib/pkgdown/pull/592"},"issue":{"href":"https://api.github.com/repos/r-lib/pkgdown/issues/592"},"comments":{"href":"https://api.github.com/repos/r-lib/pkgdown/issues/592/comments"},"review_comments":{"href":"https://api.github.com/repos/r-lib/pkgdown/pulls/592/comments"},"review_comment":{"href":"https://api.github.com/repos/r-lib/pkgdown/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/r-lib/pkgdown/pulls/592/commits"},"statuses":{"href":"https://api.github.com/repos/r-lib/pkgdown/statuses/22d61325e679f68ed6174303a4fdeb7649f8e1e4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nealrichardson"}}