{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/228907832","pull_request_review_id":169268776,"id":228907832,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODkwNzgzMg==","diff_hunk":"@@ -3,34 +3,302 @@\n /**\n  * External dependencies\n  */\n+import get from 'lodash/get';\n+import { __ } from '@wordpress/i18n';\n import { Component, Fragment } from '@wordpress/element';\n-import { withInstanceId } from '@wordpress/compose';\n+import { compose, withInstanceId } from '@wordpress/compose';\n+import { Panel, PanelBody, PanelRow } from '@wordpress/components';\n+import { withSelect } from '@wordpress/data';\n+import apiFetch from '@wordpress/api-fetch';\n+\n+/**\n+ * Internal dependencies\n+ */\n+import { SIMPLE_PAYMENTS_PRODUCT_POST_TYPE } from 'lib/simple-payments/constants';\n \n class Edit extends Component {\n-\thandleChange = event => {\n-\t\tconst paymentId = parseInt( event.target.value, 10 );\n-\t\tif ( paymentId ) {\n-\t\t\tthis.props.setAttributes( { paymentId } );\n+\tconstructor() {\n+\t\tsuper( ...arguments );\n+\t\tthis.state = {\n+\t\t\tsavingProduct: false,\n+\t\t};\n+\t}\n+\n+\tcomponentDidUpdate( prevProps ) {\n+\t\tconst { simplePayment, attributes, setAttributes, isSelected, isSaving } = this.props;\n+\n+\t\tif ( ! prevProps.simplePayment && simplePayment ) {\n+\t\t\tsetAttributes( {\n+\t\t\t\tdescription: get( simplePayment, 'content.raw', attributes.description ),\n+\t\t\t\tcurrency: get( simplePayment, 'meta.spay_currency', attributes.currency ),\n+\t\t\t\temail: get( simplePayment, 'meta.spay_email', attributes.email ),\n+\t\t\t\tformattedPrice: get(\n+\t\t\t\t\tsimplePayment,\n+\t\t\t\t\t'meta.spay_formatted_price',\n+\t\t\t\t\tattributes.formattedPrice\n+\t\t\t\t),\n+\t\t\t\tmultiple: get( simplePayment, 'meta.spay_multiple', attributes.multiple ),\n+\t\t\t\tprice: get( simplePayment, 'meta.spay_price', attributes.price ),\n+\t\t\t\ttitle: get( simplePayment, 'title.raw', attributes.title ),\n+\t\t\t} );\n+\t\t}\n+\n+\t\t// Saves on block-deselect and when editor is saving a post\n+\t\tif ( ( prevProps.isSelected && ! isSelected ) || ( prevProps.isSaving && ! isSaving ) ) {\n+\t\t\tthis.savePayment();\n+\t\t}\n+\t}\n+\n+\tattributesToPost = attributes => {\n+\t\tconst { title, description, currency, price, email, multiple } = attributes;\n+\n+\t\treturn {\n+\t\t\ttitle,\n+\t\t\tstatus: 'publish',\n+\t\t\tcontent: description,\n+\t\t\tfeatured_media: 0,\n+\t\t\tmeta: {\n+\t\t\t\tspay_currency: currency,\n+\t\t\t\tspay_email: email,\n+\t\t\t\tspay_formatted_price: this.formatPrice( price ),\n+\t\t\t\tspay_multiple: multiple,\n+\t\t\t\tspay_price: price,\n+\t\t\t},\n+\t\t};\n+\t};\n+\n+\tsavePayment = async () => {\n+\t\tif ( this.state.savingProduct ) {\n+\t\t\treturn;\n+\t\t}\n+\n+\t\tthis.setState( { savingProduct: true } );\n+\n+\t\tconst { attributes, setAttributes } = this.props;\n+\t\tconst { paymentId } = attributes;\n+\n+\t\t// @TODO field validation\n+\n+\t\tconst path = `/wp/v2/${ SIMPLE_PAYMENTS_PRODUCT_POST_TYPE }/${ paymentId ? paymentId : '' }`;\n+\n+\t\ttry {\n+\t\t\t// @TODO: then/catch\n+\t\t\tconst { id } = await apiFetch( {\n+\t\t\t\tpath,\n+\t\t\t\tmethod: 'POST',\n+\t\t\t\tdata: this.attributesToPost( attributes ),\n+\t\t\t} );\n+\n+\t\t\tthis.setState( { savingProduct: false } );\n+\n+\t\t\tif ( id ) {\n+\t\t\t\tsetAttributes( { paymentId: id } );\n+\t\t\t}\n+\t\t} catch ( err ) {\n+\t\t\t// @TODO: error handling\n+\t\t\tthis.setState( { savingProduct: false } );\n+\t\t}\n+\t};\n+\n+\t// @FIXME: toFixed should be replaced with proper decimal calculations. See simple-payments/form\n+\t// const { precision } = getCurrencyDefaults( values.currency );\n+\tformatPrice = price => {\n+\t\tprice = parseInt( price, 10 );\n+\t\treturn ! isNaN( price ) ? '$' + price.toFixed( 2 ) : '';\n+\t};\n+\n+\thandleEmailChange = event => {\n+\t\tthis.props.setAttributes( { email: event.target.value } );\n+\t};\n+\n+\thandleDescriptionChange = event => {\n+\t\tthis.props.setAttributes( { description: event.target.value } );\n+\t};\n+\n+\thandlePriceChange = event => {\n+\t\tconst price = parseInt( event.target.value, 10 );\n+\t\tif ( ! isNaN( price ) ) {\n+\t\t\tthis.props.setAttributes( {\n+\t\t\t\tformattedPrice: this.formatPrice( event.target.value ),\n+\t\t\t\tprice,\n+\t\t\t} );\n \t\t} else {\n-\t\t\tthis.props.setAttributes( { paymentId: undefined } );\n+\t\t\tthis.props.setAttributes( {\n+\t\t\t\tformattedPrice: '',\n+\t\t\t\tprice: undefined,\n+\t\t\t} );\n \t\t}\n \t};\n \n+\thandleCurrencyChange = event => {\n+\t\tthis.props.setAttributes( {\n+\t\t\tcurrency: event.target.value,\n+\t\t\tformattedPrice: this.formatPrice( this.props.attributes.price ),\n+\t\t} );\n+\t};\n+\n+\thandleMultipleChange = event => {\n+\t\tthis.props.setAttributes( { multiple: event.target.checked ? 1 : 0 } );\n+\t};\n+\n+\thandleTitleChange = event => {\n+\t\tthis.props.setAttributes( { title: event.target.value } );\n+\t};\n+\n \trender() {\n-\t\tconst { attributes, instanceId } = this.props;\n-\t\tconst inputId = `payment-id-${ instanceId }`;\n+\t\tconst { attributes, instanceId, isSelected } = this.props;\n+\t\tconst {\n+\t\t\tcurrency,\n+\t\t\tdescription,\n+\t\t\temail,\n+\t\t\tformattedPrice,\n+\t\t\tmultiple,\n+\t\t\tpaymentId,\n+\t\t\tprice,\n+\t\t\ttitle,\n+\t\t} = attributes;\n+\t\tconst baseId = `simplepayments-${ instanceId }`;\n+\t\tconst currencyId = `${ baseId }__currency`;\n+\t\tconst descriptionId = `${ baseId }__description`;\n+\t\tconst emailId = `${ baseId }__email`;\n+\t\tconst multipleId = `${ baseId }__multiple`;\n+\t\tconst priceId = `${ baseId }__price`;\n+\t\tconst titleId = `${ baseId }__title`;\n+\n+\t\tif ( ! isSelected ) {\n+\t\t\t// @TODO component\n+\t\t\treturn (","path":"client/gutenberg/extensions/simple-payments/edit.js","position":176,"original_position":176,"commit_id":"382bc16a1b222f58d0f0aff658ad7b0a5c906abe","original_commit_id":"382bc16a1b222f58d0f0aff658ad7b0a5c906abe","user":{"login":"tyxla","id":8436925,"node_id":"MDQ6VXNlcjg0MzY5MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/8436925?v=4","gravatar_id":"","url":"https://api.github.com/users/tyxla","html_url":"https://github.com/tyxla","followers_url":"https://api.github.com/users/tyxla/followers","following_url":"https://api.github.com/users/tyxla/following{/other_user}","gists_url":"https://api.github.com/users/tyxla/gists{/gist_id}","starred_url":"https://api.github.com/users/tyxla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyxla/subscriptions","organizations_url":"https://api.github.com/users/tyxla/orgs","repos_url":"https://api.github.com/users/tyxla/repos","events_url":"https://api.github.com/users/tyxla/events{/privacy}","received_events_url":"https://api.github.com/users/tyxla/received_events","type":"User","site_admin":false},"body":"I'm expecting this is a WIP at this time? Would be even better if we split it off in a separate component before merging, to make it easier for iteration with less chance for conflicts.\r\n\r\nEssentially, the more we componentize here, the better it becomes for iteration and reusability.","created_at":"2018-10-29T12:40:33Z","updated_at":"2018-10-29T12:50:23Z","html_url":"https://github.com/Automattic/wp-calypso/pull/28065#discussion_r228907832","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/28065","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/228907832"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/28065#discussion_r228907832"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/28065"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/28065","id":225530037,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NTMwMDM3","html_url":"https://github.com/Automattic/wp-calypso/pull/28065","diff_url":"https://github.com/Automattic/wp-calypso/pull/28065.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/28065.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/28065","number":28065,"state":"open","locked":false,"title":"Gutenberg: Simple payment read/save/update","user":{"login":"sirreal","id":841763,"node_id":"MDQ6VXNlcjg0MTc2Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/841763?v=4","gravatar_id":"","url":"https://api.github.com/users/sirreal","html_url":"https://github.com/sirreal","followers_url":"https://api.github.com/users/sirreal/followers","following_url":"https://api.github.com/users/sirreal/following{/other_user}","gists_url":"https://api.github.com/users/sirreal/gists{/gist_id}","starred_url":"https://api.github.com/users/sirreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirreal/subscriptions","organizations_url":"https://api.github.com/users/sirreal/orgs","repos_url":"https://api.github.com/users/sirreal/repos","events_url":"https://api.github.com/users/sirreal/events{/privacy}","received_events_url":"https://api.github.com/users/sirreal/received_events","type":"User","site_admin":false},"body":"#### Changes proposed in this Pull Request\r\n\r\n* Add some simple UI to modify block attributes\r\n\r\n* Read, create and update simple payment posts 😵\r\n\r\n* This is not intended as a finalized UI, but a step to help with development.\r\n\r\n*  Existing wpcom flows are used, they should be swapped for more current Gutenberg approaches in the future.\r\n\r\n* There are lots of FIXME and TODO comments, but this works behind the `gutenberg/block/simple-payments` feature flag 👍 \r\n\r\n* This works in both local Jetpack's wp-admin Gutenberg as well Calypso-Gutenberg.\r\n\r\n* Depends on Jetpack changes to Simple Payments API:\r\n    - https://github.com/Automattic/jetpack/pull/10402\r\n    - D19907-code\r\n\r\n\r\n## Testing instructions\r\n\r\n### Test in Jetpack\r\n* Jurassic Ninja: https://jurassic.ninja/create?jetpack-beta&branch=update/simple-payments-rest-api-meta&gutenpack&gutenberg&calypsobranch=add/gutenpack-simplepayments-edit-ui\r\n* Connect Jetpack, purchase \"premium\" or \"business\" plan\r\n* Create new post in Gutenberg and add \"Payment button\" block\r\n* Open the post and see the button\r\n* Open the post in Calypso classic editor and see the button\r\n* Open the post in Calypso using this branch and Gutenberg and see the button: https://calypso.live/gutenberg/post?branch=add/gutenpack-simplepayments-edit-ui\r\n\r\n### Test in Calypso\r\n- Apply patch to your sandbox: D19907-code\r\n- Open https://calypso.live/gutenberg/post?branch=add/gutenpack-simplepayments-edit-ui\r\n- Choose a site with Simple payments enabled (purchase \"premium\" or \"business\" plan)\r\n\r\n### Manual checking\r\nApply these patches and cross-test the block in different editors:\r\n- This PR\r\n- https://github.com/Automattic/jetpack/pull/10402\r\n- D19907-code\r\n\r\n## Checklist:\r\n* Play with the Simple Payments block and see if attributes update\r\n* A new payment should save a new post. Watch network requests.\r\n* Update and watch it save again.\r\n* The save/update are triggered when the block is deselected or editor's post gets updated\r\n* Save the post and see the page: you should see simple payments button\r\n* Refresh the editor page, note how block pulls in info from API and ignores block `attributes`: you can test this by removing or mocking attributes in the editor's code-editor, saving the post while in code-editor and reloading the page again.","created_at":"2018-10-24T19:54:20Z","updated_at":"2018-10-29T12:50:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1619d2a81f41a9286a5a93fa07a455ad6a3bee84","assignee":{"login":"simison","id":87168,"node_id":"MDQ6VXNlcjg3MTY4","avatar_url":"https://avatars3.githubusercontent.com/u/87168?v=4","gravatar_id":"","url":"https://api.github.com/users/simison","html_url":"https://github.com/simison","followers_url":"https://api.github.com/users/simison/followers","following_url":"https://api.github.com/users/simison/following{/other_user}","gists_url":"https://api.github.com/users/simison/gists{/gist_id}","starred_url":"https://api.github.com/users/simison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simison/subscriptions","organizations_url":"https://api.github.com/users/simison/orgs","repos_url":"https://api.github.com/users/simison/repos","events_url":"https://api.github.com/users/simison/events{/privacy}","received_events_url":"https://api.github.com/users/simison/received_events","type":"User","site_admin":false},"assignees":[{"login":"simison","id":87168,"node_id":"MDQ6VXNlcjg3MTY4","avatar_url":"https://avatars3.githubusercontent.com/u/87168?v=4","gravatar_id":"","url":"https://api.github.com/users/simison","html_url":"https://github.com/simison","followers_url":"https://api.github.com/users/simison/followers","following_url":"https://api.github.com/users/simison/following{/other_user}","gists_url":"https://api.github.com/users/simison/gists{/gist_id}","starred_url":"https://api.github.com/users/simison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simison/subscriptions","organizations_url":"https://api.github.com/users/simison/orgs","repos_url":"https://api.github.com/users/simison/repos","events_url":"https://api.github.com/users/simison/events{/privacy}","received_events_url":"https://api.github.com/users/simison/received_events","type":"User","site_admin":false},{"login":"sirreal","id":841763,"node_id":"MDQ6VXNlcjg0MTc2Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/841763?v=4","gravatar_id":"","url":"https://api.github.com/users/sirreal","html_url":"https://github.com/sirreal","followers_url":"https://api.github.com/users/sirreal/followers","following_url":"https://api.github.com/users/sirreal/following{/other_user}","gists_url":"https://api.github.com/users/sirreal/gists{/gist_id}","starred_url":"https://api.github.com/users/sirreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirreal/subscriptions","organizations_url":"https://api.github.com/users/sirreal/orgs","repos_url":"https://api.github.com/users/sirreal/repos","events_url":"https://api.github.com/users/sirreal/events{/privacy}","received_events_url":"https://api.github.com/users/sirreal/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":780071208,"node_id":"MDU6TGFiZWw3ODAwNzEyMDg=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Simple%20Payments","name":"Simple Payments","color":"006b75","default":false},{"id":967391996,"node_id":"MDU6TGFiZWw5NjczOTE5OTY=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Goal]%20Gutenberg","name":"[Goal] Gutenberg","color":"97f4d2","default":false},{"id":285010017,"node_id":"MDU6TGFiZWwyODUwMTAwMTc=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20In%20Progress","name":"[Status] In Progress","color":"207de5","default":false},{"id":285010018,"node_id":"MDU6TGFiZWwyODUwMTAwMTg=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false},{"id":967395476,"node_id":"MDU6TGFiZWw5NjczOTU0NzY=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Feature%20progress","name":"[Type] Feature progress","color":"c7def8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/28065/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/28065/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/28065/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/382bc16a1b222f58d0f0aff658ad7b0a5c906abe","head":{"label":"Automattic:add/gutenpack-simplepayments-edit-ui","ref":"add/gutenpack-simplepayments-edit-ui","sha":"382bc16a1b222f58d0f0aff658ad7b0a5c906abe","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","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":45936895,"node_id":"MDEwOlJlcG9zaXRvcnk0NTkzNjg5NQ==","name":"wp-calypso","full_name":"Automattic/wp-calypso","private":false,"owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","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},"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-10-29T12:46:31Z","pushed_at":"2018-10-29T12:47:21Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":115252,"stargazers_count":10534,"watchers_count":10534,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1484,"mirror_url":null,"archived":false,"open_issues_count":1642,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":1484,"open_issues":1642,"watchers":10534,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"116678c2b3f7c4b0844fd181da8c96d28f3f6417","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","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":45936895,"node_id":"MDEwOlJlcG9zaXRvcnk0NTkzNjg5NQ==","name":"wp-calypso","full_name":"Automattic/wp-calypso","private":false,"owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","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},"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-10-29T12:46:31Z","pushed_at":"2018-10-29T12:47:21Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":115252,"stargazers_count":10534,"watchers_count":10534,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1484,"mirror_url":null,"archived":false,"open_issues_count":1642,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":1484,"open_issues":1642,"watchers":10534,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/28065"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/28065"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/28065"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/28065/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/28065/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/28065/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/382bc16a1b222f58d0f0aff658ad7b0a5c906abe"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tyxla"}}