{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/kibana/pulls/comments/84371674","pull_request_review_id":5154801,"id":84371674,"diff_hunk":"@@ -0,0 +1,24 @@\n+import { isArray } from 'lodash';\n+\n+export function doTagsMatch(event, expectedTags) {\n+  if (!event || !isArray(event.tags)) {\n+    return false;\n+  }\n+\n+  if (event.tags.length !== expectedTags.length) {\n+    return false;\n+  }\n+\n+  const unmatchedEventTags = event.tags.slice(0);\n+  const unmatchedExpectedTags = [];\n+  expectedTags.forEach(t => {\n+    const i = unmatchedEventTags.indexOf(t);\n+    if (i > -1) {\n+      unmatchedEventTags.splice(i, 1);\n+    } else {\n+      unmatchedExpectedTags.push(t);\n+    }\n+  });\n+\n+  return unmatchedEventTags.concat(unmatchedExpectedTags).length === 0;","path":"src/server/logging/do_tags_match.js","position":null,"original_position":23,"commit_id":"866abcc82089aedb3333f78e2d664cd9753b75ec","original_commit_id":"38bcad9a0536c532f7162bcad5b2c03e0b047bca","user":{"login":"spalger","id":1329312,"avatar_url":"https://avatars.githubusercontent.com/u/1329312?v=3","gravatar_id":"","url":"https://api.github.com/users/spalger","html_url":"https://github.com/spalger","followers_url":"https://api.github.com/users/spalger/followers","following_url":"https://api.github.com/users/spalger/following{/other_user}","gists_url":"https://api.github.com/users/spalger/gists{/gist_id}","starred_url":"https://api.github.com/users/spalger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalger/subscriptions","organizations_url":"https://api.github.com/users/spalger/orgs","repos_url":"https://api.github.com/users/spalger/repos","events_url":"https://api.github.com/users/spalger/events{/privacy}","received_events_url":"https://api.github.com/users/spalger/received_events","type":"User","site_admin":false},"body":"Hmm, I suppose we could, since the lengths of both arrays is the same.","created_at":"2016-10-20T20:42:35Z","updated_at":"2016-10-20T20:42:35Z","html_url":"https://github.com/elastic/kibana/pull/8785#discussion_r84371674","pull_request_url":"https://api.github.com/repos/elastic/kibana/pulls/8785","_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments/84371674"},"html":{"href":"https://github.com/elastic/kibana/pull/8785#discussion_r84371674"},"pull_request":{"href":"https://api.github.com/repos/elastic/kibana/pulls/8785"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/8785","id":90265026,"html_url":"https://github.com/elastic/kibana/pull/8785","diff_url":"https://github.com/elastic/kibana/pull/8785.diff","patch_url":"https://github.com/elastic/kibana/pull/8785.patch","issue_url":"https://api.github.com/repos/elastic/kibana/issues/8785","number":8785,"state":"open","locked":false,"title":"[server/logging] intercept ECONNRESET messages and downgrade them","user":{"login":"spalger","id":1329312,"avatar_url":"https://avatars.githubusercontent.com/u/1329312?v=3","gravatar_id":"","url":"https://api.github.com/users/spalger","html_url":"https://github.com/spalger","followers_url":"https://api.github.com/users/spalger/followers","following_url":"https://api.github.com/users/spalger/following{/other_user}","gists_url":"https://api.github.com/users/spalger/gists{/gist_id}","starred_url":"https://api.github.com/users/spalger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalger/subscriptions","organizations_url":"https://api.github.com/users/spalger/orgs","repos_url":"https://api.github.com/users/spalger/repos","events_url":"https://api.github.com/users/spalger/events{/privacy}","received_events_url":"https://api.github.com/users/spalger/received_events","type":"User","site_admin":false},"body":"Fixes #8623\r\n\r\nImplements a `LogInterceptor` that sees every log message before it is filtered by the squeeze stream. This allows us to transform log messages we might not have control over, like the log messages that come from hapi itself, before they are processed by the standard log message pipeline.","created_at":"2016-10-20T19:26:22Z","updated_at":"2016-10-20T20:42:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c54b236dbf34f0189f8b854c110c31f2e49a0467","assignee":{"login":"tylersmalley","id":40265,"avatar_url":"https://avatars.githubusercontent.com/u/40265?v=3","gravatar_id":"","url":"https://api.github.com/users/tylersmalley","html_url":"https://github.com/tylersmalley","followers_url":"https://api.github.com/users/tylersmalley/followers","following_url":"https://api.github.com/users/tylersmalley/following{/other_user}","gists_url":"https://api.github.com/users/tylersmalley/gists{/gist_id}","starred_url":"https://api.github.com/users/tylersmalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylersmalley/subscriptions","organizations_url":"https://api.github.com/users/tylersmalley/orgs","repos_url":"https://api.github.com/users/tylersmalley/repos","events_url":"https://api.github.com/users/tylersmalley/events{/privacy}","received_events_url":"https://api.github.com/users/tylersmalley/received_events","type":"User","site_admin":false},"assignees":[{"login":"tylersmalley","id":40265,"avatar_url":"https://avatars.githubusercontent.com/u/40265?v=3","gravatar_id":"","url":"https://api.github.com/users/tylersmalley","html_url":"https://github.com/tylersmalley","followers_url":"https://api.github.com/users/tylersmalley/followers","following_url":"https://api.github.com/users/tylersmalley/following{/other_user}","gists_url":"https://api.github.com/users/tylersmalley/gists{/gist_id}","starred_url":"https://api.github.com/users/tylersmalley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylersmalley/subscriptions","organizations_url":"https://api.github.com/users/tylersmalley/orgs","repos_url":"https://api.github.com/users/tylersmalley/repos","events_url":"https://api.github.com/users/tylersmalley/events{/privacy}","received_events_url":"https://api.github.com/users/tylersmalley/received_events","type":"User","site_admin":false},{"login":"kobelb","id":627123,"avatar_url":"https://avatars.githubusercontent.com/u/627123?v=3","gravatar_id":"","url":"https://api.github.com/users/kobelb","html_url":"https://github.com/kobelb","followers_url":"https://api.github.com/users/kobelb/followers","following_url":"https://api.github.com/users/kobelb/following{/other_user}","gists_url":"https://api.github.com/users/kobelb/gists{/gist_id}","starred_url":"https://api.github.com/users/kobelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kobelb/subscriptions","organizations_url":"https://api.github.com/users/kobelb/orgs","repos_url":"https://api.github.com/users/kobelb/repos","events_url":"https://api.github.com/users/kobelb/events{/privacy}","received_events_url":"https://api.github.com/users/kobelb/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/kibana/pulls/8785/commits","review_comments_url":"https://api.github.com/repos/elastic/kibana/pulls/8785/comments","review_comment_url":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/8785/comments","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/866abcc82089aedb3333f78e2d664cd9753b75ec","head":{"label":"spalger:implement/server-log-interceptor","ref":"implement/server-log-interceptor","sha":"866abcc82089aedb3333f78e2d664cd9753b75ec","user":{"login":"spalger","id":1329312,"avatar_url":"https://avatars.githubusercontent.com/u/1329312?v=3","gravatar_id":"","url":"https://api.github.com/users/spalger","html_url":"https://github.com/spalger","followers_url":"https://api.github.com/users/spalger/followers","following_url":"https://api.github.com/users/spalger/following{/other_user}","gists_url":"https://api.github.com/users/spalger/gists{/gist_id}","starred_url":"https://api.github.com/users/spalger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalger/subscriptions","organizations_url":"https://api.github.com/users/spalger/orgs","repos_url":"https://api.github.com/users/spalger/repos","events_url":"https://api.github.com/users/spalger/events{/privacy}","received_events_url":"https://api.github.com/users/spalger/received_events","type":"User","site_admin":false},"repo":{"id":12307386,"name":"kibana","full_name":"spalger/kibana","owner":{"login":"spalger","id":1329312,"avatar_url":"https://avatars.githubusercontent.com/u/1329312?v=3","gravatar_id":"","url":"https://api.github.com/users/spalger","html_url":"https://github.com/spalger","followers_url":"https://api.github.com/users/spalger/followers","following_url":"https://api.github.com/users/spalger/following{/other_user}","gists_url":"https://api.github.com/users/spalger/gists{/gist_id}","starred_url":"https://api.github.com/users/spalger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalger/subscriptions","organizations_url":"https://api.github.com/users/spalger/orgs","repos_url":"https://api.github.com/users/spalger/repos","events_url":"https://api.github.com/users/spalger/events{/privacy}","received_events_url":"https://api.github.com/users/spalger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spalger/kibana","description":"Kibana","fork":true,"url":"https://api.github.com/repos/spalger/kibana","forks_url":"https://api.github.com/repos/spalger/kibana/forks","keys_url":"https://api.github.com/repos/spalger/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spalger/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spalger/kibana/teams","hooks_url":"https://api.github.com/repos/spalger/kibana/hooks","issue_events_url":"https://api.github.com/repos/spalger/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/spalger/kibana/events","assignees_url":"https://api.github.com/repos/spalger/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/spalger/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/spalger/kibana/tags","blobs_url":"https://api.github.com/repos/spalger/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spalger/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spalger/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/spalger/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spalger/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/spalger/kibana/languages","stargazers_url":"https://api.github.com/repos/spalger/kibana/stargazers","contributors_url":"https://api.github.com/repos/spalger/kibana/contributors","subscribers_url":"https://api.github.com/repos/spalger/kibana/subscribers","subscription_url":"https://api.github.com/repos/spalger/kibana/subscription","commits_url":"https://api.github.com/repos/spalger/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/spalger/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/spalger/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/spalger/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/spalger/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/spalger/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spalger/kibana/merges","archive_url":"https://api.github.com/repos/spalger/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spalger/kibana/downloads","issues_url":"https://api.github.com/repos/spalger/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/spalger/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/spalger/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/spalger/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spalger/kibana/labels{/name}","releases_url":"https://api.github.com/repos/spalger/kibana/releases{/id}","deployments_url":"https://api.github.com/repos/spalger/kibana/deployments","created_at":"2013-08-22T20:39:03Z","updated_at":"2015-05-08T18:10:59Z","pushed_at":"2016-10-20T20:35:44Z","git_url":"git://github.com/spalger/kibana.git","ssh_url":"git@github.com:spalger/kibana.git","clone_url":"https://github.com/spalger/kibana.git","svn_url":"https://github.com/spalger/kibana","homepage":"http://www.elasticsearch.org/overview/kibana/","size":241936,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"621c0c9241db5f4e9efad8b297384644460fdfa9","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","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,"name":"kibana","full_name":"elastic/kibana","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","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},"private":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":"2016-10-20T20:31:55Z","pushed_at":"2016-10-20T20:35:45Z","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":267057,"stargazers_count":6159,"watchers_count":6159,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2278,"mirror_url":null,"open_issues_count":1232,"forks":2278,"open_issues":1232,"watchers":6159,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/8785"},"html":{"href":"https://github.com/elastic/kibana/pull/8785"},"issue":{"href":"https://api.github.com/repos/elastic/kibana/issues/8785"},"comments":{"href":"https://api.github.com/repos/elastic/kibana/issues/8785/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/kibana/pulls/8785/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/kibana/pulls/8785/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/kibana/statuses/866abcc82089aedb3333f78e2d664cd9753b75ec"}}}}
{"actor":{"display_login":"spalger"}}