{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/comments/87886163","pull_request_review_id":8476559,"id":87886163,"diff_hunk":"@@ -68,11 +68,29 @@ const PackageInfo = ( { packageId, selected, all, unpacked, dimensionUnit, weigh\n \t\t\treturn ( <div className=\"wcc-package__desc\"><span className=\"wcc-package__desc-name\">Package - </span><span className=\"wcc-package__desc-dimensions\">{ renderPackageDimensions( pckg, dimensionUnit ) }</span></div> );\n \t\t}\n \n-\t\tconst packageOptions = _.map( all, renderPackageOption );\n+\t\tconst groups = _.reduce( flatRateGroups, ( result, groupTitle, groupId ) => {\n+\t\t\tresult[ groupId ] = { title: groupTitle, definitions: {} };\n+\t\t\treturn result;\n+\t\t}, {\n+\t\t\tcustom: { title: __( 'Custom Packages' ), definitions: {} },\n+\t\t} );\n+\n+\t\t_.forEach( all, ( groupPckg, groupPckgId ) => {\n+\t\t\tconst group = groupPckg.group_id ? groups[ groupPckg.group_id ] : groups.custom;\n+\t\t\tgroup.definitions[ groupPckgId ] = groupPckg;","path":"client/shipping-label/views/purchase/steps/packages/package-info.js","position":23,"original_position":23,"commit_id":"79d9dd2891134a447ca98e988ba053709119b68c","original_commit_id":"79d9dd2891134a447ca98e988ba053709119b68c","user":{"login":"jeffstieler","id":63922,"avatar_url":"https://avatars.githubusercontent.com/u/63922?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffstieler","html_url":"https://github.com/jeffstieler","followers_url":"https://api.github.com/users/jeffstieler/followers","following_url":"https://api.github.com/users/jeffstieler/following{/other_user}","gists_url":"https://api.github.com/users/jeffstieler/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffstieler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffstieler/subscriptions","organizations_url":"https://api.github.com/users/jeffstieler/orgs","repos_url":"https://api.github.com/users/jeffstieler/repos","events_url":"https://api.github.com/users/jeffstieler/events{/privacy}","received_events_url":"https://api.github.com/users/jeffstieler/received_events","type":"User","site_admin":false},"body":"Consider using `_.filter()` to build group definitions, and bring it into the above `_.reduce()` call. You should be able to determine group packages by: `_.filter( all, { group_id: groupId } )`.","created_at":"2016-11-14T20:31:18Z","updated_at":"2016-11-14T20:32:07Z","html_url":"https://github.com/Automattic/woocommerce-connect-client/pull/683#discussion_r87886163","pull_request_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/683","_links":{"self":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/comments/87886163"},"html":{"href":"https://github.com/Automattic/woocommerce-connect-client/pull/683#discussion_r87886163"},"pull_request":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/683"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/683","id":93162728,"html_url":"https://github.com/Automattic/woocommerce-connect-client/pull/683","diff_url":"https://github.com/Automattic/woocommerce-connect-client/pull/683.diff","patch_url":"https://github.com/Automattic/woocommerce-connect-client/pull/683.patch","issue_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues/683","number":683,"state":"open","locked":false,"title":"Add flat rate packages to labels","user":{"login":"robobot3000","id":800604,"avatar_url":"https://avatars.githubusercontent.com/u/800604?v=3","gravatar_id":"","url":"https://api.github.com/users/robobot3000","html_url":"https://github.com/robobot3000","followers_url":"https://api.github.com/users/robobot3000/followers","following_url":"https://api.github.com/users/robobot3000/following{/other_user}","gists_url":"https://api.github.com/users/robobot3000/gists{/gist_id}","starred_url":"https://api.github.com/users/robobot3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robobot3000/subscriptions","organizations_url":"https://api.github.com/users/robobot3000/orgs","repos_url":"https://api.github.com/users/robobot3000/repos","events_url":"https://api.github.com/users/robobot3000/events{/privacy}","received_events_url":"https://api.github.com/users/robobot3000/received_events","type":"User","site_admin":false},"body":"Adds #671\r\n\r\nTest with https://github.com/Automattic/woocommerce-connect-server/pull/625 \r\n\r\nTo test:\r\n* open the label print UI\r\n* verify that the flat rate packages appear in the packaging editor\r\n  * at the moment all flat rate packages are shown, regardless of what has been enabled/disabled in the packaging manager\r\n* select one or more flat rate packages\r\n* verify that the prices that appear are for flat rate deliveries\r\n* check that purchasing a label works","created_at":"2016-11-10T14:42:15Z","updated_at":"2016-11-14T20:32:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21135811e68e6df2631149c9f374a1bba481b56d","assignee":{"login":"robobot3000","id":800604,"avatar_url":"https://avatars.githubusercontent.com/u/800604?v=3","gravatar_id":"","url":"https://api.github.com/users/robobot3000","html_url":"https://github.com/robobot3000","followers_url":"https://api.github.com/users/robobot3000/followers","following_url":"https://api.github.com/users/robobot3000/following{/other_user}","gists_url":"https://api.github.com/users/robobot3000/gists{/gist_id}","starred_url":"https://api.github.com/users/robobot3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robobot3000/subscriptions","organizations_url":"https://api.github.com/users/robobot3000/orgs","repos_url":"https://api.github.com/users/robobot3000/repos","events_url":"https://api.github.com/users/robobot3000/events{/privacy}","received_events_url":"https://api.github.com/users/robobot3000/received_events","type":"User","site_admin":false},"assignees":[{"login":"robobot3000","id":800604,"avatar_url":"https://avatars.githubusercontent.com/u/800604?v=3","gravatar_id":"","url":"https://api.github.com/users/robobot3000","html_url":"https://github.com/robobot3000","followers_url":"https://api.github.com/users/robobot3000/followers","following_url":"https://api.github.com/users/robobot3000/following{/other_user}","gists_url":"https://api.github.com/users/robobot3000/gists{/gist_id}","starred_url":"https://api.github.com/users/robobot3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robobot3000/subscriptions","organizations_url":"https://api.github.com/users/robobot3000/orgs","repos_url":"https://api.github.com/users/robobot3000/repos","events_url":"https://api.github.com/users/robobot3000/events{/privacy}","received_events_url":"https://api.github.com/users/robobot3000/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/683/commits","review_comments_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/683/comments","review_comment_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues/683/comments","statuses_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/statuses/79d9dd2891134a447ca98e988ba053709119b68c","head":{"label":"Automattic:add/flat-rate-labels","ref":"add/flat-rate-labels","sha":"79d9dd2891134a447ca98e988ba053709119b68c","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":50946955,"name":"woocommerce-connect-client","full_name":"Automattic/woocommerce-connect-client","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/woocommerce-connect-client","description":"WooCommerce Connect is a feature plugin, currently in Alpha, that integrates the WooCommerce Connect SaaS into WooCommerce (2.6), Alpha includes real time USPS and Canada Post shipping rates and introduces our React based UI.","fork":false,"url":"https://api.github.com/repos/Automattic/woocommerce-connect-client","forks_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/forks","keys_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/teams","hooks_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/hooks","issue_events_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/events","assignees_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/tags","blobs_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/languages","stargazers_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/stargazers","contributors_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/contributors","subscribers_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/subscribers","subscription_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/subscription","commits_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/merges","archive_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/downloads","issues_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/deployments","created_at":"2016-02-02T19:44:26Z","updated_at":"2016-11-10T17:24:19Z","pushed_at":"2016-11-14T14:26:28Z","git_url":"git://github.com/Automattic/woocommerce-connect-client.git","ssh_url":"git@github.com:Automattic/woocommerce-connect-client.git","clone_url":"https://github.com/Automattic/woocommerce-connect-client.git","svn_url":"https://github.com/Automattic/woocommerce-connect-client","homepage":"","size":2976,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":121,"forks":2,"open_issues":121,"watchers":34,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"480f2e20f724c001f04e020a6540e45789b09367","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":50946955,"name":"woocommerce-connect-client","full_name":"Automattic/woocommerce-connect-client","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/woocommerce-connect-client","description":"WooCommerce Connect is a feature plugin, currently in Alpha, that integrates the WooCommerce Connect SaaS into WooCommerce (2.6), Alpha includes real time USPS and Canada Post shipping rates and introduces our React based UI.","fork":false,"url":"https://api.github.com/repos/Automattic/woocommerce-connect-client","forks_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/forks","keys_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/teams","hooks_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/hooks","issue_events_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/events","assignees_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/tags","blobs_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/languages","stargazers_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/stargazers","contributors_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/contributors","subscribers_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/subscribers","subscription_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/subscription","commits_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/merges","archive_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/downloads","issues_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/woocommerce-connect-client/deployments","created_at":"2016-02-02T19:44:26Z","updated_at":"2016-11-10T17:24:19Z","pushed_at":"2016-11-14T14:26:28Z","git_url":"git://github.com/Automattic/woocommerce-connect-client.git","ssh_url":"git@github.com:Automattic/woocommerce-connect-client.git","clone_url":"https://github.com/Automattic/woocommerce-connect-client.git","svn_url":"https://github.com/Automattic/woocommerce-connect-client","homepage":"","size":2976,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":121,"forks":2,"open_issues":121,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/683"},"html":{"href":"https://github.com/Automattic/woocommerce-connect-client/pull/683"},"issue":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues/683"},"comments":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/issues/683/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/683/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/pulls/683/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/woocommerce-connect-client/statuses/79d9dd2891134a447ca98e988ba053709119b68c"}}}}
{"actor":{"display_login":"jeffstieler"}}