{"action":"created","comment":{"url":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/comments/55618959","id":55618959,"diff_hunk":"@@ -44,7 +44,7 @@\n     \"session_id\": 1,\n     \"event_id\": 1,\n     \"app_version\": \"app-version\",\n-    \"platform\": \"analytics-ios\",\n+    \"platform\": \"iOS\",","path":"test/fixtures/track-android.json","position":null,"original_position":5,"commit_id":"6cdcfb73a68c7390dce0abc1e27bedc13cb77cc8","original_commit_id":"703b2ca7f2ddcbfcd8aad917bd66892382fe2edf","user":{"login":"djih","id":4776584,"avatar_url":"https://avatars.githubusercontent.com/u/4776584?v=3","gravatar_id":"","url":"https://api.github.com/users/djih","html_url":"https://github.com/djih","followers_url":"https://api.github.com/users/djih/followers","following_url":"https://api.github.com/users/djih/following{/other_user}","gists_url":"https://api.github.com/users/djih/gists{/gist_id}","starred_url":"https://api.github.com/users/djih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djih/subscriptions","organizations_url":"https://api.github.com/users/djih/orgs","repos_url":"https://api.github.com/users/djih/repos","events_url":"https://api.github.com/users/djih/events{/privacy}","received_events_url":"https://api.github.com/users/djih/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2016-03-10T00:55:36Z","updated_at":"2016-03-10T00:55:36Z","html_url":"https://github.com/segmentio/integration-amplitude/pull/10#discussion_r55618959","pull_request_url":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/comments/55618959"},"html":{"href":"https://github.com/segmentio/integration-amplitude/pull/10#discussion_r55618959"},"pull_request":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/10","id":62319230,"html_url":"https://github.com/segmentio/integration-amplitude/pull/10","diff_url":"https://github.com/segmentio/integration-amplitude/pull/10.diff","patch_url":"https://github.com/segmentio/integration-amplitude/pull/10.patch","issue_url":"https://api.github.com/repos/segmentio/integration-amplitude/issues/10","number":10,"state":"open","locked":false,"title":"update platform value","user":{"login":"djih","id":4776584,"avatar_url":"https://avatars.githubusercontent.com/u/4776584?v=3","gravatar_id":"","url":"https://api.github.com/users/djih","html_url":"https://github.com/djih","followers_url":"https://api.github.com/users/djih/followers","following_url":"https://api.github.com/users/djih/following{/other_user}","gists_url":"https://api.github.com/users/djih/gists{/gist_id}","starred_url":"https://api.github.com/users/djih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djih/subscriptions","organizations_url":"https://api.github.com/users/djih/orgs","repos_url":"https://api.github.com/users/djih/repos","events_url":"https://api.github.com/users/djih/events{/privacy}","received_events_url":"https://api.github.com/users/djih/received_events","type":"User","site_admin":false},"body":"This PR addresses https://github.com/segmentio/integration-amplitude/issues/9. Sometimes we will see events with platform = 'analytics-ruby', or 'analytics-php', and we expect values like 'iOS', 'Web', or 'Android'. Following suggestions from @f2prateek, we map the segment library to a platform, or fallback on the device / os. Also sometimes Segment's values are all lowercase (like device type), so I added another layer of sanitization to format the values.","created_at":"2016-03-10T00:14:29Z","updated_at":"2016-03-10T00:55:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55d8ee3e98aa3453bc5a4d3f96ad2bb4827f4d5a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/10/commits","review_comments_url":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/10/comments","review_comment_url":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segmentio/integration-amplitude/issues/10/comments","statuses_url":"https://api.github.com/repos/segmentio/integration-amplitude/statuses/6cdcfb73a68c7390dce0abc1e27bedc13cb77cc8","head":{"label":"amplitude:update_platform","ref":"update_platform","sha":"6cdcfb73a68c7390dce0abc1e27bedc13cb77cc8","user":{"login":"amplitude","id":2291562,"avatar_url":"https://avatars.githubusercontent.com/u/2291562?v=3","gravatar_id":"","url":"https://api.github.com/users/amplitude","html_url":"https://github.com/amplitude","followers_url":"https://api.github.com/users/amplitude/followers","following_url":"https://api.github.com/users/amplitude/following{/other_user}","gists_url":"https://api.github.com/users/amplitude/gists{/gist_id}","starred_url":"https://api.github.com/users/amplitude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplitude/subscriptions","organizations_url":"https://api.github.com/users/amplitude/orgs","repos_url":"https://api.github.com/users/amplitude/repos","events_url":"https://api.github.com/users/amplitude/events{/privacy}","received_events_url":"https://api.github.com/users/amplitude/received_events","type":"Organization","site_admin":false},"repo":{"id":30949389,"name":"integration-amplitude","full_name":"amplitude/integration-amplitude","owner":{"login":"amplitude","id":2291562,"avatar_url":"https://avatars.githubusercontent.com/u/2291562?v=3","gravatar_id":"","url":"https://api.github.com/users/amplitude","html_url":"https://github.com/amplitude","followers_url":"https://api.github.com/users/amplitude/followers","following_url":"https://api.github.com/users/amplitude/following{/other_user}","gists_url":"https://api.github.com/users/amplitude/gists{/gist_id}","starred_url":"https://api.github.com/users/amplitude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplitude/subscriptions","organizations_url":"https://api.github.com/users/amplitude/orgs","repos_url":"https://api.github.com/users/amplitude/repos","events_url":"https://api.github.com/users/amplitude/events{/privacy}","received_events_url":"https://api.github.com/users/amplitude/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplitude/integration-amplitude","description":"Amplitude server-side integration","fork":true,"url":"https://api.github.com/repos/amplitude/integration-amplitude","forks_url":"https://api.github.com/repos/amplitude/integration-amplitude/forks","keys_url":"https://api.github.com/repos/amplitude/integration-amplitude/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplitude/integration-amplitude/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplitude/integration-amplitude/teams","hooks_url":"https://api.github.com/repos/amplitude/integration-amplitude/hooks","issue_events_url":"https://api.github.com/repos/amplitude/integration-amplitude/issues/events{/number}","events_url":"https://api.github.com/repos/amplitude/integration-amplitude/events","assignees_url":"https://api.github.com/repos/amplitude/integration-amplitude/assignees{/user}","branches_url":"https://api.github.com/repos/amplitude/integration-amplitude/branches{/branch}","tags_url":"https://api.github.com/repos/amplitude/integration-amplitude/tags","blobs_url":"https://api.github.com/repos/amplitude/integration-amplitude/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplitude/integration-amplitude/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplitude/integration-amplitude/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplitude/integration-amplitude/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplitude/integration-amplitude/statuses/{sha}","languages_url":"https://api.github.com/repos/amplitude/integration-amplitude/languages","stargazers_url":"https://api.github.com/repos/amplitude/integration-amplitude/stargazers","contributors_url":"https://api.github.com/repos/amplitude/integration-amplitude/contributors","subscribers_url":"https://api.github.com/repos/amplitude/integration-amplitude/subscribers","subscription_url":"https://api.github.com/repos/amplitude/integration-amplitude/subscription","commits_url":"https://api.github.com/repos/amplitude/integration-amplitude/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplitude/integration-amplitude/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplitude/integration-amplitude/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplitude/integration-amplitude/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplitude/integration-amplitude/contents/{+path}","compare_url":"https://api.github.com/repos/amplitude/integration-amplitude/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplitude/integration-amplitude/merges","archive_url":"https://api.github.com/repos/amplitude/integration-amplitude/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplitude/integration-amplitude/downloads","issues_url":"https://api.github.com/repos/amplitude/integration-amplitude/issues{/number}","pulls_url":"https://api.github.com/repos/amplitude/integration-amplitude/pulls{/number}","milestones_url":"https://api.github.com/repos/amplitude/integration-amplitude/milestones{/number}","notifications_url":"https://api.github.com/repos/amplitude/integration-amplitude/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplitude/integration-amplitude/labels{/name}","releases_url":"https://api.github.com/repos/amplitude/integration-amplitude/releases{/id}","deployments_url":"https://api.github.com/repos/amplitude/integration-amplitude/deployments","created_at":"2015-02-18T02:47:58Z","updated_at":"2016-02-08T21:12:39Z","pushed_at":"2016-03-10T00:54:47Z","git_url":"git://github.com/amplitude/integration-amplitude.git","ssh_url":"git@github.com:amplitude/integration-amplitude.git","clone_url":"https://github.com/amplitude/integration-amplitude.git","svn_url":"https://github.com/amplitude/integration-amplitude","homepage":"segment.com","size":27,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"segmentio:master","ref":"master","sha":"dcf505084620990d955a8ce5b0a52aac401ee869","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=3","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":26639832,"name":"integration-amplitude","full_name":"segmentio/integration-amplitude","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars.githubusercontent.com/u/819518?v=3","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/integration-amplitude","description":"Amplitude server-side integration","fork":false,"url":"https://api.github.com/repos/segmentio/integration-amplitude","forks_url":"https://api.github.com/repos/segmentio/integration-amplitude/forks","keys_url":"https://api.github.com/repos/segmentio/integration-amplitude/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/integration-amplitude/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/integration-amplitude/teams","hooks_url":"https://api.github.com/repos/segmentio/integration-amplitude/hooks","issue_events_url":"https://api.github.com/repos/segmentio/integration-amplitude/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/integration-amplitude/events","assignees_url":"https://api.github.com/repos/segmentio/integration-amplitude/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/integration-amplitude/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/integration-amplitude/tags","blobs_url":"https://api.github.com/repos/segmentio/integration-amplitude/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/integration-amplitude/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/integration-amplitude/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/integration-amplitude/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/integration-amplitude/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/integration-amplitude/languages","stargazers_url":"https://api.github.com/repos/segmentio/integration-amplitude/stargazers","contributors_url":"https://api.github.com/repos/segmentio/integration-amplitude/contributors","subscribers_url":"https://api.github.com/repos/segmentio/integration-amplitude/subscribers","subscription_url":"https://api.github.com/repos/segmentio/integration-amplitude/subscription","commits_url":"https://api.github.com/repos/segmentio/integration-amplitude/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/integration-amplitude/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/integration-amplitude/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/integration-amplitude/issues/comments{/number}","contents_url":"https://api.github.com/repos/segmentio/integration-amplitude/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/integration-amplitude/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/integration-amplitude/merges","archive_url":"https://api.github.com/repos/segmentio/integration-amplitude/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/integration-amplitude/downloads","issues_url":"https://api.github.com/repos/segmentio/integration-amplitude/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/integration-amplitude/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/integration-amplitude/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/integration-amplitude/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/integration-amplitude/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/integration-amplitude/releases{/id}","deployments_url":"https://api.github.com/repos/segmentio/integration-amplitude/deployments","created_at":"2014-11-14T13:31:36Z","updated_at":"2016-02-11T10:43:58Z","pushed_at":"2016-03-10T00:54:47Z","git_url":"git://github.com/segmentio/integration-amplitude.git","ssh_url":"git@github.com:segmentio/integration-amplitude.git","clone_url":"https://github.com/segmentio/integration-amplitude.git","svn_url":"https://github.com/segmentio/integration-amplitude","homepage":"segment.com","size":28,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/10"},"html":{"href":"https://github.com/segmentio/integration-amplitude/pull/10"},"issue":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/issues/10"},"comments":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/segmentio/integration-amplitude/statuses/6cdcfb73a68c7390dce0abc1e27bedc13cb77cc8"}}}}