payload: {"action":"created","comment":{"url":"https://api.github.com/repos/elastic/kibana/pulls/comments/273044793","pull_request_review_id":223841803,"id":273044793,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3MzA0NDc5Mw==","diff_hunk":"@@ -0,0 +1,28 @@\n+/*\n+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n+ * or more contributor license agreements. Licensed under the Elastic License;\n+ * you may not use this file except in compliance with the Elastic License.\n+ */\n+\n+import { EuiLink, EuiLinkAnchorProps } from '@elastic/eui';\n+import React from 'react';\n+import url from 'url';\n+import { useLocation } from '../../../hooks/useLocation';\n+import { APMQueryParams, getSearchWithCurrentTimeRange } from './url_helpers';\n+\n+interface Props extends EuiLinkAnchorProps {\n+  path?: string;\n+  query?: APMQueryParams;\n+}\n+\n+const APMLink: React.FC<Props> = ({ path, query, ...rest }) => {","path":"x-pack/plugins/apm/public/components/shared/Links/APMLink.tsx","position":38,"original_position":18,"commit_id":"c24a83c59ff2c63e7742dde425763ad9e2cb5f28","original_commit_id":"2af067cd1734b7ef63406946bad15ba78068f03a","user":{"login":"sqren","id":209966,"node_id":"MDQ6VXNlcjIwOTk2Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/209966?v=4","gravatar_id":"","url":"https://api.github.com/users/sqren","html_url":"https://github.com/sqren","followers_url":"https://api.github.com/users/sqren/followers","following_url":"https://api.github.com/users/sqren/following{/other_user}","gists_url":"https://api.github.com/users/sqren/gists{/gist_id}","starred_url":"https://api.github.com/users/sqren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqren/subscriptions","organizations_url":"https://api.github.com/users/sqren/orgs","repos_url":"https://api.github.com/users/sqren/repos","events_url":"https://api.github.com/users/sqren/events{/privacy}","received_events_url":"https://api.github.com/users/sqren/received_events","type":"User","site_admin":false},"body":"> The two definitions are expected since one is basically extending the other.\r\n\r\nSure, vscode is doing the right thing - but as a dev when I click on go-to-def for `APMLink` I just want to go the place where `APMLink` is defined. That's what happens when you `export function() {...}","created_at":"2019-04-08T13:27:44Z","updated_at":"2019-04-08T13:27:44Z","html_url":"https://github.com/elastic/kibana/pull/34630#discussion_r273044793","pull_request_url":"https://api.github.com/repos/elastic/kibana/pulls/34630","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments/273044793"},"html":{"href":"https://github.com/elastic/kibana/pull/34630#discussion_r273044793"},"pull_request":{"href":"https://api.github.com/repos/elastic/kibana/pulls/34630"}},"in_reply_to_id":273023357},"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/34630","id":267838504,"node_id":"MDExOlB1bGxSZXF1ZXN0MjY3ODM4NTA0","html_url":"https://github.com/elastic/kibana/pull/34630","diff_url":"https://github.com/elastic/kibana/pull/34630.diff","patch_url":"https://github.com/elastic/kibana/pull/34630.patch","issue_url":"https://api.github.com/repos/elastic/kibana/issues/34630","number":34630,"state":"open","locked":false,"title":"Rework link components to be separated by destination","user":{"login":"jasonrhodes","id":159370,"node_id":"MDQ6VXNlcjE1OTM3MA==","avatar_url":"https://avatars0.githubusercontent.com/u/159370?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonrhodes","html_url":"https://github.com/jasonrhodes","followers_url":"https://api.github.com/users/jasonrhodes/followers","following_url":"https://api.github.com/users/jasonrhodes/following{/other_user}","gists_url":"https://api.github.com/users/jasonrhodes/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonrhodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonrhodes/subscriptions","organizations_url":"https://api.github.com/users/jasonrhodes/orgs","repos_url":"https://api.github.com/users/jasonrhodes/repos","events_url":"https://api.github.com/users/jasonrhodes/events{/privacy}","received_events_url":"https://api.github.com/users/jasonrhodes/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nOur link abstraction was muddy and made it impossible to guarantee type safety for things that diverged between link destinations (e.g. query string params). This PR separates the link components so they each handle their own logic separately.\r\n\r\nNotes:\r\n* This PR adds a `LocationContext` provider/consumer pair, a `useLocation()` hook, and a `useAPMIndexPattern` async hook\r\n* `KibanaLink` still exists but is now a generic link to `/app/kibana` at the designated sub-path\r\n* `KibanaRisonLink` and a lot of the url_helpers and rison_helpers files have been removed\r\n* `QueryWithIndexPattern` render-prop component has been removed in favor of the `useAPMIndexPattern` hook\r\n\r\nTODO:\r\n* [x] Add integration link tests for new link components\r\n* [x] Verify that APM links retain kuery value from existing url\r\n* [x] Determine if other query param values from existing url need to be maintained for APM links","created_at":"2019-04-05T14:08:34Z","updated_at":"2019-04-08T13:27:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a63793d31b7e7d8a264f9f58d8894c5229db48ff","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ogupte","id":1967266,"node_id":"MDQ6VXNlcjE5NjcyNjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1967266?v=4","gravatar_id":"","url":"https://api.github.com/users/ogupte","html_url":"https://github.com/ogupte","followers_url":"https://api.github.com/users/ogupte/followers","following_url":"https://api.github.com/users/ogupte/following{/other_user}","gists_url":"https://api.github.com/users/ogupte/gists{/gist_id}","starred_url":"https://api.github.com/users/ogupte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogupte/subscriptions","organizations_url":"https://api.github.com/users/ogupte/orgs","repos_url":"https://api.github.com/users/ogupte/repos","events_url":"https://api.github.com/users/ogupte/events{/privacy}","received_events_url":"https://api.github.com/users/ogupte/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/kibana/pulls/34630/commits","review_comments_url":"https://api.github.com/repos/elastic/kibana/pulls/34630/comments","review_comment_url":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/34630/comments","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/c24a83c59ff2c63e7742dde425763ad9e2cb5f28","head":{"label":"jasonrhodes:separate-links_34443","ref":"separate-links_34443","sha":"c24a83c59ff2c63e7742dde425763ad9e2cb5f28","user":{"login":"jasonrhodes","id":159370,"node_id":"MDQ6VXNlcjE1OTM3MA==","avatar_url":"https://avatars0.githubusercontent.com/u/159370?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonrhodes","html_url":"https://github.com/jasonrhodes","followers_url":"https://api.github.com/users/jasonrhodes/followers","following_url":"https://api.github.com/users/jasonrhodes/following{/other_user}","gists_url":"https://api.github.com/users/jasonrhodes/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonrhodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonrhodes/subscriptions","organizations_url":"https://api.github.com/users/jasonrhodes/orgs","repos_url":"https://api.github.com/users/jasonrhodes/repos","events_url":"https://api.github.com/users/jasonrhodes/events{/privacy}","received_events_url":"https://api.github.com/users/jasonrhodes/received_events","type":"User","site_admin":false},"repo":{"id":145128902,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUxMjg5MDI=","name":"kibana","full_name":"jasonrhodes/kibana","private":false,"owner":{"login":"jasonrhodes","id":159370,"node_id":"MDQ6VXNlcjE1OTM3MA==","avatar_url":"https://avatars0.githubusercontent.com/u/159370?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonrhodes","html_url":"https://github.com/jasonrhodes","followers_url":"https://api.github.com/users/jasonrhodes/followers","following_url":"https://api.github.com/users/jasonrhodes/following{/other_user}","gists_url":"https://api.github.com/users/jasonrhodes/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonrhodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonrhodes/subscriptions","organizations_url":"https://api.github.com/users/jasonrhodes/orgs","repos_url":"https://api.github.com/users/jasonrhodes/repos","events_url":"https://api.github.com/users/jasonrhodes/events{/privacy}","received_events_url":"https://api.github.com/users/jasonrhodes/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jasonrhodes/kibana","description":":bar_chart: Kibana analytics and search dashboard for Elasticsearch","fork":true,"url":"https://api.github.com/repos/jasonrhodes/kibana","forks_url":"https://api.github.com/repos/jasonrhodes/kibana/forks","keys_url":"https://api.github.com/repos/jasonrhodes/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasonrhodes/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasonrhodes/kibana/teams","hooks_url":"https://api.github.com/repos/jasonrhodes/kibana/hooks","issue_events_url":"https://api.github.com/repos/jasonrhodes/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/jasonrhodes/kibana/events","assignees_url":"https://api.github.com/repos/jasonrhodes/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/jasonrhodes/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/jasonrhodes/kibana/tags","blobs_url":"https://api.github.com/repos/jasonrhodes/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasonrhodes/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasonrhodes/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasonrhodes/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasonrhodes/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/jasonrhodes/kibana/languages","stargazers_url":"https://api.github.com/repos/jasonrhodes/kibana/stargazers","contributors_url":"https://api.github.com/repos/jasonrhodes/kibana/contributors","subscribers_url":"https://api.github.com/repos/jasonrhodes/kibana/subscribers","subscription_url":"https://api.github.com/repos/jasonrhodes/kibana/subscription","commits_url":"https://api.github.com/repos/jasonrhodes/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasonrhodes/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasonrhodes/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasonrhodes/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasonrhodes/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/jasonrhodes/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasonrhodes/kibana/merges","archive_url":"https://api.github.com/repos/jasonrhodes/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasonrhodes/kibana/downloads","issues_url":"https://api.github.com/repos/jasonrhodes/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/jasonrhodes/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/jasonrhodes/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/jasonrhodes/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasonrhodes/kibana/labels{/name}","releases_url":"https://api.github.com/repos/jasonrhodes/kibana/releases{/id}","deployments_url":"https://api.github.com/repos/jasonrhodes/kibana/deployments","created_at":"2018-08-17T14:13:07Z","updated_at":"2019-02-15T20:06:34Z","pushed_at":"2019-04-08T13:21:46Z","git_url":"git://github.com/jasonrhodes/kibana.git","ssh_url":"git@github.com:jasonrhodes/kibana.git","clone_url":"https://github.com/jasonrhodes/kibana.git","svn_url":"https://github.com/jasonrhodes/kibana","homepage":"https://www.elastic.co/products/kibana","size":669603,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"e44ad7b3586680efcd35a1e39cc5955f52388482","user":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":7833168,"node_id":"MDEwOlJlcG9zaXRvcnk3ODMzMTY4","name":"kibana","full_name":"elastic/kibana","private":false,"owner":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/elastic/kibana","description":":bar_chart: Kibana analytics and search dashboard for Elasticsearch","fork":false,"url":"https://api.github.com/repos/elastic/kibana","forks_url":"https://api.github.com/repos/elastic/kibana/forks","keys_url":"https://api.github.com/repos/elastic/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/kibana/teams","hooks_url":"https://api.github.com/repos/elastic/kibana/hooks","issue_events_url":"https://api.github.com/repos/elastic/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/kibana/events","assignees_url":"https://api.github.com/repos/elastic/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/kibana/tags","blobs_url":"https://api.github.com/repos/elastic/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/kibana/languages","stargazers_url":"https://api.github.com/repos/elastic/kibana/stargazers","contributors_url":"https://api.github.com/repos/elastic/kibana/contributors","subscribers_url":"https://api.github.com/repos/elastic/kibana/subscribers","subscription_url":"https://api.github.com/repos/elastic/kibana/subscription","commits_url":"https://api.github.com/repos/elastic/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/kibana/merges","archive_url":"https://api.github.com/repos/elastic/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/kibana/downloads","issues_url":"https://api.github.com/repos/elastic/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/kibana/labels{/name}","releases_url":"https://api.github.com/repos/elastic/kibana/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/kibana/deployments","created_at":"2013-01-26T04:00:59Z","updated_at":"2019-04-08T13:19:09Z","pushed_at":"2019-04-08T13:22:20Z","git_url":"git://github.com/elastic/kibana.git","ssh_url":"git@github.com:elastic/kibana.git","clone_url":"https://github.com/elastic/kibana.git","svn_url":"https://github.com/elastic/kibana","homepage":"https://www.elastic.co/products/kibana","size":737241,"stargazers_count":11503,"watchers_count":11503,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4503,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4345,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4503,"open_issues":4345,"watchers":11503,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/34630"},"html":{"href":"https://github.com/elastic/kibana/pull/34630"},"issue":{"href":"https://api.github.com/repos/elastic/kibana/issues/34630"},"comments":{"href":"https://api.github.com/repos/elastic/kibana/issues/34630/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/kibana/pulls/34630/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/kibana/pulls/34630/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/kibana/statuses/c24a83c59ff2c63e7742dde425763ad9e2cb5f28"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"sqren"}}