{"action":"created","comment":{"url":"https://api.github.com/repos/houndci/hound/pulls/comments/77425334","id":77425334,"diff_hunk":"@@ -20,36 +20,95 @@\n   end\n \n   describe \"#file_review\" do\n+    context \"when the owner does not have a configuration set up\" do\n+      it \"enqueues a file review with the local config\" do\n+        build = build(:build, commit_sha: \"foo\", pull_request_number: 123)\n+        config_content = <<~CFG\n+          linters:\n+            Indentation:\n+              width: 2\n+        CFG\n+        linter = build_linter(build, \"config/scss.yml\" => config_content)\n+        commit_file = build_commit_file(filename: \"lib/a.scss\")\n+        stub_owner_hound_config(instance_double(\"HoundConfig\", content: {}))\n+        allow(Resque).to receive(:enqueue)\n+\n+        linter.file_review(commit_file)\n+\n+        expect(Resque).to have_received(:enqueue).with(\n+          ScssReviewJob,\n+          commit_sha: build.commit_sha,\n+          config: \"---\\n#{config_content}\",\n+          content: commit_file.content,\n+          filename: commit_file.filename,\n+          linter_name: \"scss\",\n+          patch: commit_file.patch,\n+          pull_request_number: build.pull_request_number,\n+        )\n+      end\n+    end\n+\n+    context \"when the owner has a configuration set up\" do\n+      it \"enqueues a file review with the owner config merged with the local\" do\n+        hound_yml= <<~YML\n+          scss:\n+            config_file: .scss.yml\n+        YML\n+        scss_yml = <<~YML\n+          linters:\n+            BorderZero:\n+              enabled: false\n+            Indentation:\n+              width: 1\n+        YML\n+\n+        stubbed_owner_config = stubbed_commit(\n+          \".hound.yml\" => hound_yml,\n+          \".scss.yml\" => scss_yml,\n+        )\n+        stub_owner_hound_config(HoundConfig.new(stubbed_owner_config))\n+        build = build(:build, commit_sha: \"foo\", pull_request_number: 123)\n+        config_content = <<~CFG\n+          linters:\n+            Indentation:\n+              width: 2\n+        CFG\n+        linter = build_linter(build, \"config/scss.yml\" => config_content)\n+        commit_file = build_commit_file(filename: \"lib/a.scss\")\n+        allow(Resque).to receive(:enqueue)\n+\n+        linter.file_review(commit_file)\n+\n+        expect(Resque).to have_received(:enqueue).with(\n+          ScssReviewJob,\n+          commit_sha: build.commit_sha,\n+          config: <<~YML,\n+            ---\n+            linters:\n+              BorderZero:\n+                enabled: false\n+              Indentation:\n+                width: 2\n+          YML\n+          content: commit_file.content,\n+          filename: commit_file.filename,\n+          linter_name: \"scss\",","path":"spec/models/linter/scss_spec.rb","position":76,"original_position":76,"commit_id":"41a272ee8e53d5491aaef04098f7ad2510292195","original_commit_id":"41a272ee8e53d5491aaef04098f7ad2510292195","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"unexpected token tLABEL","created_at":"2016-09-02T23:35:01Z","updated_at":"2016-09-02T23:35:01Z","html_url":"https://github.com/houndci/hound/pull/1198#discussion_r77425334","pull_request_url":"https://api.github.com/repos/houndci/hound/pulls/1198","_links":{"self":{"href":"https://api.github.com/repos/houndci/hound/pulls/comments/77425334"},"html":{"href":"https://github.com/houndci/hound/pull/1198#discussion_r77425334"},"pull_request":{"href":"https://api.github.com/repos/houndci/hound/pulls/1198"}}},"pull_request":{"url":"https://api.github.com/repos/houndci/hound/pulls/1198","id":83876149,"html_url":"https://github.com/houndci/hound/pull/1198","diff_url":"https://github.com/houndci/hound/pull/1198.diff","patch_url":"https://github.com/houndci/hound/pull/1198.patch","issue_url":"https://api.github.com/repos/houndci/hound/issues/1198","number":1198,"state":"open","locked":false,"title":"Scss Owner Level Config","user":{"login":"jcmorrow","id":5903784,"avatar_url":"https://avatars.githubusercontent.com/u/5903784?v=3","gravatar_id":"","url":"https://api.github.com/users/jcmorrow","html_url":"https://github.com/jcmorrow","followers_url":"https://api.github.com/users/jcmorrow/followers","following_url":"https://api.github.com/users/jcmorrow/following{/other_user}","gists_url":"https://api.github.com/users/jcmorrow/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmorrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmorrow/subscriptions","organizations_url":"https://api.github.com/users/jcmorrow/orgs","repos_url":"https://api.github.com/users/jcmorrow/repos","events_url":"https://api.github.com/users/jcmorrow/events{/privacy}","received_events_url":"https://api.github.com/users/jcmorrow/received_events","type":"User","site_admin":false},"body":"Turns out once it's done for one linter service it gets easier to replicate.","created_at":"2016-09-02T23:15:02Z","updated_at":"2016-09-02T23:35:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4cef5007f5600d4344c0ed038066d3e2065b023b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/houndci/hound/pulls/1198/commits","review_comments_url":"https://api.github.com/repos/houndci/hound/pulls/1198/comments","review_comment_url":"https://api.github.com/repos/houndci/hound/pulls/comments{/number}","comments_url":"https://api.github.com/repos/houndci/hound/issues/1198/comments","statuses_url":"https://api.github.com/repos/houndci/hound/statuses/41a272ee8e53d5491aaef04098f7ad2510292195","head":{"label":"houndci:jm-scss-owner-level-config","ref":"jm-scss-owner-level-config","sha":"41a272ee8e53d5491aaef04098f7ad2510292195","user":{"login":"houndci","id":17184073,"avatar_url":"https://avatars.githubusercontent.com/u/17184073?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":"Organization","site_admin":false},"repo":{"id":7411076,"name":"hound","full_name":"houndci/hound","owner":{"login":"houndci","id":17184073,"avatar_url":"https://avatars.githubusercontent.com/u/17184073?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":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/houndci/hound","description":"Automated review for code style","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":"2016-08-31T20:19:41Z","pushed_at":"2016-09-02T23:34:47Z","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":62498,"stargazers_count":1311,"watchers_count":1311,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":294,"mirror_url":null,"open_issues_count":24,"forks":294,"open_issues":24,"watchers":1311,"default_branch":"master"}},"base":{"label":"houndci:master","ref":"master","sha":"da62d3d937ba6a4bff8f96606273cbd71d347d7c","user":{"login":"houndci","id":17184073,"avatar_url":"https://avatars.githubusercontent.com/u/17184073?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":"Organization","site_admin":false},"repo":{"id":7411076,"name":"hound","full_name":"houndci/hound","owner":{"login":"houndci","id":17184073,"avatar_url":"https://avatars.githubusercontent.com/u/17184073?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":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/houndci/hound","description":"Automated review for code style","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":"2016-08-31T20:19:41Z","pushed_at":"2016-09-02T23:34:47Z","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":62498,"stargazers_count":1311,"watchers_count":1311,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":294,"mirror_url":null,"open_issues_count":24,"forks":294,"open_issues":24,"watchers":1311,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/houndci/hound/pulls/1198"},"html":{"href":"https://github.com/houndci/hound/pull/1198"},"issue":{"href":"https://api.github.com/repos/houndci/hound/issues/1198"},"comments":{"href":"https://api.github.com/repos/houndci/hound/issues/1198/comments"},"review_comments":{"href":"https://api.github.com/repos/houndci/hound/pulls/1198/comments"},"review_comment":{"href":"https://api.github.com/repos/houndci/hound/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/houndci/hound/pulls/1198/commits"},"statuses":{"href":"https://api.github.com/repos/houndci/hound/statuses/41a272ee8e53d5491aaef04098f7ad2510292195"}}}}
{"actor":{"display_login":"houndci-bot"}}