{"action":"created","comment":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/80674427","pull_request_review_id":1715193,"id":80674427,"diff_hunk":"@@ -1,6 +1,37 @@\n import transit from 'transit-js';\n import Immutable from 'immutable';\n \n+export const Image = Immutable.Record({\n+  type: ':square',\n+  height: 408,\n+  width: 408,\n+  url: null,\n+});\n+\n+const ImageRefs = Immutable.Record({\n+  square: new Image(),\n+  square2x: new Image(),\n+});\n+\n+const toImage = (rep) => {\n+  const knownStyles = {\n+    ':square': 'square',\n+    ':square_2x': 'square2x',\n+  };\n+  const data = rep[1];\n+  const images = data.map((s) => new Image({\n+    type: s.get(0),\n+    height: s.get(1),\n+    width: s.get(2), // eslint-disable-line no-magic-numbers\n+    url: s.get(3), // eslint-disable-line no-magic-numbers\n+  }));","path":"client/app/utils/transitImmutableConverter.js","position":27,"original_position":27,"commit_id":"51d3871770012ae46fc947ab8364db4e28b7238a","original_commit_id":"51d3871770012ae46fc947ab8364db4e28b7238a","user":{"login":"Gnito","id":717315,"avatar_url":"https://avatars.githubusercontent.com/u/717315?v=3","gravatar_id":"","url":"https://api.github.com/users/Gnito","html_url":"https://github.com/Gnito","followers_url":"https://api.github.com/users/Gnito/followers","following_url":"https://api.github.com/users/Gnito/following{/other_user}","gists_url":"https://api.github.com/users/Gnito/gists{/gist_id}","starred_url":"https://api.github.com/users/Gnito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gnito/subscriptions","organizations_url":"https://api.github.com/users/Gnito/orgs","repos_url":"https://api.github.com/users/Gnito/repos","events_url":"https://api.github.com/users/Gnito/events{/privacy}","received_events_url":"https://api.github.com/users/Gnito/received_events","type":"User","site_admin":false},"body":"Alternatively:\r\nconst images = data.map(([type, height, width, url] = s) => new Image({ type, height, width, url }));","created_at":"2016-09-27T11:52:49Z","updated_at":"2016-09-27T11:52:49Z","html_url":"https://github.com/sharetribe/sharetribe/pull/2580#discussion_r80674427","pull_request_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2580","_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/80674427"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/2580#discussion_r80674427"},"pull_request":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2580"}}},"pull_request":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2580","id":86912274,"html_url":"https://github.com/sharetribe/sharetribe/pull/2580","diff_url":"https://github.com/sharetribe/sharetribe/pull/2580.diff","patch_url":"https://github.com/sharetribe/sharetribe/pull/2580.patch","issue_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/2580","number":2580,"state":"open","locked":false,"title":"Parse transit encoded listing images","user":{"login":"mporkola","id":432030,"avatar_url":"https://avatars.githubusercontent.com/u/432030?v=3","gravatar_id":"","url":"https://api.github.com/users/mporkola","html_url":"https://github.com/mporkola","followers_url":"https://api.github.com/users/mporkola/followers","following_url":"https://api.github.com/users/mporkola/following{/other_user}","gists_url":"https://api.github.com/users/mporkola/gists{/gist_id}","starred_url":"https://api.github.com/users/mporkola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mporkola/subscriptions","organizations_url":"https://api.github.com/users/mporkola/orgs","repos_url":"https://api.github.com/users/mporkola/repos","events_url":"https://api.github.com/users/mporkola/events{/privacy}","received_events_url":"https://api.github.com/users/mporkola/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-27T11:37:07Z","updated_at":"2016-09-27T11:52:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"949e872828659572e6bb79519661a8945c751c73","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2580/commits","review_comments_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2580/comments","review_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/2580/comments","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/51d3871770012ae46fc947ab8364db4e28b7238a","head":{"label":"sharetribe:transit-image-reader","ref":"transit-image-reader","sha":"51d3871770012ae46fc947ab8364db4e28b7238a","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","deployments_url":"https://api.github.com/repos/sharetribe/sharetribe/deployments","created_at":"2012-05-25T15:34:17Z","updated_at":"2016-09-26T16:35:58Z","pushed_at":"2016-09-27T11:49:19Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":117286,"stargazers_count":768,"watchers_count":768,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":518,"mirror_url":null,"open_issues_count":16,"forks":518,"open_issues":16,"watchers":768,"default_branch":"master"}},"base":{"label":"sharetribe:master","ref":"master","sha":"b858d28dd5fc19d39a3f0786c2c4400c5793da43","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","deployments_url":"https://api.github.com/repos/sharetribe/sharetribe/deployments","created_at":"2012-05-25T15:34:17Z","updated_at":"2016-09-26T16:35:58Z","pushed_at":"2016-09-27T11:49:19Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":117286,"stargazers_count":768,"watchers_count":768,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":518,"mirror_url":null,"open_issues_count":16,"forks":518,"open_issues":16,"watchers":768,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2580"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/2580"},"issue":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/2580"},"comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/2580/comments"},"review_comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2580/comments"},"review_comment":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/2580/commits"},"statuses":{"href":"https://api.github.com/repos/sharetribe/sharetribe/statuses/51d3871770012ae46fc947ab8364db4e28b7238a"}}}}
{"actor":{"display_login":"Gnito"}}