{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9156","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9156/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9156/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9156/events","html_url":"https://github.com/Automattic/wp-calypso/pull/9156","id":187344116,"number":9156,"title":"Me: Add EditGravatar to profile under feature flag","user":{"login":"v18","id":11487924,"avatar_url":"https://avatars.githubusercontent.com/u/11487924?v=3","gravatar_id":"","url":"https://api.github.com/users/v18","html_url":"https://github.com/v18","followers_url":"https://api.github.com/users/v18/followers","following_url":"https://api.github.com/users/v18/following{/other_user}","gists_url":"https://api.github.com/users/v18/gists{/gist_id}","starred_url":"https://api.github.com/users/v18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/v18/subscriptions","organizations_url":"https://api.github.com/users/v18/orgs","repos_url":"https://api.github.com/users/v18/repos","events_url":"https://api.github.com/users/v18/events{/privacy}","received_events_url":"https://api.github.com/users/v18/received_events","type":"User","site_admin":false},"labels":[{"id":285010028,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Me","name":"Me","color":"006b75","default":false},{"id":285010018,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-04T14:15:40Z","updated_at":"2016-11-07T21:37:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/9156","html_url":"https://github.com/Automattic/wp-calypso/pull/9156","diff_url":"https://github.com/Automattic/wp-calypso/pull/9156.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/9156.patch"},"body":"This PR adds a new component, `EditGravatar`, and uses it in Me > My Profile under a feature flag.\r\n\r\nThe component lets a user upload a new image as their Gravatar. It will show either a success or failure message.\r\n\r\n## How to Test\r\n\r\n1. Make sure that nothing is changed on `/me` when the feature flag is turned off\r\n2. Enable the feature flag, and make sure you can see the new section under `/me` using `ENABLE_FEATURES=me/edit-gravatar make run`\r\n3. Get a bearer token using this script:\r\n    ```\r\n    curl -# -X POST --data-urlencode \"grant_type=password\" --data-urlencode \"client_id=appid\" --data-urlencode \"client_secret=appsecret\" --data-urlencode \"username=username\" --data-urlencode \"password=password\" https://public-api.wordpress.com/oauth2/token\r\n    ```\r\n    You can use Calypso's app ID & secret, found [here](https://github.com/Automattic/wp-calypso/blob/a1c610c300e040a2c101bb5af6a66f7cd72b52d6/config/production.json#L108-L109).\r\n    If you have 2FA enabled, you can add this extra parameter to the call: `--data-urlencode     \"wpcom_otp=one-time-password\"`, or you can create a new application password to use instead.\r\n4. Save the bearer token to localStorage using `localStorage.setItem('bearerToken', 'your_bearer_token');`\r\n\r\n5. On `/me`, click on 'Select Image' to make sure the component works. You can check if the new Gravatar was uploaded at http://en.gravatar.com/emails/\r\n\r\n6. Try to use a bad image, see that you get an error message\r\n\r\n7. Watch out for any errors in the console\r\n\r\n## Background\r\n\r\nThis PR is made up of the two first commits from #8456. That PR had to be reverted due to changes made in `<Gravatar />` in https://github.com/Automattic/wp-calypso/pull/8456/commits/4672d9fa6371b1f5590084287eb61c3d71045257. Those changes will be introduced in two new PRs after this one: one for adding the local image to the state, and one for changing `<Gravatar />`.\r\n\r\ncc @gwwar"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/258970729","html_url":"https://github.com/Automattic/wp-calypso/pull/9156#issuecomment-258970729","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/9156","id":258970729,"user":{"login":"gwwar","id":1270189,"avatar_url":"https://avatars.githubusercontent.com/u/1270189?v=3","gravatar_id":"","url":"https://api.github.com/users/gwwar","html_url":"https://github.com/gwwar","followers_url":"https://api.github.com/users/gwwar/followers","following_url":"https://api.github.com/users/gwwar/following{/other_user}","gists_url":"https://api.github.com/users/gwwar/gists{/gist_id}","starred_url":"https://api.github.com/users/gwwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwwar/subscriptions","organizations_url":"https://api.github.com/users/gwwar/orgs","repos_url":"https://api.github.com/users/gwwar/repos","events_url":"https://api.github.com/users/gwwar/events{/privacy}","received_events_url":"https://api.github.com/users/gwwar/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T21:37:39Z","updated_at":"2016-11-07T21:37:39Z","body":"👍  Looks good. Ping me when you're ready to merge."}}
{"actor":{"display_login":"gwwar"}}