{"action":"created","comment":{"url":"https://api.github.com/repos/percy/percy-web/pulls/comments/193487898","pull_request_review_id":126469663,"id":193487898,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzQ4Nzg5OA==","diff_hunk":"@@ -0,0 +1,40 @@\n+import Component from '@ember/component';\n+import EnsureStatefulLogin from 'percy-web/mixins/ensure-stateful-login';\n+import {computed} from '@ember/object';\n+import {inject as service} from '@ember/service';\n+\n+export default Component.extend(EnsureStatefulLogin, {\n+  session: service(),\n+\n+  githubMarketplacePlanId: null, // required\n+\n+  currentUser: computed.alias('session.currentUser'),\n+  githubIdentity: computed.alias('currentUser.hasGithubIdentity'),\n+  hasGithubIdentity: computed.alias('currentUser.hasGithubIdentity.isTruthy'),\n+  isGithubPurchase: computed.notEmpty('githubMarketplacePlanId'),\n+\n+  githubSetupState: computed('isGithubPurchase', 'hasGithubIdentity', function() {\n+    if (!this.get('isGithubPurchase')) {\n+      return 'is-invisible';","path":"app/components/organizations/new-organization.js","position":18,"original_position":18,"commit_id":"60cb787c43efc967ab70ef67ad6d2804b02723d0","original_commit_id":"db4a3f94a17a7ea41b0983ff99242bb2318646ca","user":{"login":"maprules1000","id":1929735,"node_id":"MDQ6VXNlcjE5Mjk3MzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1929735?v=4","gravatar_id":"","url":"https://api.github.com/users/maprules1000","html_url":"https://github.com/maprules1000","followers_url":"https://api.github.com/users/maprules1000/followers","following_url":"https://api.github.com/users/maprules1000/following{/other_user}","gists_url":"https://api.github.com/users/maprules1000/gists{/gist_id}","starred_url":"https://api.github.com/users/maprules1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maprules1000/subscriptions","organizations_url":"https://api.github.com/users/maprules1000/orgs","repos_url":"https://api.github.com/users/maprules1000/repos","events_url":"https://api.github.com/users/maprules1000/events{/privacy}","received_events_url":"https://api.github.com/users/maprules1000/received_events","type":"User","site_admin":false},"body":"I'll get with Derek and discuss. I threw it into js because there's 3 states that can be rendered. We'll either remove a state or I'll figure out a way to put it into the template entirely","created_at":"2018-06-06T17:07:50Z","updated_at":"2018-06-06T17:07:51Z","html_url":"https://github.com/percy/percy-web/pull/573#discussion_r193487898","pull_request_url":"https://api.github.com/repos/percy/percy-web/pulls/573","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/percy/percy-web/pulls/comments/193487898"},"html":{"href":"https://github.com/percy/percy-web/pull/573#discussion_r193487898"},"pull_request":{"href":"https://api.github.com/repos/percy/percy-web/pulls/573"}},"in_reply_to_id":193471022},"pull_request":{"url":"https://api.github.com/repos/percy/percy-web/pulls/573","id":192509447,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNTA5NDQ3","html_url":"https://github.com/percy/percy-web/pull/573","diff_url":"https://github.com/percy/percy-web/pull/573.diff","patch_url":"https://github.com/percy/percy-web/pull/573.patch","issue_url":"https://api.github.com/repos/percy/percy-web/issues/573","number":573,"state":"open","locked":false,"title":"Github Marketplace Purchase","user":{"login":"maprules1000","id":1929735,"node_id":"MDQ6VXNlcjE5Mjk3MzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1929735?v=4","gravatar_id":"","url":"https://api.github.com/users/maprules1000","html_url":"https://github.com/maprules1000","followers_url":"https://api.github.com/users/maprules1000/followers","following_url":"https://api.github.com/users/maprules1000/following{/other_user}","gists_url":"https://api.github.com/users/maprules1000/gists{/gist_id}","starred_url":"https://api.github.com/users/maprules1000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maprules1000/subscriptions","organizations_url":"https://api.github.com/users/maprules1000/orgs","repos_url":"https://api.github.com/users/maprules1000/repos","events_url":"https://api.github.com/users/maprules1000/events{/privacy}","received_events_url":"https://api.github.com/users/maprules1000/received_events","type":"User","site_admin":false},"body":"##  [Clubhouse Card](https://app.clubhouse.io/percy/story/1907/require-github-identity-on-github-marketplace-purchases)\r\n\r\n## Description\r\nThis PR dampens some of the fire of purchasing (and correctly activating) a $99 plan from the github marketplace. Now users that have signed up with a user name and password will be forced to connect their github account before creating an organization.\r\n\r\nThat way we will properly connect the github purchase to the correct organization for billing purposes.\r\n\r\nThis is also a bandaid until the signup flow is redesigned.\r\n\r\nWant to check it out locally? Pull down this branch and use this link: http://dev.percy.local:4200/organizations/new?marketplace_listing_plan_id=9\r\n\r\n## Reviewing this PR\r\n_**Is Covered by Automated Tests?: YESish**_\r\n\r\nThere are tests in place, but manual testing is required to know that all the parts are working together (`percy-web`, `percy-api`, auth0, and github 😬 ).\r\n\r\n\r\n### Manual Testing Steps\r\n\r\n**note: Don't use the production backend for this. Use `percy-api` locally and make sure it's up to date.**\r\n\r\n1. Open up a browser you don't use, or an incognito window. You should be logged out of Percy.\r\n2. You'll need a test account for ~~Team Foundation Server~~ Github. A test account is important because we're going to unlink Percy from that account. It'd be a headache to do it from your main account.\r\n\r\n3. Use this url to start the process: http://dev.percy.local:4200/organizations/new?marketplace_listing_plan_id=9 This is the same url github provides when a user makes a marketplace purchase. Remember, you should be signed out of Percy.\r\n4. Setup a new account with Percy using an email and password.\r\n5. Verify your email **in the same browser session** (ie in the same browser or incognito browser window).\r\n6. Log in with your newly created user\r\n\r\n### The important part of the manual testing\r\n7. You should now see the org creation page with the connect to github section and the create org section below it, greyed out.\r\n8. Connect your github account.\r\n9. You should be redirected back to the org creation page with the github section greyed out and your github user name displayed with a green check.\r\n10. You should be able to create an org now.\r\n\r\n\r\n## Pictures\r\n### Before\r\n![screen shot 2018-06-05 at 2 25 02 pm](https://user-images.githubusercontent.com/1929735/40998171-8a862e2e-68cc-11e8-933a-936ad04318f0.png)\r\n\r\n### After (GitHub not connected)\r\n![screen shot 2018-06-05 at 2 26 24 pm](https://user-images.githubusercontent.com/1929735/40998189-970b472e-68cc-11e8-9766-4fb5ca25bc30.png)\r\n\r\n### After (GitHub Connected)\r\n![screen shot 2018-06-05 at 2 26 38 pm](https://user-images.githubusercontent.com/1929735/40998206-a05239fa-68cc-11e8-8c83-8c2152a9d163.png)\r\n\r\n\r\n\r\n","created_at":"2018-06-04T19:48:38Z","updated_at":"2018-06-06T17:07:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24d088e780ff358e0bdd8626d0458684501f98c3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/percy/percy-web/pulls/573/commits","review_comments_url":"https://api.github.com/repos/percy/percy-web/pulls/573/comments","review_comment_url":"https://api.github.com/repos/percy/percy-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/percy/percy-web/issues/573/comments","statuses_url":"https://api.github.com/repos/percy/percy-web/statuses/60cb787c43efc967ab70ef67ad6d2804b02723d0","head":{"label":"percy:db/gh-marketplace-indentity","ref":"db/gh-marketplace-indentity","sha":"60cb787c43efc967ab70ef67ad6d2804b02723d0","user":{"login":"percy","id":12260884,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMjYwODg0","avatar_url":"https://avatars3.githubusercontent.com/u/12260884?v=4","gravatar_id":"","url":"https://api.github.com/users/percy","html_url":"https://github.com/percy","followers_url":"https://api.github.com/users/percy/followers","following_url":"https://api.github.com/users/percy/following{/other_user}","gists_url":"https://api.github.com/users/percy/gists{/gist_id}","starred_url":"https://api.github.com/users/percy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percy/subscriptions","organizations_url":"https://api.github.com/users/percy/orgs","repos_url":"https://api.github.com/users/percy/repos","events_url":"https://api.github.com/users/percy/events{/privacy}","received_events_url":"https://api.github.com/users/percy/received_events","type":"Organization","site_admin":false},"repo":{"id":26990470,"node_id":"MDEwOlJlcG9zaXRvcnkyNjk5MDQ3MA==","name":"percy-web","full_name":"percy/percy-web","owner":{"login":"percy","id":12260884,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMjYwODg0","avatar_url":"https://avatars3.githubusercontent.com/u/12260884?v=4","gravatar_id":"","url":"https://api.github.com/users/percy","html_url":"https://github.com/percy","followers_url":"https://api.github.com/users/percy/followers","following_url":"https://api.github.com/users/percy/following{/other_user}","gists_url":"https://api.github.com/users/percy/gists{/gist_id}","starred_url":"https://api.github.com/users/percy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percy/subscriptions","organizations_url":"https://api.github.com/users/percy/orgs","repos_url":"https://api.github.com/users/percy/repos","events_url":"https://api.github.com/users/percy/events{/privacy}","received_events_url":"https://api.github.com/users/percy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/percy/percy-web","description":"Percy's frontend web application, built with Ember.","fork":false,"url":"https://api.github.com/repos/percy/percy-web","forks_url":"https://api.github.com/repos/percy/percy-web/forks","keys_url":"https://api.github.com/repos/percy/percy-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/percy/percy-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/percy/percy-web/teams","hooks_url":"https://api.github.com/repos/percy/percy-web/hooks","issue_events_url":"https://api.github.com/repos/percy/percy-web/issues/events{/number}","events_url":"https://api.github.com/repos/percy/percy-web/events","assignees_url":"https://api.github.com/repos/percy/percy-web/assignees{/user}","branches_url":"https://api.github.com/repos/percy/percy-web/branches{/branch}","tags_url":"https://api.github.com/repos/percy/percy-web/tags","blobs_url":"https://api.github.com/repos/percy/percy-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/percy/percy-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/percy/percy-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/percy/percy-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/percy/percy-web/statuses/{sha}","languages_url":"https://api.github.com/repos/percy/percy-web/languages","stargazers_url":"https://api.github.com/repos/percy/percy-web/stargazers","contributors_url":"https://api.github.com/repos/percy/percy-web/contributors","subscribers_url":"https://api.github.com/repos/percy/percy-web/subscribers","subscription_url":"https://api.github.com/repos/percy/percy-web/subscription","commits_url":"https://api.github.com/repos/percy/percy-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/percy/percy-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/percy/percy-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/percy/percy-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/percy/percy-web/contents/{+path}","compare_url":"https://api.github.com/repos/percy/percy-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/percy/percy-web/merges","archive_url":"https://api.github.com/repos/percy/percy-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/percy/percy-web/downloads","issues_url":"https://api.github.com/repos/percy/percy-web/issues{/number}","pulls_url":"https://api.github.com/repos/percy/percy-web/pulls{/number}","milestones_url":"https://api.github.com/repos/percy/percy-web/milestones{/number}","notifications_url":"https://api.github.com/repos/percy/percy-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/percy/percy-web/labels{/name}","releases_url":"https://api.github.com/repos/percy/percy-web/releases{/id}","deployments_url":"https://api.github.com/repos/percy/percy-web/deployments","created_at":"2014-11-22T06:04:29Z","updated_at":"2018-06-05T22:53:35Z","pushed_at":"2018-06-06T16:55:20Z","git_url":"git://github.com/percy/percy-web.git","ssh_url":"git@github.com:percy/percy-web.git","clone_url":"https://github.com/percy/percy-web.git","svn_url":"https://github.com/percy/percy-web","homepage":"https://percy.io","size":14393,"stargazers_count":89,"watchers_count":89,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":17,"open_issues":7,"watchers":89,"default_branch":"master"}},"base":{"label":"percy:master","ref":"master","sha":"c59d075258abce6a8d7d464c3aeff8d132211879","user":{"login":"percy","id":12260884,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMjYwODg0","avatar_url":"https://avatars3.githubusercontent.com/u/12260884?v=4","gravatar_id":"","url":"https://api.github.com/users/percy","html_url":"https://github.com/percy","followers_url":"https://api.github.com/users/percy/followers","following_url":"https://api.github.com/users/percy/following{/other_user}","gists_url":"https://api.github.com/users/percy/gists{/gist_id}","starred_url":"https://api.github.com/users/percy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percy/subscriptions","organizations_url":"https://api.github.com/users/percy/orgs","repos_url":"https://api.github.com/users/percy/repos","events_url":"https://api.github.com/users/percy/events{/privacy}","received_events_url":"https://api.github.com/users/percy/received_events","type":"Organization","site_admin":false},"repo":{"id":26990470,"node_id":"MDEwOlJlcG9zaXRvcnkyNjk5MDQ3MA==","name":"percy-web","full_name":"percy/percy-web","owner":{"login":"percy","id":12260884,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMjYwODg0","avatar_url":"https://avatars3.githubusercontent.com/u/12260884?v=4","gravatar_id":"","url":"https://api.github.com/users/percy","html_url":"https://github.com/percy","followers_url":"https://api.github.com/users/percy/followers","following_url":"https://api.github.com/users/percy/following{/other_user}","gists_url":"https://api.github.com/users/percy/gists{/gist_id}","starred_url":"https://api.github.com/users/percy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/percy/subscriptions","organizations_url":"https://api.github.com/users/percy/orgs","repos_url":"https://api.github.com/users/percy/repos","events_url":"https://api.github.com/users/percy/events{/privacy}","received_events_url":"https://api.github.com/users/percy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/percy/percy-web","description":"Percy's frontend web application, built with Ember.","fork":false,"url":"https://api.github.com/repos/percy/percy-web","forks_url":"https://api.github.com/repos/percy/percy-web/forks","keys_url":"https://api.github.com/repos/percy/percy-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/percy/percy-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/percy/percy-web/teams","hooks_url":"https://api.github.com/repos/percy/percy-web/hooks","issue_events_url":"https://api.github.com/repos/percy/percy-web/issues/events{/number}","events_url":"https://api.github.com/repos/percy/percy-web/events","assignees_url":"https://api.github.com/repos/percy/percy-web/assignees{/user}","branches_url":"https://api.github.com/repos/percy/percy-web/branches{/branch}","tags_url":"https://api.github.com/repos/percy/percy-web/tags","blobs_url":"https://api.github.com/repos/percy/percy-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/percy/percy-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/percy/percy-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/percy/percy-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/percy/percy-web/statuses/{sha}","languages_url":"https://api.github.com/repos/percy/percy-web/languages","stargazers_url":"https://api.github.com/repos/percy/percy-web/stargazers","contributors_url":"https://api.github.com/repos/percy/percy-web/contributors","subscribers_url":"https://api.github.com/repos/percy/percy-web/subscribers","subscription_url":"https://api.github.com/repos/percy/percy-web/subscription","commits_url":"https://api.github.com/repos/percy/percy-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/percy/percy-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/percy/percy-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/percy/percy-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/percy/percy-web/contents/{+path}","compare_url":"https://api.github.com/repos/percy/percy-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/percy/percy-web/merges","archive_url":"https://api.github.com/repos/percy/percy-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/percy/percy-web/downloads","issues_url":"https://api.github.com/repos/percy/percy-web/issues{/number}","pulls_url":"https://api.github.com/repos/percy/percy-web/pulls{/number}","milestones_url":"https://api.github.com/repos/percy/percy-web/milestones{/number}","notifications_url":"https://api.github.com/repos/percy/percy-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/percy/percy-web/labels{/name}","releases_url":"https://api.github.com/repos/percy/percy-web/releases{/id}","deployments_url":"https://api.github.com/repos/percy/percy-web/deployments","created_at":"2014-11-22T06:04:29Z","updated_at":"2018-06-05T22:53:35Z","pushed_at":"2018-06-06T16:55:20Z","git_url":"git://github.com/percy/percy-web.git","ssh_url":"git@github.com:percy/percy-web.git","clone_url":"https://github.com/percy/percy-web.git","svn_url":"https://github.com/percy/percy-web","homepage":"https://percy.io","size":14393,"stargazers_count":89,"watchers_count":89,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":17,"open_issues":7,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/percy/percy-web/pulls/573"},"html":{"href":"https://github.com/percy/percy-web/pull/573"},"issue":{"href":"https://api.github.com/repos/percy/percy-web/issues/573"},"comments":{"href":"https://api.github.com/repos/percy/percy-web/issues/573/comments"},"review_comments":{"href":"https://api.github.com/repos/percy/percy-web/pulls/573/comments"},"review_comment":{"href":"https://api.github.com/repos/percy/percy-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/percy/percy-web/pulls/573/commits"},"statuses":{"href":"https://api.github.com/repos/percy/percy-web/statuses/60cb787c43efc967ab70ef67ad6d2804b02723d0"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"maprules1000"}}