{"action":"created","comment":{"url":"https://api.github.com/repos/houndci/hound/pulls/comments/197908925","pull_request_review_id":131744404,"id":197908925,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzkwODkyNQ==","diff_hunk":"@@ -0,0 +1,134 @@\n+require \"lib/github_api\"\n+require \"app/models/app_token\"\n+require \"app/models/markeplace_plan\"\n+\n+RSpec.describe MarketplacePlan do\n+  describe \"#current_plan\" do\n+    context \"when account subscribes to a plan\" do\n+      it \"returns the subscribed plan\" do\n+        owner = instance_double(\"Owner\", github_id: 12345)\n+        markeplace_plan = described_class.new(owner)\n+        current_github_plan = double(id: MarketplacePlan::PLANS[1][:id])\n+        stub_github_api(current_github_plan)\n+\n+        expect(markeplace_plan.current_plan).to eq(MarketplacePlan::PLANS[1])\n+      end\n+    end\n+\n+    context \"when account does not subscribe to a plan\" do\n+      it \"returns the first plan\" do\n+        owner = instance_double(\"Owner\", github_id: 12345)\n+        markeplace_plan = described_class.new(owner)\n+        stub_github_api(nil)\n+\n+        expect(markeplace_plan.current_plan).to eq(MarketplacePlan::PLANS[0])\n+      end\n+    end\n+  end\n+\n+  describe \"#next_plan\" do","path":"spec/models/marketplace_plan_spec.rb","position":29,"original_position":29,"commit_id":"9e8cf37c120a57e0aad5b4e18a34da375634320b","original_commit_id":"9e8cf37c120a57e0aad5b4e18a34da375634320b","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"describe##next_plan is a complex method","created_at":"2018-06-25T19:08:21Z","updated_at":"2018-06-25T19:08:23Z","html_url":"https://github.com/houndci/hound/pull/1554#discussion_r197908925","pull_request_url":"https://api.github.com/repos/houndci/hound/pulls/1554","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/houndci/hound/pulls/comments/197908925"},"html":{"href":"https://github.com/houndci/hound/pull/1554#discussion_r197908925"},"pull_request":{"href":"https://api.github.com/repos/houndci/hound/pulls/1554"}}},"pull_request":{"url":"https://api.github.com/repos/houndci/hound/pulls/1554","id":196928458,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2OTI4NDU4","html_url":"https://github.com/houndci/hound/pull/1554","diff_url":"https://github.com/houndci/hound/pull/1554.diff","patch_url":"https://github.com/houndci/hound/pull/1554.patch","issue_url":"https://api.github.com/repos/houndci/hound/issues/1554","number":1554,"state":"open","locked":false,"title":"Support GitHub app flow","user":{"login":"gylaz","id":116327,"node_id":"MDQ6VXNlcjExNjMyNw==","avatar_url":"https://avatars3.githubusercontent.com/u/116327?v=4","gravatar_id":"","url":"https://api.github.com/users/gylaz","html_url":"https://github.com/gylaz","followers_url":"https://api.github.com/users/gylaz/followers","following_url":"https://api.github.com/users/gylaz/following{/other_user}","gists_url":"https://api.github.com/users/gylaz/gists{/gist_id}","starred_url":"https://api.github.com/users/gylaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gylaz/subscriptions","organizations_url":"https://api.github.com/users/gylaz/orgs","repos_url":"https://api.github.com/users/gylaz/repos","events_url":"https://api.github.com/users/gylaz/events{/privacy}","received_events_url":"https://api.github.com/users/gylaz/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-24T01:52:34Z","updated_at":"2018-06-25T19:08:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"523ad440ec42d23c4c48ac26057a7e02c09fef2b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/houndci/hound/pulls/1554/commits","review_comments_url":"https://api.github.com/repos/houndci/hound/pulls/1554/comments","review_comment_url":"https://api.github.com/repos/houndci/hound/pulls/comments{/number}","comments_url":"https://api.github.com/repos/houndci/hound/issues/1554/comments","statuses_url":"https://api.github.com/repos/houndci/hound/statuses/9e8cf37c120a57e0aad5b4e18a34da375634320b","head":{"label":"houndci:gl-support-apps","ref":"gl-support-apps","sha":"9e8cf37c120a57e0aad5b4e18a34da375634320b","user":{"login":"houndci","id":17184073,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg0MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/17184073?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"Organization","site_admin":false},"repo":{"id":7411076,"node_id":"MDEwOlJlcG9zaXRvcnk3NDExMDc2","name":"hound","full_name":"houndci/hound","owner":{"login":"houndci","id":17184073,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg0MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/17184073?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/houndci/hound","description":"Code review for GitHub pull requests.","fork":false,"url":"https://api.github.com/repos/houndci/hound","forks_url":"https://api.github.com/repos/houndci/hound/forks","keys_url":"https://api.github.com/repos/houndci/hound/keys{/key_id}","collaborators_url":"https://api.github.com/repos/houndci/hound/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/houndci/hound/teams","hooks_url":"https://api.github.com/repos/houndci/hound/hooks","issue_events_url":"https://api.github.com/repos/houndci/hound/issues/events{/number}","events_url":"https://api.github.com/repos/houndci/hound/events","assignees_url":"https://api.github.com/repos/houndci/hound/assignees{/user}","branches_url":"https://api.github.com/repos/houndci/hound/branches{/branch}","tags_url":"https://api.github.com/repos/houndci/hound/tags","blobs_url":"https://api.github.com/repos/houndci/hound/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/houndci/hound/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/houndci/hound/git/refs{/sha}","trees_url":"https://api.github.com/repos/houndci/hound/git/trees{/sha}","statuses_url":"https://api.github.com/repos/houndci/hound/statuses/{sha}","languages_url":"https://api.github.com/repos/houndci/hound/languages","stargazers_url":"https://api.github.com/repos/houndci/hound/stargazers","contributors_url":"https://api.github.com/repos/houndci/hound/contributors","subscribers_url":"https://api.github.com/repos/houndci/hound/subscribers","subscription_url":"https://api.github.com/repos/houndci/hound/subscription","commits_url":"https://api.github.com/repos/houndci/hound/commits{/sha}","git_commits_url":"https://api.github.com/repos/houndci/hound/git/commits{/sha}","comments_url":"https://api.github.com/repos/houndci/hound/comments{/number}","issue_comment_url":"https://api.github.com/repos/houndci/hound/issues/comments{/number}","contents_url":"https://api.github.com/repos/houndci/hound/contents/{+path}","compare_url":"https://api.github.com/repos/houndci/hound/compare/{base}...{head}","merges_url":"https://api.github.com/repos/houndci/hound/merges","archive_url":"https://api.github.com/repos/houndci/hound/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/houndci/hound/downloads","issues_url":"https://api.github.com/repos/houndci/hound/issues{/number}","pulls_url":"https://api.github.com/repos/houndci/hound/pulls{/number}","milestones_url":"https://api.github.com/repos/houndci/hound/milestones{/number}","notifications_url":"https://api.github.com/repos/houndci/hound/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/houndci/hound/labels{/name}","releases_url":"https://api.github.com/repos/houndci/hound/releases{/id}","deployments_url":"https://api.github.com/repos/houndci/hound/deployments","created_at":"2013-01-02T18:12:40Z","updated_at":"2018-06-23T03:55:42Z","pushed_at":"2018-06-25T18:56:24Z","git_url":"git://github.com/houndci/hound.git","ssh_url":"git@github.com:houndci/hound.git","clone_url":"https://github.com/houndci/hound.git","svn_url":"https://github.com/houndci/hound","homepage":"https://houndci.com","size":4587,"stargazers_count":1580,"watchers_count":1580,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":357,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":357,"open_issues":22,"watchers":1580,"default_branch":"master"}},"base":{"label":"houndci:master","ref":"master","sha":"de4c99a6eb80d016fe4dd04a3488381bde6edd2d","user":{"login":"houndci","id":17184073,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg0MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/17184073?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"Organization","site_admin":false},"repo":{"id":7411076,"node_id":"MDEwOlJlcG9zaXRvcnk3NDExMDc2","name":"hound","full_name":"houndci/hound","owner":{"login":"houndci","id":17184073,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTg0MDcz","avatar_url":"https://avatars0.githubusercontent.com/u/17184073?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/houndci/hound","description":"Code review for GitHub pull requests.","fork":false,"url":"https://api.github.com/repos/houndci/hound","forks_url":"https://api.github.com/repos/houndci/hound/forks","keys_url":"https://api.github.com/repos/houndci/hound/keys{/key_id}","collaborators_url":"https://api.github.com/repos/houndci/hound/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/houndci/hound/teams","hooks_url":"https://api.github.com/repos/houndci/hound/hooks","issue_events_url":"https://api.github.com/repos/houndci/hound/issues/events{/number}","events_url":"https://api.github.com/repos/houndci/hound/events","assignees_url":"https://api.github.com/repos/houndci/hound/assignees{/user}","branches_url":"https://api.github.com/repos/houndci/hound/branches{/branch}","tags_url":"https://api.github.com/repos/houndci/hound/tags","blobs_url":"https://api.github.com/repos/houndci/hound/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/houndci/hound/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/houndci/hound/git/refs{/sha}","trees_url":"https://api.github.com/repos/houndci/hound/git/trees{/sha}","statuses_url":"https://api.github.com/repos/houndci/hound/statuses/{sha}","languages_url":"https://api.github.com/repos/houndci/hound/languages","stargazers_url":"https://api.github.com/repos/houndci/hound/stargazers","contributors_url":"https://api.github.com/repos/houndci/hound/contributors","subscribers_url":"https://api.github.com/repos/houndci/hound/subscribers","subscription_url":"https://api.github.com/repos/houndci/hound/subscription","commits_url":"https://api.github.com/repos/houndci/hound/commits{/sha}","git_commits_url":"https://api.github.com/repos/houndci/hound/git/commits{/sha}","comments_url":"https://api.github.com/repos/houndci/hound/comments{/number}","issue_comment_url":"https://api.github.com/repos/houndci/hound/issues/comments{/number}","contents_url":"https://api.github.com/repos/houndci/hound/contents/{+path}","compare_url":"https://api.github.com/repos/houndci/hound/compare/{base}...{head}","merges_url":"https://api.github.com/repos/houndci/hound/merges","archive_url":"https://api.github.com/repos/houndci/hound/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/houndci/hound/downloads","issues_url":"https://api.github.com/repos/houndci/hound/issues{/number}","pulls_url":"https://api.github.com/repos/houndci/hound/pulls{/number}","milestones_url":"https://api.github.com/repos/houndci/hound/milestones{/number}","notifications_url":"https://api.github.com/repos/houndci/hound/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/houndci/hound/labels{/name}","releases_url":"https://api.github.com/repos/houndci/hound/releases{/id}","deployments_url":"https://api.github.com/repos/houndci/hound/deployments","created_at":"2013-01-02T18:12:40Z","updated_at":"2018-06-23T03:55:42Z","pushed_at":"2018-06-25T18:56:24Z","git_url":"git://github.com/houndci/hound.git","ssh_url":"git@github.com:houndci/hound.git","clone_url":"https://github.com/houndci/hound.git","svn_url":"https://github.com/houndci/hound","homepage":"https://houndci.com","size":4587,"stargazers_count":1580,"watchers_count":1580,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":357,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":357,"open_issues":22,"watchers":1580,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/houndci/hound/pulls/1554"},"html":{"href":"https://github.com/houndci/hound/pull/1554"},"issue":{"href":"https://api.github.com/repos/houndci/hound/issues/1554"},"comments":{"href":"https://api.github.com/repos/houndci/hound/issues/1554/comments"},"review_comments":{"href":"https://api.github.com/repos/houndci/hound/pulls/1554/comments"},"review_comment":{"href":"https://api.github.com/repos/houndci/hound/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/houndci/hound/pulls/1554/commits"},"statuses":{"href":"https://api.github.com/repos/houndci/hound/statuses/9e8cf37c120a57e0aad5b4e18a34da375634320b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"houndci-bot"}}