payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/comments/321600911","pull_request_review_id":284687768,"id":321600911,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMTYwMDkxMQ==","diff_hunk":"@@ -235,19 +244,30 @@ private function indexClass($isGroup, $class, BaseIndex $index, int $group): int\n      */\n     private function doReindex($group, $class, $batchLength, BaseIndex $index): void\n     {\n-        // Generate filtered list of local records\n-        $baseClass = DataObject::getSchema()->baseDataClass($class);\n-        $client = $index->getClient();\n-        /** @var DataList|DataObject[] $items */\n-        $items = DataObject::get($baseClass)\n-            ->sort('ID ASC')\n-            ->limit($batchLength, ($group * $batchLength));\n-        $update = $client->createUpdate();\n-        if ($items->count()) {\n-            $this->service->setInDebugMode($this->debug);\n-            $this->service->updateIndex($index, $items, $update);\n-            $update->addCommit();\n-            $client->update($update);\n+        foreach (SiteState::getStates() as $state) {\n+            if ($state !== 'default') {\n+                SiteState::withState($state);","path":"src/Tasks/SolrIndexTask.php","position":58,"original_position":58,"commit_id":"534962dd0daf5a996ca2fc937fe2808cda39bd28","original_commit_id":"534962dd0daf5a996ca2fc937fe2808cda39bd28","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Avoid using static access to class '\\Firesphere\\SolrSearch\\States\\SiteState' in method 'doReindex'.","created_at":"2019-09-06T07:05:35Z","updated_at":"2019-09-06T07:05:35Z","html_url":"https://github.com/Firesphere/silverstripe-solr-search/pull/109#discussion_r321600911","pull_request_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/109","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/comments/321600911"},"html":{"href":"https://github.com/Firesphere/silverstripe-solr-search/pull/109#discussion_r321600911"},"pull_request":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/109","id":314765610,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE0NzY1NjEw","html_url":"https://github.com/Firesphere/silverstripe-solr-search/pull/109","diff_url":"https://github.com/Firesphere/silverstripe-solr-search/pull/109.diff","patch_url":"https://github.com/Firesphere/silverstripe-solr-search/pull/109.patch","issue_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues/109","number":109,"state":"open","locked":false,"title":"[WIP] Add variants and update the task to use it","user":{"login":"Firesphere","id":680570,"node_id":"MDQ6VXNlcjY4MDU3MA==","avatar_url":"https://avatars3.githubusercontent.com/u/680570?v=4","gravatar_id":"","url":"https://api.github.com/users/Firesphere","html_url":"https://github.com/Firesphere","followers_url":"https://api.github.com/users/Firesphere/followers","following_url":"https://api.github.com/users/Firesphere/following{/other_user}","gists_url":"https://api.github.com/users/Firesphere/gists{/gist_id}","starred_url":"https://api.github.com/users/Firesphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Firesphere/subscriptions","organizations_url":"https://api.github.com/users/Firesphere/orgs","repos_url":"https://api.github.com/users/Firesphere/repos","events_url":"https://api.github.com/users/Firesphere/events{/privacy}","received_events_url":"https://api.github.com/users/Firesphere/received_events","type":"User","site_admin":false},"body":"- @todo Do the same for DataObjectExtension::onAfterWrite()\r\n- @todo test the shit out of this","created_at":"2019-09-06T02:05:49Z","updated_at":"2019-09-06T07:05:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d54260015eebee3b1c7a0ec8da19452e9815319","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/109/commits","review_comments_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/109/comments","review_comment_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues/109/comments","statuses_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/statuses/534962dd0daf5a996ca2fc937fe2808cda39bd28","head":{"label":"Firesphere:hans/Index-all-fluent-options","ref":"hans/Index-all-fluent-options","sha":"534962dd0daf5a996ca2fc937fe2808cda39bd28","user":{"login":"Firesphere","id":680570,"node_id":"MDQ6VXNlcjY4MDU3MA==","avatar_url":"https://avatars3.githubusercontent.com/u/680570?v=4","gravatar_id":"","url":"https://api.github.com/users/Firesphere","html_url":"https://github.com/Firesphere","followers_url":"https://api.github.com/users/Firesphere/followers","following_url":"https://api.github.com/users/Firesphere/following{/other_user}","gists_url":"https://api.github.com/users/Firesphere/gists{/gist_id}","starred_url":"https://api.github.com/users/Firesphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Firesphere/subscriptions","organizations_url":"https://api.github.com/users/Firesphere/orgs","repos_url":"https://api.github.com/users/Firesphere/repos","events_url":"https://api.github.com/users/Firesphere/events{/privacy}","received_events_url":"https://api.github.com/users/Firesphere/received_events","type":"User","site_admin":false},"repo":{"id":186968017,"node_id":"MDEwOlJlcG9zaXRvcnkxODY5NjgwMTc=","name":"silverstripe-solr-search","full_name":"Firesphere/silverstripe-solr-search","private":false,"owner":{"login":"Firesphere","id":680570,"node_id":"MDQ6VXNlcjY4MDU3MA==","avatar_url":"https://avatars3.githubusercontent.com/u/680570?v=4","gravatar_id":"","url":"https://api.github.com/users/Firesphere","html_url":"https://github.com/Firesphere","followers_url":"https://api.github.com/users/Firesphere/followers","following_url":"https://api.github.com/users/Firesphere/following{/other_user}","gists_url":"https://api.github.com/users/Firesphere/gists{/gist_id}","starred_url":"https://api.github.com/users/Firesphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Firesphere/subscriptions","organizations_url":"https://api.github.com/users/Firesphere/orgs","repos_url":"https://api.github.com/users/Firesphere/repos","events_url":"https://api.github.com/users/Firesphere/events{/privacy}","received_events_url":"https://api.github.com/users/Firesphere/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Firesphere/silverstripe-solr-search","description":"Advanced searching with SilverStripe, Solarium and Solr","fork":false,"url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search","forks_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/forks","keys_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/teams","hooks_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/hooks","issue_events_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues/events{/number}","events_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/events","assignees_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/assignees{/user}","branches_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/branches{/branch}","tags_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/tags","blobs_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/refs{/sha}","trees_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/statuses/{sha}","languages_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/languages","stargazers_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/stargazers","contributors_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/contributors","subscribers_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/subscribers","subscription_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/subscription","commits_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/commits{/sha}","git_commits_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/commits{/sha}","comments_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/comments{/number}","issue_comment_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues/comments{/number}","contents_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/contents/{+path}","compare_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/merges","archive_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/downloads","issues_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues{/number}","pulls_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls{/number}","milestones_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/milestones{/number}","notifications_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/labels{/name}","releases_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/releases{/id}","deployments_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/deployments","created_at":"2019-05-16T06:45:22Z","updated_at":"2019-09-05T09:12:18Z","pushed_at":"2019-09-06T06:59:03Z","git_url":"git://github.com/Firesphere/silverstripe-solr-search.git","ssh_url":"git@github.com:Firesphere/silverstripe-solr-search.git","clone_url":"https://github.com/Firesphere/silverstripe-solr-search.git","svn_url":"https://github.com/Firesphere/silverstripe-solr-search","homepage":null,"size":1298,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":23,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":23,"watchers":3,"default_branch":"master"}},"base":{"label":"Firesphere:master","ref":"master","sha":"d3932f72e339c9de6b8aea96bee410f926271cb5","user":{"login":"Firesphere","id":680570,"node_id":"MDQ6VXNlcjY4MDU3MA==","avatar_url":"https://avatars3.githubusercontent.com/u/680570?v=4","gravatar_id":"","url":"https://api.github.com/users/Firesphere","html_url":"https://github.com/Firesphere","followers_url":"https://api.github.com/users/Firesphere/followers","following_url":"https://api.github.com/users/Firesphere/following{/other_user}","gists_url":"https://api.github.com/users/Firesphere/gists{/gist_id}","starred_url":"https://api.github.com/users/Firesphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Firesphere/subscriptions","organizations_url":"https://api.github.com/users/Firesphere/orgs","repos_url":"https://api.github.com/users/Firesphere/repos","events_url":"https://api.github.com/users/Firesphere/events{/privacy}","received_events_url":"https://api.github.com/users/Firesphere/received_events","type":"User","site_admin":false},"repo":{"id":186968017,"node_id":"MDEwOlJlcG9zaXRvcnkxODY5NjgwMTc=","name":"silverstripe-solr-search","full_name":"Firesphere/silverstripe-solr-search","private":false,"owner":{"login":"Firesphere","id":680570,"node_id":"MDQ6VXNlcjY4MDU3MA==","avatar_url":"https://avatars3.githubusercontent.com/u/680570?v=4","gravatar_id":"","url":"https://api.github.com/users/Firesphere","html_url":"https://github.com/Firesphere","followers_url":"https://api.github.com/users/Firesphere/followers","following_url":"https://api.github.com/users/Firesphere/following{/other_user}","gists_url":"https://api.github.com/users/Firesphere/gists{/gist_id}","starred_url":"https://api.github.com/users/Firesphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Firesphere/subscriptions","organizations_url":"https://api.github.com/users/Firesphere/orgs","repos_url":"https://api.github.com/users/Firesphere/repos","events_url":"https://api.github.com/users/Firesphere/events{/privacy}","received_events_url":"https://api.github.com/users/Firesphere/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Firesphere/silverstripe-solr-search","description":"Advanced searching with SilverStripe, Solarium and Solr","fork":false,"url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search","forks_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/forks","keys_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/teams","hooks_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/hooks","issue_events_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues/events{/number}","events_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/events","assignees_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/assignees{/user}","branches_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/branches{/branch}","tags_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/tags","blobs_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/refs{/sha}","trees_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/statuses/{sha}","languages_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/languages","stargazers_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/stargazers","contributors_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/contributors","subscribers_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/subscribers","subscription_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/subscription","commits_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/commits{/sha}","git_commits_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/git/commits{/sha}","comments_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/comments{/number}","issue_comment_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues/comments{/number}","contents_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/contents/{+path}","compare_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/merges","archive_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/downloads","issues_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues{/number}","pulls_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls{/number}","milestones_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/milestones{/number}","notifications_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/labels{/name}","releases_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/releases{/id}","deployments_url":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/deployments","created_at":"2019-05-16T06:45:22Z","updated_at":"2019-09-05T09:12:18Z","pushed_at":"2019-09-06T06:59:03Z","git_url":"git://github.com/Firesphere/silverstripe-solr-search.git","ssh_url":"git@github.com:Firesphere/silverstripe-solr-search.git","clone_url":"https://github.com/Firesphere/silverstripe-solr-search.git","svn_url":"https://github.com/Firesphere/silverstripe-solr-search","homepage":null,"size":1298,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":23,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":23,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/109"},"html":{"href":"https://github.com/Firesphere/silverstripe-solr-search/pull/109"},"issue":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues/109"},"comments":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/Firesphere/silverstripe-solr-search/statuses/534962dd0daf5a996ca2fc937fe2808cda39bd28"}},"author_association":"OWNER"}}
other: {"actor":{"display_login":"codeclimate"}}