{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments/78650807","id":78650807,"diff_hunk":"@@ -290,11 +290,17 @@ app.post(\"/event\", function (req, res) {\n   }\n   hashUserId(req.deviceId).then((userUuid) => {\n     let userAnalytics = ua(config.gaId, userUuid.toString());\n-    userAnalytics.event(\n-      bodyObj.event,\n-      bodyObj.action,\n-      bodyObj.label\n-    ).send();\n+    let params = Object.assign(\n+      {},\n+      bodyObj.options || {},","path":"server/src/server.js","position":11,"original_position":11,"commit_id":"ef813c5ff194790f36e237f1f7116cb707b6f8de","original_commit_id":"ef813c5ff194790f36e237f1f7116cb707b6f8de","user":{"login":"fzzzy","id":46048,"avatar_url":"https://avatars.githubusercontent.com/u/46048?v=3","gravatar_id":"","url":"https://api.github.com/users/fzzzy","html_url":"https://github.com/fzzzy","followers_url":"https://api.github.com/users/fzzzy/followers","following_url":"https://api.github.com/users/fzzzy/following{/other_user}","gists_url":"https://api.github.com/users/fzzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/fzzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzzzy/subscriptions","organizations_url":"https://api.github.com/users/fzzzy/orgs","repos_url":"https://api.github.com/users/fzzzy/repos","events_url":"https://api.github.com/users/fzzzy/events{/privacy}","received_events_url":"https://api.github.com/users/fzzzy/received_events","type":"User","site_admin":false},"body":"I was curious about this, so I looked it up: Object.assign does not throw an exception for null or undefined source values, so you don't actually need the `|| {}` here.","created_at":"2016-09-13T21:46:36Z","updated_at":"2016-09-13T21:46:36Z","html_url":"https://github.com/mozilla-services/pageshot/pull/1521#discussion_r78650807","pull_request_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/1521","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments/78650807"},"html":{"href":"https://github.com/mozilla-services/pageshot/pull/1521#discussion_r78650807"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/1521"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/1521","id":85125260,"html_url":"https://github.com/mozilla-services/pageshot/pull/1521","diff_url":"https://github.com/mozilla-services/pageshot/pull/1521.diff","patch_url":"https://github.com/mozilla-services/pageshot/pull/1521.patch","issue_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/1521","number":1521,"state":"open","locked":false,"title":"r?fzzzy Fix #1453, add cd0/cd1 dimensions to selection events","user":{"login":"ianb","id":44390,"avatar_url":"https://avatars.githubusercontent.com/u/44390?v=3","gravatar_id":"","url":"https://api.github.com/users/ianb","html_url":"https://github.com/ianb","followers_url":"https://api.github.com/users/ianb/followers","following_url":"https://api.github.com/users/ianb/following{/other_user}","gists_url":"https://api.github.com/users/ianb/gists{/gist_id}","starred_url":"https://api.github.com/users/ianb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianb/subscriptions","organizations_url":"https://api.github.com/users/ianb/orgs","repos_url":"https://api.github.com/users/ianb/repos","events_url":"https://api.github.com/users/ianb/events{/privacy}","received_events_url":"https://api.github.com/users/ianb/received_events","type":"User","site_admin":false},"body":"Fix how event options (eventValue, cd0/cd1) are sent to server; previously eventValue was being thrown away.","created_at":"2016-09-13T21:05:38Z","updated_at":"2016-09-13T21:46:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0cd0a1b8954baac41171fee0bfefff530fca563","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/1521/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/1521/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/1521/comments","statuses_url":"https://api.github.com/repos/mozilla-services/pageshot/statuses/ef813c5ff194790f36e237f1f7116cb707b6f8de","head":{"label":"mozilla-services:fix-1453","ref":"fix-1453","sha":"ef813c5ff194790f36e237f1f7116cb707b6f8de","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":26788257,"name":"pageshot","full_name":"mozilla-services/pageshot","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/pageshot","description":"An experiment in creating better shareable versions of content","fork":false,"url":"https://api.github.com/repos/mozilla-services/pageshot","forks_url":"https://api.github.com/repos/mozilla-services/pageshot/forks","keys_url":"https://api.github.com/repos/mozilla-services/pageshot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/pageshot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/pageshot/teams","hooks_url":"https://api.github.com/repos/mozilla-services/pageshot/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/pageshot/events","assignees_url":"https://api.github.com/repos/mozilla-services/pageshot/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/pageshot/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/pageshot/tags","blobs_url":"https://api.github.com/repos/mozilla-services/pageshot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/pageshot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/pageshot/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/pageshot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/pageshot/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/pageshot/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/pageshot/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/pageshot/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/pageshot/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/pageshot/subscription","commits_url":"https://api.github.com/repos/mozilla-services/pageshot/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/pageshot/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/pageshot/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/pageshot/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/pageshot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/pageshot/merges","archive_url":"https://api.github.com/repos/mozilla-services/pageshot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/pageshot/downloads","issues_url":"https://api.github.com/repos/mozilla-services/pageshot/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/pageshot/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/pageshot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/pageshot/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/pageshot/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-services/pageshot/deployments","created_at":"2014-11-18T02:28:36Z","updated_at":"2016-09-08T00:48:36Z","pushed_at":"2016-09-13T21:05:38Z","git_url":"git://github.com/mozilla-services/pageshot.git","ssh_url":"git@github.com:mozilla-services/pageshot.git","clone_url":"https://github.com/mozilla-services/pageshot.git","svn_url":"https://github.com/mozilla-services/pageshot","homepage":"https://pageshot.net","size":8784,"stargazers_count":71,"watchers_count":71,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":163,"forks":12,"open_issues":163,"watchers":71,"default_branch":"master"}},"base":{"label":"mozilla-services:master","ref":"master","sha":"183df9385313efa90d2d71bef038c96613c3a50f","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":26788257,"name":"pageshot","full_name":"mozilla-services/pageshot","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/pageshot","description":"An experiment in creating better shareable versions of content","fork":false,"url":"https://api.github.com/repos/mozilla-services/pageshot","forks_url":"https://api.github.com/repos/mozilla-services/pageshot/forks","keys_url":"https://api.github.com/repos/mozilla-services/pageshot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/pageshot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/pageshot/teams","hooks_url":"https://api.github.com/repos/mozilla-services/pageshot/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/pageshot/events","assignees_url":"https://api.github.com/repos/mozilla-services/pageshot/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/pageshot/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/pageshot/tags","blobs_url":"https://api.github.com/repos/mozilla-services/pageshot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/pageshot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/pageshot/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/pageshot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/pageshot/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/pageshot/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/pageshot/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/pageshot/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/pageshot/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/pageshot/subscription","commits_url":"https://api.github.com/repos/mozilla-services/pageshot/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/pageshot/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/pageshot/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/pageshot/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/pageshot/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/pageshot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/pageshot/merges","archive_url":"https://api.github.com/repos/mozilla-services/pageshot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/pageshot/downloads","issues_url":"https://api.github.com/repos/mozilla-services/pageshot/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/pageshot/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/pageshot/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/pageshot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/pageshot/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/pageshot/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-services/pageshot/deployments","created_at":"2014-11-18T02:28:36Z","updated_at":"2016-09-08T00:48:36Z","pushed_at":"2016-09-13T21:05:38Z","git_url":"git://github.com/mozilla-services/pageshot.git","ssh_url":"git@github.com:mozilla-services/pageshot.git","clone_url":"https://github.com/mozilla-services/pageshot.git","svn_url":"https://github.com/mozilla-services/pageshot","homepage":"https://pageshot.net","size":8784,"stargazers_count":71,"watchers_count":71,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":163,"forks":12,"open_issues":163,"watchers":71,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/1521"},"html":{"href":"https://github.com/mozilla-services/pageshot/pull/1521"},"issue":{"href":"https://api.github.com/repos/mozilla-services/pageshot/issues/1521"},"comments":{"href":"https://api.github.com/repos/mozilla-services/pageshot/issues/1521/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/1521/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/pageshot/pulls/1521/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/pageshot/statuses/ef813c5ff194790f36e237f1f7116cb707b6f8de"}}}}
{"actor":{"display_login":"fzzzy"}}