{"action":"created","comment":{"url":"https://api.github.com/repos/lightbend/paradox/pulls/comments/90518084","pull_request_review_id":11037476,"id":90518084,"diff_hunk":"@@ -119,6 +122,36 @@ class ParadoxProcessor(reader: Reader = new Reader, writer: Writer = new Writer)\n   }\n \n   /**\n+   * Github links, rendered to just a HTML for the link.\n+   */\n+  case class GithubLink(location: Option[Location[Page]], page: Page, writer: Writer, context: Writer.Context) extends PageTemplate.Link {\n+    lazy val getHref: String = try {\n+      buildPath(PropertyUrl(\"github.base_url\", context.properties.get).base, \"/tree/master\", page.relativePath)","path":"core/src/main/scala/com/lightbend/paradox/ParadoxProcessor.scala","position":34,"original_position":34,"commit_id":"00d5d38e1606e0378c215f9014f22d8c2b6a0c33","original_commit_id":"00d5d38e1606e0378c215f9014f22d8c2b6a0c33","user":{"login":"jonas","id":8417,"avatar_url":"https://avatars.githubusercontent.com/u/8417?v=3","gravatar_id":"","url":"https://api.github.com/users/jonas","html_url":"https://github.com/jonas","followers_url":"https://api.github.com/users/jonas/followers","following_url":"https://api.github.com/users/jonas/following{/other_user}","gists_url":"https://api.github.com/users/jonas/gists{/gist_id}","starred_url":"https://api.github.com/users/jonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonas/subscriptions","organizations_url":"https://api.github.com/users/jonas/orgs","repos_url":"https://api.github.com/users/jonas/repos","events_url":"https://api.github.com/users/jonas/events{/privacy}","received_events_url":"https://api.github.com/users/jonas/received_events","type":"User","site_admin":false},"body":"`buildPath` should not be necessary at all if you call `resolve`\r\n\r\n```scala\r\nval TreeUrl = \"\"\"(.*github.com/[^/]+/[^/]+)/tree/[^/]+\"\"\".r\r\n\r\nlazy val getHref: String = try {\r\n  // We currently allow github.base_url to contain /tree/$branch\r\n  val baseUrl = PropertyUrl(\"github.base_url\", context.properties.get) collect {\r\n    case TreeUrl(url)    => url\r\n    case url                 => url\r\n  }\r\n\r\n  baseUrl / \"tree/master\" / page.relativePath\r\n} catch {\r\n  ...\r\n}\r\n```","created_at":"2016-12-01T19:25:42Z","updated_at":"2016-12-01T19:25:42Z","html_url":"https://github.com/lightbend/paradox/pull/69#discussion_r90518084","pull_request_url":"https://api.github.com/repos/lightbend/paradox/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/lightbend/paradox/pulls/comments/90518084"},"html":{"href":"https://github.com/lightbend/paradox/pull/69#discussion_r90518084"},"pull_request":{"href":"https://api.github.com/repos/lightbend/paradox/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/lightbend/paradox/pulls/69","id":96111687,"html_url":"https://github.com/lightbend/paradox/pull/69","diff_url":"https://github.com/lightbend/paradox/pull/69.diff","patch_url":"https://github.com/lightbend/paradox/pull/69.patch","issue_url":"https://api.github.com/repos/lightbend/paradox/issues/69","number":69,"state":"open","locked":false,"title":"Source url","user":{"login":"gsechaud","id":6824579,"avatar_url":"https://avatars.githubusercontent.com/u/6824579?v=3","gravatar_id":"","url":"https://api.github.com/users/gsechaud","html_url":"https://github.com/gsechaud","followers_url":"https://api.github.com/users/gsechaud/followers","following_url":"https://api.github.com/users/gsechaud/following{/other_user}","gists_url":"https://api.github.com/users/gsechaud/gists{/gist_id}","starred_url":"https://api.github.com/users/gsechaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsechaud/subscriptions","organizations_url":"https://api.github.com/users/gsechaud/orgs","repos_url":"https://api.github.com/users/gsechaud/repos","events_url":"https://api.github.com/users/gsechaud/events{/privacy}","received_events_url":"https://api.github.com/users/gsechaud/received_events","type":"User","site_admin":false},"body":"In relation with #68 \r\nResolve #57 \r\n\r\nCreate a template \"source.st\" containing the pieces of text necessary to display the github source url of the current markdown file:\r\n- If `github.base_url` is defined in the build: displays \"The source code for this page can be found here.\" (link for \"here\")\r\n- Otherwise: displays \"No associated source code found for this page.\"","created_at":"2016-12-01T15:37:16Z","updated_at":"2016-12-01T19:25:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c25072b583b7ac74d4fbea69de1e2905cccaac9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lightbend/paradox/pulls/69/commits","review_comments_url":"https://api.github.com/repos/lightbend/paradox/pulls/69/comments","review_comment_url":"https://api.github.com/repos/lightbend/paradox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lightbend/paradox/issues/69/comments","statuses_url":"https://api.github.com/repos/lightbend/paradox/statuses/00d5d38e1606e0378c215f9014f22d8c2b6a0c33","head":{"label":"gsechaud:sourceUrl","ref":"sourceUrl","sha":"00d5d38e1606e0378c215f9014f22d8c2b6a0c33","user":{"login":"gsechaud","id":6824579,"avatar_url":"https://avatars.githubusercontent.com/u/6824579?v=3","gravatar_id":"","url":"https://api.github.com/users/gsechaud","html_url":"https://github.com/gsechaud","followers_url":"https://api.github.com/users/gsechaud/followers","following_url":"https://api.github.com/users/gsechaud/following{/other_user}","gists_url":"https://api.github.com/users/gsechaud/gists{/gist_id}","starred_url":"https://api.github.com/users/gsechaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsechaud/subscriptions","organizations_url":"https://api.github.com/users/gsechaud/orgs","repos_url":"https://api.github.com/users/gsechaud/repos","events_url":"https://api.github.com/users/gsechaud/events{/privacy}","received_events_url":"https://api.github.com/users/gsechaud/received_events","type":"User","site_admin":false},"repo":{"id":72435462,"name":"paradox","full_name":"gsechaud/paradox","owner":{"login":"gsechaud","id":6824579,"avatar_url":"https://avatars.githubusercontent.com/u/6824579?v=3","gravatar_id":"","url":"https://api.github.com/users/gsechaud","html_url":"https://github.com/gsechaud","followers_url":"https://api.github.com/users/gsechaud/followers","following_url":"https://api.github.com/users/gsechaud/following{/other_user}","gists_url":"https://api.github.com/users/gsechaud/gists{/gist_id}","starred_url":"https://api.github.com/users/gsechaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsechaud/subscriptions","organizations_url":"https://api.github.com/users/gsechaud/orgs","repos_url":"https://api.github.com/users/gsechaud/repos","events_url":"https://api.github.com/users/gsechaud/events{/privacy}","received_events_url":"https://api.github.com/users/gsechaud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gsechaud/paradox","description":"Markdown documentation","fork":true,"url":"https://api.github.com/repos/gsechaud/paradox","forks_url":"https://api.github.com/repos/gsechaud/paradox/forks","keys_url":"https://api.github.com/repos/gsechaud/paradox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gsechaud/paradox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gsechaud/paradox/teams","hooks_url":"https://api.github.com/repos/gsechaud/paradox/hooks","issue_events_url":"https://api.github.com/repos/gsechaud/paradox/issues/events{/number}","events_url":"https://api.github.com/repos/gsechaud/paradox/events","assignees_url":"https://api.github.com/repos/gsechaud/paradox/assignees{/user}","branches_url":"https://api.github.com/repos/gsechaud/paradox/branches{/branch}","tags_url":"https://api.github.com/repos/gsechaud/paradox/tags","blobs_url":"https://api.github.com/repos/gsechaud/paradox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gsechaud/paradox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gsechaud/paradox/git/refs{/sha}","trees_url":"https://api.github.com/repos/gsechaud/paradox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gsechaud/paradox/statuses/{sha}","languages_url":"https://api.github.com/repos/gsechaud/paradox/languages","stargazers_url":"https://api.github.com/repos/gsechaud/paradox/stargazers","contributors_url":"https://api.github.com/repos/gsechaud/paradox/contributors","subscribers_url":"https://api.github.com/repos/gsechaud/paradox/subscribers","subscription_url":"https://api.github.com/repos/gsechaud/paradox/subscription","commits_url":"https://api.github.com/repos/gsechaud/paradox/commits{/sha}","git_commits_url":"https://api.github.com/repos/gsechaud/paradox/git/commits{/sha}","comments_url":"https://api.github.com/repos/gsechaud/paradox/comments{/number}","issue_comment_url":"https://api.github.com/repos/gsechaud/paradox/issues/comments{/number}","contents_url":"https://api.github.com/repos/gsechaud/paradox/contents/{+path}","compare_url":"https://api.github.com/repos/gsechaud/paradox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gsechaud/paradox/merges","archive_url":"https://api.github.com/repos/gsechaud/paradox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gsechaud/paradox/downloads","issues_url":"https://api.github.com/repos/gsechaud/paradox/issues{/number}","pulls_url":"https://api.github.com/repos/gsechaud/paradox/pulls{/number}","milestones_url":"https://api.github.com/repos/gsechaud/paradox/milestones{/number}","notifications_url":"https://api.github.com/repos/gsechaud/paradox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gsechaud/paradox/labels{/name}","releases_url":"https://api.github.com/repos/gsechaud/paradox/releases{/id}","deployments_url":"https://api.github.com/repos/gsechaud/paradox/deployments","created_at":"2016-10-31T12:45:10Z","updated_at":"2016-10-31T12:45:11Z","pushed_at":"2016-12-01T16:18:02Z","git_url":"git://github.com/gsechaud/paradox.git","ssh_url":"git@github.com:gsechaud/paradox.git","clone_url":"https://github.com/gsechaud/paradox.git","svn_url":"https://github.com/gsechaud/paradox","homepage":"http://developer.lightbend.com/docs/paradox/latest/","size":746,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lightbend:master","ref":"master","sha":"d41011665ff27ceb623ea02ac0b8674a88240e10","user":{"login":"lightbend","id":16247783,"avatar_url":"https://avatars.githubusercontent.com/u/16247783?v=3","gravatar_id":"","url":"https://api.github.com/users/lightbend","html_url":"https://github.com/lightbend","followers_url":"https://api.github.com/users/lightbend/followers","following_url":"https://api.github.com/users/lightbend/following{/other_user}","gists_url":"https://api.github.com/users/lightbend/gists{/gist_id}","starred_url":"https://api.github.com/users/lightbend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightbend/subscriptions","organizations_url":"https://api.github.com/users/lightbend/orgs","repos_url":"https://api.github.com/users/lightbend/repos","events_url":"https://api.github.com/users/lightbend/events{/privacy}","received_events_url":"https://api.github.com/users/lightbend/received_events","type":"Organization","site_admin":false},"repo":{"id":65568228,"name":"paradox","full_name":"lightbend/paradox","owner":{"login":"lightbend","id":16247783,"avatar_url":"https://avatars.githubusercontent.com/u/16247783?v=3","gravatar_id":"","url":"https://api.github.com/users/lightbend","html_url":"https://github.com/lightbend","followers_url":"https://api.github.com/users/lightbend/followers","following_url":"https://api.github.com/users/lightbend/following{/other_user}","gists_url":"https://api.github.com/users/lightbend/gists{/gist_id}","starred_url":"https://api.github.com/users/lightbend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightbend/subscriptions","organizations_url":"https://api.github.com/users/lightbend/orgs","repos_url":"https://api.github.com/users/lightbend/repos","events_url":"https://api.github.com/users/lightbend/events{/privacy}","received_events_url":"https://api.github.com/users/lightbend/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lightbend/paradox","description":"Markdown documentation","fork":false,"url":"https://api.github.com/repos/lightbend/paradox","forks_url":"https://api.github.com/repos/lightbend/paradox/forks","keys_url":"https://api.github.com/repos/lightbend/paradox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lightbend/paradox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lightbend/paradox/teams","hooks_url":"https://api.github.com/repos/lightbend/paradox/hooks","issue_events_url":"https://api.github.com/repos/lightbend/paradox/issues/events{/number}","events_url":"https://api.github.com/repos/lightbend/paradox/events","assignees_url":"https://api.github.com/repos/lightbend/paradox/assignees{/user}","branches_url":"https://api.github.com/repos/lightbend/paradox/branches{/branch}","tags_url":"https://api.github.com/repos/lightbend/paradox/tags","blobs_url":"https://api.github.com/repos/lightbend/paradox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lightbend/paradox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lightbend/paradox/git/refs{/sha}","trees_url":"https://api.github.com/repos/lightbend/paradox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lightbend/paradox/statuses/{sha}","languages_url":"https://api.github.com/repos/lightbend/paradox/languages","stargazers_url":"https://api.github.com/repos/lightbend/paradox/stargazers","contributors_url":"https://api.github.com/repos/lightbend/paradox/contributors","subscribers_url":"https://api.github.com/repos/lightbend/paradox/subscribers","subscription_url":"https://api.github.com/repos/lightbend/paradox/subscription","commits_url":"https://api.github.com/repos/lightbend/paradox/commits{/sha}","git_commits_url":"https://api.github.com/repos/lightbend/paradox/git/commits{/sha}","comments_url":"https://api.github.com/repos/lightbend/paradox/comments{/number}","issue_comment_url":"https://api.github.com/repos/lightbend/paradox/issues/comments{/number}","contents_url":"https://api.github.com/repos/lightbend/paradox/contents/{+path}","compare_url":"https://api.github.com/repos/lightbend/paradox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lightbend/paradox/merges","archive_url":"https://api.github.com/repos/lightbend/paradox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lightbend/paradox/downloads","issues_url":"https://api.github.com/repos/lightbend/paradox/issues{/number}","pulls_url":"https://api.github.com/repos/lightbend/paradox/pulls{/number}","milestones_url":"https://api.github.com/repos/lightbend/paradox/milestones{/number}","notifications_url":"https://api.github.com/repos/lightbend/paradox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lightbend/paradox/labels{/name}","releases_url":"https://api.github.com/repos/lightbend/paradox/releases{/id}","deployments_url":"https://api.github.com/repos/lightbend/paradox/deployments","created_at":"2016-08-12T16:35:03Z","updated_at":"2016-12-01T17:51:00Z","pushed_at":"2016-12-01T16:18:03Z","git_url":"git://github.com/lightbend/paradox.git","ssh_url":"git@github.com:lightbend/paradox.git","clone_url":"https://github.com/lightbend/paradox.git","svn_url":"https://github.com/lightbend/paradox","homepage":"http://developer.lightbend.com/docs/paradox/latest/","size":735,"stargazers_count":74,"watchers_count":74,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":18,"forks":13,"open_issues":18,"watchers":74,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lightbend/paradox/pulls/69"},"html":{"href":"https://github.com/lightbend/paradox/pull/69"},"issue":{"href":"https://api.github.com/repos/lightbend/paradox/issues/69"},"comments":{"href":"https://api.github.com/repos/lightbend/paradox/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/lightbend/paradox/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/lightbend/paradox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lightbend/paradox/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/lightbend/paradox/statuses/00d5d38e1606e0378c215f9014f22d8c2b6a0c33"}}}}
{"actor":{"display_login":"jonas"}}