{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/hound/pulls/comments/36973802","id":36973802,"diff_hunk":"@@ -1,274 +1,295 @@\n require \"rails_helper\"\n \n-describe BuildRunner, '#run' do\n-  context 'with active repo and opened pull request' do\n-    it 'creates a build record with violations' do\n-      repo = create(:repo, :active)\n-      payload = stubbed_payload(\n-        github_repo_id: repo.github_id,\n-        pull_request_number: 5,\n-        head_sha: \"123abc\",\n-        full_repo_name: repo.name\n-      )\n-      build_runner = BuildRunner.new(payload)\n-      stubbed_style_checker_with_violations\n-      stubbed_commenter\n-      stubbed_pull_request\n-      stubbed_github_api\n-\n-      build_runner.run\n-      builds = Build.where(repo_id: repo.id)\n-      build = builds.first\n-\n-      expect(builds.size).to eq 1\n-      expect(build).to eq repo.builds.last\n-      expect(build.violations.count).to be >= 1\n-      expect(build.pull_request_number).to eq 5\n-      expect(build.commit_sha).to eq payload.head_sha\n-      expect(build.payload).to eq ({ payload_stuff: \"test\" }).to_json\n-    end\n+describe BuildRunner do\n+  describe \"#run\" do\n+    context 'with active repo and opened pull request' do","path":"spec/services/build_runner_spec.rb","position":32,"original_position":32,"commit_id":"744e864b6695320931f84cfadfbb6569bbb424ca","original_commit_id":"744e864b6695320931f84cfadfbb6569bbb424ca","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-08-13T13:33:40Z","updated_at":"2015-08-13T13:33:40Z","html_url":"https://github.com/thoughtbot/hound/pull/876#discussion_r36973802","pull_request_url":"https://api.github.com/repos/thoughtbot/hound/pulls/876","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/comments/36973802"},"html":{"href":"https://github.com/thoughtbot/hound/pull/876#discussion_r36973802"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/876"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/hound/pulls/876","id":42021074,"html_url":"https://github.com/thoughtbot/hound/pull/876","diff_url":"https://github.com/thoughtbot/hound/pull/876.diff","patch_url":"https://github.com/thoughtbot/hound/pull/876.patch","issue_url":"https://api.github.com/repos/thoughtbot/hound/issues/876","number":876,"state":"open","locked":false,"title":"Set PR status as an error","user":{"login":"arunagw","id":3948,"avatar_url":"https://avatars.githubusercontent.com/u/3948?v=3","gravatar_id":"","url":"https://api.github.com/users/arunagw","html_url":"https://github.com/arunagw","followers_url":"https://api.github.com/users/arunagw/followers","following_url":"https://api.github.com/users/arunagw/following{/other_user}","gists_url":"https://api.github.com/users/arunagw/gists{/gist_id}","starred_url":"https://api.github.com/users/arunagw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arunagw/subscriptions","organizations_url":"https://api.github.com/users/arunagw/orgs","repos_url":"https://api.github.com/users/arunagw/repos","events_url":"https://api.github.com/users/arunagw/events{/privacy}","received_events_url":"https://api.github.com/users/arunagw/received_events","type":"User","site_admin":false},"body":"When hound failed itself we should update PR status with a message","created_at":"2015-08-10T13:43:45Z","updated_at":"2015-08-13T13:33:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04b18e36c20e9357fad4ec0cd4acbcf6fa0d4534","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/hound/pulls/876/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/hound/pulls/876/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/hound/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/hound/issues/876/comments","statuses_url":"https://api.github.com/repos/thoughtbot/hound/statuses/744e864b6695320931f84cfadfbb6569bbb424ca","head":{"label":"thoughtbot:aa-set-pr-status-error","ref":"aa-set-pr-status-error","sha":"744e864b6695320931f84cfadfbb6569bbb424ca","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":7411076,"name":"hound","full_name":"thoughtbot/hound","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/hound","description":"Automated review for code style.","fork":false,"url":"https://api.github.com/repos/thoughtbot/hound","forks_url":"https://api.github.com/repos/thoughtbot/hound/forks","keys_url":"https://api.github.com/repos/thoughtbot/hound/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/hound/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/hound/teams","hooks_url":"https://api.github.com/repos/thoughtbot/hound/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/hound/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/hound/events","assignees_url":"https://api.github.com/repos/thoughtbot/hound/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/hound/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/hound/tags","blobs_url":"https://api.github.com/repos/thoughtbot/hound/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/hound/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/hound/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/hound/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/hound/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/hound/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/hound/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/hound/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/hound/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/hound/subscription","commits_url":"https://api.github.com/repos/thoughtbot/hound/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/hound/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/hound/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/hound/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/hound/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/hound/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/hound/merges","archive_url":"https://api.github.com/repos/thoughtbot/hound/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/hound/downloads","issues_url":"https://api.github.com/repos/thoughtbot/hound/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/hound/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/hound/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/hound/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/hound/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/hound/releases{/id}","created_at":"2013-01-02T18:12:40Z","updated_at":"2015-08-12T23:58:20Z","pushed_at":"2015-08-13T13:33:34Z","git_url":"git://github.com/thoughtbot/hound.git","ssh_url":"git@github.com:thoughtbot/hound.git","clone_url":"https://github.com/thoughtbot/hound.git","svn_url":"https://github.com/thoughtbot/hound","homepage":"https://houndci.com","size":15699,"stargazers_count":990,"watchers_count":990,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":206,"mirror_url":null,"open_issues_count":27,"forks":206,"open_issues":27,"watchers":990,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"011285f2cc267b5c32504a4b398c45ef45a95ac0","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":7411076,"name":"hound","full_name":"thoughtbot/hound","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/hound","description":"Automated review for code style.","fork":false,"url":"https://api.github.com/repos/thoughtbot/hound","forks_url":"https://api.github.com/repos/thoughtbot/hound/forks","keys_url":"https://api.github.com/repos/thoughtbot/hound/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/hound/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/hound/teams","hooks_url":"https://api.github.com/repos/thoughtbot/hound/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/hound/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/hound/events","assignees_url":"https://api.github.com/repos/thoughtbot/hound/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/hound/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/hound/tags","blobs_url":"https://api.github.com/repos/thoughtbot/hound/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/hound/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/hound/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/hound/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/hound/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/hound/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/hound/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/hound/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/hound/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/hound/subscription","commits_url":"https://api.github.com/repos/thoughtbot/hound/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/hound/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/hound/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/hound/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/hound/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/hound/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/hound/merges","archive_url":"https://api.github.com/repos/thoughtbot/hound/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/hound/downloads","issues_url":"https://api.github.com/repos/thoughtbot/hound/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/hound/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/hound/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/hound/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/hound/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/hound/releases{/id}","created_at":"2013-01-02T18:12:40Z","updated_at":"2015-08-12T23:58:20Z","pushed_at":"2015-08-13T13:33:34Z","git_url":"git://github.com/thoughtbot/hound.git","ssh_url":"git@github.com:thoughtbot/hound.git","clone_url":"https://github.com/thoughtbot/hound.git","svn_url":"https://github.com/thoughtbot/hound","homepage":"https://houndci.com","size":15699,"stargazers_count":990,"watchers_count":990,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":206,"mirror_url":null,"open_issues_count":27,"forks":206,"open_issues":27,"watchers":990,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/876"},"html":{"href":"https://github.com/thoughtbot/hound/pull/876"},"issue":{"href":"https://api.github.com/repos/thoughtbot/hound/issues/876"},"comments":{"href":"https://api.github.com/repos/thoughtbot/hound/issues/876/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/876/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/hound/pulls/876/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/hound/statuses/744e864b6695320931f84cfadfbb6569bbb424ca"}}}}