{"action":"created","comment":{"url":"https://api.github.com/repos/houndci/hound/pulls/comments/80271582","id":80271582,"diff_hunk":"@@ -80,37 +77,73 @@\n       expect(result).not_to be_completed\n     end\n \n-    it \"schedules a review job\" do\n-      build = build(:build, commit_sha: \"foo\", pull_request_number: 123)\n-      stub_jshint_config(content: {})\n-      commit_file = build_commit_file(filename: \"lib/a.js\")\n-      allow(Resque).to receive(:enqueue)\n-      linter = build_linter(build)\n-\n-      linter.file_review(commit_file)\n-\n-      expect(Resque).to have_received(:enqueue).with(\n-        JshintReviewJob,\n-        filename: commit_file.filename,\n-        commit_sha: build.commit_sha,\n-        linter_name: \"jshint\",\n-        pull_request_number: build.pull_request_number,\n-        patch: commit_file.patch,\n-        content: commit_file.content,\n-        config: \"{}\",\n-      )\n+    context \"when the owner has no config enabled\" do\n+      it \"schedules a review job with the local config\" do\n+        stub_owner_hound_config(instance_double(\"HoundConfig\", content: {}))\n+        build = create(:build, commit_sha: \"foo\", pull_request_number: 123)\n+        commit_file = build_commit_file(filename: \"lib/a.js\")\n+        stubbed_local_config = stub_config_files('{\"asi\": true}')\n+        linter = build_linter(build, stubbed_local_config)\n+        allow(Resque).to receive(:enqueue)\n+\n+        linter.file_review(commit_file)\n+\n+        expect(Resque).to have_received(:enqueue).with(\n+          JshintReviewJob,\n+          commit_sha: build.commit_sha,\n+          config: '{\"asi\":true}',\n+          content: commit_file.content,\n+          filename: commit_file.filename,\n+          linter_name: \"jshint\",\n+          patch: commit_file.patch,\n+          pull_request_number: build.pull_request_number,\n+        )\n+      end\n+    end\n+\n+    context \"when there is an owner level config enabled\" do\n+      it \"schedules a review job with the owner's config merged with locals\" do\n+        build = create(:build, commit_sha: \"foo\", pull_request_number: 123)","path":"spec/models/linter/jshint_spec.rb","position":82,"original_position":82,"commit_id":"a643da3ae606dfa6e86b142311421543a65b4cb9","original_commit_id":"a643da3ae606dfa6e86b142311421543a65b4cb9","user":{"login":"gylaz","id":116327,"avatar_url":"https://avatars.githubusercontent.com/u/116327?v=3","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":"__[rubocop]__\n* Prefer single-quoted strings when you don't need string interpolation or special symbols. [:ref](https://github.com/bbatsov/ruby-style-guide#consistent-string-literals)\n\n<!-- Comment by [SideCI](https://sideci.com) -->","created_at":"2016-09-23T15:48:38Z","updated_at":"2016-09-23T15:48:38Z","html_url":"https://github.com/houndci/hound/pull/1196#discussion_r80271582","pull_request_url":"https://api.github.com/repos/houndci/hound/pulls/1196","_links":{"self":{"href":"https://api.github.com/repos/houndci/hound/pulls/comments/80271582"},"html":{"href":"https://github.com/houndci/hound/pull/1196#discussion_r80271582"},"pull_request":{"href":"https://api.github.com/repos/houndci/hound/pulls/1196"}}},"pull_request":{"url":"https://api.github.com/repos/houndci/hound/pulls/1196","id":83853380,"html_url":"https://github.com/houndci/hound/pull/1196","diff_url":"https://github.com/houndci/hound/pull/1196.diff","patch_url":"https://github.com/houndci/hound/pull/1196.patch","issue_url":"https://api.github.com/repos/houndci/hound/issues/1196","number":1196,"state":"open","locked":false,"title":"Use merged config in jshint linter","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":"Background\r\n\r\nThis builds on work done in https://github.com/houndci/hound/pull/1191 to allow owner level configurations for the `jshint` linter.\r\n\r\nChanges\r\n\r\n- Add a `owner_config` and `owner_hound_config` methods to `Linter::Jshint`\r\n- Move `config` to `local_config`\r\n- Change `config` to be the merged result of the `owner_config` and the `local_config`","created_at":"2016-09-02T19:31:38Z","updated_at":"2016-09-23T15:48:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d25b2f22369d59583f120ac2e571c1b52764a5b3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/houndci/hound/pulls/1196/commits","review_comments_url":"https://api.github.com/repos/houndci/hound/pulls/1196/comments","review_comment_url":"https://api.github.com/repos/houndci/hound/pulls/comments{/number}","comments_url":"https://api.github.com/repos/houndci/hound/issues/1196/comments","statuses_url":"https://api.github.com/repos/houndci/hound/statuses/a643da3ae606dfa6e86b142311421543a65b4cb9","head":{"label":"houndci:jm-jshint-owner-level-config","ref":"jm-jshint-owner-level-config","sha":"a643da3ae606dfa6e86b142311421543a65b4cb9","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-09-23T15:13:23Z","pushed_at":"2016-09-23T15:48:20Z","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":62501,"stargazers_count":1327,"watchers_count":1327,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":297,"mirror_url":null,"open_issues_count":27,"forks":297,"open_issues":27,"watchers":1327,"default_branch":"master"}},"base":{"label":"houndci:master","ref":"master","sha":"189175af3c9bf5567feaad79bbf70fae52a06c06","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-09-23T15:13:23Z","pushed_at":"2016-09-23T15:48:20Z","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":62501,"stargazers_count":1327,"watchers_count":1327,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":297,"mirror_url":null,"open_issues_count":27,"forks":297,"open_issues":27,"watchers":1327,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/houndci/hound/pulls/1196"},"html":{"href":"https://github.com/houndci/hound/pull/1196"},"issue":{"href":"https://api.github.com/repos/houndci/hound/issues/1196"},"comments":{"href":"https://api.github.com/repos/houndci/hound/issues/1196/comments"},"review_comments":{"href":"https://api.github.com/repos/houndci/hound/pulls/1196/comments"},"review_comment":{"href":"https://api.github.com/repos/houndci/hound/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/houndci/hound/pulls/1196/commits"},"statuses":{"href":"https://api.github.com/repos/houndci/hound/statuses/a643da3ae606dfa6e86b142311421543a65b4cb9"}}}}
{"actor":{"display_login":"gylaz"}}