{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/238476773","pull_request_review_id":181022149,"id":238476773,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODQ3Njc3Mw==","diff_hunk":"@@ -78,6 +80,21 @@ function createChannelRegex(meta: ?MarkdownMeta): ?RegExp {\n   return new RegExp(`^#(${meta.mentionsChannelName.keySeq().join('|')})\\\\b`)\n }\n \n+function createKbfsPathRegex(): ?RegExp {\n+  const username = `([a-zA-Z0-9]+_?)+` // from go/kbun/username.go\n+  const usernames = `${username}(,${username})*`\n+  const teamName = `${username}(\\\\.${username})*`\n+  const tlfType = `/(private|public|team)`\n+  const tlf = `/((private|public)/${usernames}(#${usernames})?|team/${teamName})`\n+  const inTlf = `/(\\\\S|\\\\\\\\\\\\\\\\|\\\\\\\\ )*[^/\\\\s]+` // don't include any trailing slash\n+  return new RegExp(`^/keybase((${tlf}(${inTlf})?)|(${tlfType}))?`)\n+}\n+\n+const kbfsPathRegex = createKbfsPathRegex()","path":"shared/common-adapters/markdown/shared.js","position":23,"original_position":23,"commit_id":"f3e5ec8c3778dc7690f603c20ab5f5949cfb46eb","original_commit_id":"f3e5ec8c3778dc7690f603c20ab5f5949cfb46eb","user":{"login":"MarcoPolo","id":594035,"node_id":"MDQ6VXNlcjU5NDAzNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/594035?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoPolo","html_url":"https://github.com/MarcoPolo","followers_url":"https://api.github.com/users/MarcoPolo/followers","following_url":"https://api.github.com/users/MarcoPolo/following{/other_user}","gists_url":"https://api.github.com/users/MarcoPolo/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoPolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoPolo/subscriptions","organizations_url":"https://api.github.com/users/MarcoPolo/orgs","repos_url":"https://api.github.com/users/MarcoPolo/repos","events_url":"https://api.github.com/users/MarcoPolo/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoPolo/received_events","type":"User","site_admin":false},"body":"(See comment below)","created_at":"2018-12-03T23:18:22Z","updated_at":"2018-12-03T23:37:33Z","html_url":"https://github.com/keybase/client/pull/14876#discussion_r238476773","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/14876","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/238476773"},"html":{"href":"https://github.com/keybase/client/pull/14876#discussion_r238476773"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/14876"}},"in_reply_to_id":238476729},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/14876","id":234880521,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0ODgwNTIx","html_url":"https://github.com/keybase/client/pull/14876","diff_url":"https://github.com/keybase/client/pull/14876.diff","patch_url":"https://github.com/keybase/client/pull/14876.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/14876","number":14876,"state":"open","locked":false,"title":"linkify KBFS paths in chat messages and info-panel","user":{"login":"songgao","id":255797,"node_id":"MDQ6VXNlcjI1NTc5Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/255797?v=4","gravatar_id":"","url":"https://api.github.com/users/songgao","html_url":"https://github.com/songgao","followers_url":"https://api.github.com/users/songgao/followers","following_url":"https://api.github.com/users/songgao/following{/other_user}","gists_url":"https://api.github.com/users/songgao/gists{/gist_id}","starred_url":"https://api.github.com/users/songgao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songgao/subscriptions","organizations_url":"https://api.github.com/users/songgao/orgs","repos_url":"https://api.github.com/users/songgao/repos","events_url":"https://api.github.com/users/songgao/events{/privacy}","received_events_url":"https://api.github.com/users/songgao/received_events","type":"User","site_admin":false},"body":"* extend MarcoDown to capture KBFS paths if `onOpenInFilesTab` is provided in `meta`\r\n* add a HOC to provide `onOpenInFilesTab`, as it's used more than once\r\n* linkify KBFS paths in chate messages\r\n* linkify KBFS paths in info-panels of big team channels\r\n\r\nWorks on both desktop and mobile, but back button doesn't work intuitively yet. I've created [KBFS-3654](https://keybase.atlassian.net/browse/KBFS-3654) to track it.\r\n\r\nFrom storybook, to show how KBFS paths are matched: \r\n\r\n<img width=\"336\" alt=\"screen shot 2018-11-30 at 3 48 35 pm\" src=\"https://user-images.githubusercontent.com/255797/49320612-6f66ca00-f4b7-11e8-9c4a-fa3196acf120.png\">\r\n","created_at":"2018-11-30T06:00:35Z","updated_at":"2018-12-03T23:37:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7df97eca8f16d51ea68647bfadbdca9d965fcdf6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/14876/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/14876/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/14876/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/f3e5ec8c3778dc7690f603c20ab5f5949cfb46eb","head":{"label":"keybase:songgao/KBFS-3624","ref":"songgao/KBFS-3624","sha":"f3e5ec8c3778dc7690f603c20ab5f5949cfb46eb","user":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA5OTE4MQ==","name":"client","full_name":"keybase/client","private":false,"owner":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2018-12-03T23:04:08Z","pushed_at":"2018-12-03T23:21:20Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":292283,"stargazers_count":4320,"watchers_count":4320,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":437,"mirror_url":null,"archived":false,"open_issues_count":2478,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":437,"open_issues":2478,"watchers":4320,"default_branch":"master"}},"base":{"label":"keybase:master","ref":"master","sha":"21bc533691d64319e11c8fe2d80d5728c1820401","user":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA5OTE4MQ==","name":"client","full_name":"keybase/client","private":false,"owner":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2018-12-03T23:04:08Z","pushed_at":"2018-12-03T23:21:20Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":292283,"stargazers_count":4320,"watchers_count":4320,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":437,"mirror_url":null,"archived":false,"open_issues_count":2478,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":437,"open_issues":2478,"watchers":4320,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/14876"},"html":{"href":"https://github.com/keybase/client/pull/14876"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/14876"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/14876/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/14876/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/14876/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/f3e5ec8c3778dc7690f603c20ab5f5949cfb46eb"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"MarcoPolo"}}