{"action":"created","comment":{"url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/comments/85078125","pull_request_review_id":5813759,"id":85078125,"diff_hunk":"@@ -0,0 +1,45 @@\n+class Editor::PostSearcher\n+  include MarkdownHelper\n+\n+  class << self\n+    def search_post(query_params:, page:, site:)\n+      query = Editor::PostSearchQuery.new(query_params.merge(site_id: site.id))\n+      groonga_posts = new.search_post(query)\n+    end\n+  end\n+\n+  def initialize\n+    @posts = Groonga[\"Posts\"]\n+  end\n+\n+  def search_post(query)\n+    posts = @posts.select do |record|\n+      conditions = []\n+      conditions << (record.site._key == query.site_id)\n+      if query.public_id.present?\n+        conditions << (record.public_id == query.public_id)\n+      end\n+      #binding.pry","path":"app/groonga/editor/post_searcher.rb","position":22,"original_position":22,"commit_id":"22cb552b8d2fd9c3bbf0169df69cbf0706f917ba","original_commit_id":"22cb552b8d2fd9c3bbf0169df69cbf0706f917ba","user":{"login":"okkez-bot","id":18323547,"avatar_url":"https://avatars.githubusercontent.com/u/18323547?v=3","gravatar_id":"","url":"https://api.github.com/users/okkez-bot","html_url":"https://github.com/okkez-bot","followers_url":"https://api.github.com/users/okkez-bot/followers","following_url":"https://api.github.com/users/okkez-bot/following{/other_user}","gists_url":"https://api.github.com/users/okkez-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/okkez-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okkez-bot/subscriptions","organizations_url":"https://api.github.com/users/okkez-bot/orgs","repos_url":"https://api.github.com/users/okkez-bot/repos","events_url":"https://api.github.com/users/okkez-bot/events{/privacy}","received_events_url":"https://api.github.com/users/okkez-bot/received_events","type":"User","site_admin":false},"body":"__[rubocop]__\n* Style/LeadingCommentSpace: Missing space after #. [:ref](https://github.com/bbatsov/ruby-style-guide#hash-space)\n\n<!-- Comment by [SideCI](https://sideci.com) -->","created_at":"2016-10-26T09:03:54Z","updated_at":"2016-10-26T09:03:54Z","html_url":"https://github.com/bm-sms/daimon-news/pull/650#discussion_r85078125","pull_request_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/650","_links":{"self":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/comments/85078125"},"html":{"href":"https://github.com/bm-sms/daimon-news/pull/650#discussion_r85078125"},"pull_request":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/650"}}},"pull_request":{"url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/650","id":90953041,"html_url":"https://github.com/bm-sms/daimon-news/pull/650","diff_url":"https://github.com/bm-sms/daimon-news/pull/650.diff","patch_url":"https://github.com/bm-sms/daimon-news/pull/650.patch","issue_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/650","number":650,"state":"open","locked":false,"title":"[WIP] Post search (editor)","user":{"login":"ryota-sasabe","id":14937777,"avatar_url":"https://avatars.githubusercontent.com/u/14937777?v=3","gravatar_id":"","url":"https://api.github.com/users/ryota-sasabe","html_url":"https://github.com/ryota-sasabe","followers_url":"https://api.github.com/users/ryota-sasabe/followers","following_url":"https://api.github.com/users/ryota-sasabe/following{/other_user}","gists_url":"https://api.github.com/users/ryota-sasabe/gists{/gist_id}","starred_url":"https://api.github.com/users/ryota-sasabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryota-sasabe/subscriptions","organizations_url":"https://api.github.com/users/ryota-sasabe/orgs","repos_url":"https://api.github.com/users/ryota-sasabe/repos","events_url":"https://api.github.com/users/ryota-sasabe/events{/privacy}","received_events_url":"https://api.github.com/users/ryota-sasabe/received_events","type":"User","site_admin":false},"body":"ref https://github.com/bm-sms/daimon-news-misc/issues/173","created_at":"2016-10-26T07:54:30Z","updated_at":"2016-10-26T09:03:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/650/commits","review_comments_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/650/comments","review_comment_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/650/comments","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news/statuses/22cb552b8d2fd9c3bbf0169df69cbf0706f917ba","head":{"label":"bm-sms:editor_search","ref":"editor_search","sha":"22cb552b8d2fd9c3bbf0169df69cbf0706f917ba","user":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"repo":{"id":46255953,"name":"daimon-news","full_name":"bm-sms/daimon-news","owner":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bm-sms/daimon-news","description":null,"fork":false,"url":"https://api.github.com/repos/bm-sms/daimon-news","forks_url":"https://api.github.com/repos/bm-sms/daimon-news/forks","keys_url":"https://api.github.com/repos/bm-sms/daimon-news/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bm-sms/daimon-news/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bm-sms/daimon-news/teams","hooks_url":"https://api.github.com/repos/bm-sms/daimon-news/hooks","issue_events_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/events{/number}","events_url":"https://api.github.com/repos/bm-sms/daimon-news/events","assignees_url":"https://api.github.com/repos/bm-sms/daimon-news/assignees{/user}","branches_url":"https://api.github.com/repos/bm-sms/daimon-news/branches{/branch}","tags_url":"https://api.github.com/repos/bm-sms/daimon-news/tags","blobs_url":"https://api.github.com/repos/bm-sms/daimon-news/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bm-sms/daimon-news/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bm-sms/daimon-news/git/refs{/sha}","trees_url":"https://api.github.com/repos/bm-sms/daimon-news/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news/statuses/{sha}","languages_url":"https://api.github.com/repos/bm-sms/daimon-news/languages","stargazers_url":"https://api.github.com/repos/bm-sms/daimon-news/stargazers","contributors_url":"https://api.github.com/repos/bm-sms/daimon-news/contributors","subscribers_url":"https://api.github.com/repos/bm-sms/daimon-news/subscribers","subscription_url":"https://api.github.com/repos/bm-sms/daimon-news/subscription","commits_url":"https://api.github.com/repos/bm-sms/daimon-news/commits{/sha}","git_commits_url":"https://api.github.com/repos/bm-sms/daimon-news/git/commits{/sha}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news/comments{/number}","issue_comment_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/comments{/number}","contents_url":"https://api.github.com/repos/bm-sms/daimon-news/contents/{+path}","compare_url":"https://api.github.com/repos/bm-sms/daimon-news/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bm-sms/daimon-news/merges","archive_url":"https://api.github.com/repos/bm-sms/daimon-news/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bm-sms/daimon-news/downloads","issues_url":"https://api.github.com/repos/bm-sms/daimon-news/issues{/number}","pulls_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls{/number}","milestones_url":"https://api.github.com/repos/bm-sms/daimon-news/milestones{/number}","notifications_url":"https://api.github.com/repos/bm-sms/daimon-news/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bm-sms/daimon-news/labels{/name}","releases_url":"https://api.github.com/repos/bm-sms/daimon-news/releases{/id}","deployments_url":"https://api.github.com/repos/bm-sms/daimon-news/deployments","created_at":"2015-11-16T06:20:35Z","updated_at":"2016-06-02T22:32:01Z","pushed_at":"2016-10-26T09:03:43Z","git_url":"git://github.com/bm-sms/daimon-news.git","ssh_url":"git@github.com:bm-sms/daimon-news.git","clone_url":"https://github.com/bm-sms/daimon-news.git","svn_url":"https://github.com/bm-sms/daimon-news","homepage":"","size":1753,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":6,"default_branch":"master"}},"base":{"label":"bm-sms:master","ref":"master","sha":"756ee74b3695f3861c627f49658e3e9b57b5de33","user":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"repo":{"id":46255953,"name":"daimon-news","full_name":"bm-sms/daimon-news","owner":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bm-sms/daimon-news","description":null,"fork":false,"url":"https://api.github.com/repos/bm-sms/daimon-news","forks_url":"https://api.github.com/repos/bm-sms/daimon-news/forks","keys_url":"https://api.github.com/repos/bm-sms/daimon-news/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bm-sms/daimon-news/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bm-sms/daimon-news/teams","hooks_url":"https://api.github.com/repos/bm-sms/daimon-news/hooks","issue_events_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/events{/number}","events_url":"https://api.github.com/repos/bm-sms/daimon-news/events","assignees_url":"https://api.github.com/repos/bm-sms/daimon-news/assignees{/user}","branches_url":"https://api.github.com/repos/bm-sms/daimon-news/branches{/branch}","tags_url":"https://api.github.com/repos/bm-sms/daimon-news/tags","blobs_url":"https://api.github.com/repos/bm-sms/daimon-news/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bm-sms/daimon-news/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bm-sms/daimon-news/git/refs{/sha}","trees_url":"https://api.github.com/repos/bm-sms/daimon-news/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news/statuses/{sha}","languages_url":"https://api.github.com/repos/bm-sms/daimon-news/languages","stargazers_url":"https://api.github.com/repos/bm-sms/daimon-news/stargazers","contributors_url":"https://api.github.com/repos/bm-sms/daimon-news/contributors","subscribers_url":"https://api.github.com/repos/bm-sms/daimon-news/subscribers","subscription_url":"https://api.github.com/repos/bm-sms/daimon-news/subscription","commits_url":"https://api.github.com/repos/bm-sms/daimon-news/commits{/sha}","git_commits_url":"https://api.github.com/repos/bm-sms/daimon-news/git/commits{/sha}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news/comments{/number}","issue_comment_url":"https://api.github.com/repos/bm-sms/daimon-news/issues/comments{/number}","contents_url":"https://api.github.com/repos/bm-sms/daimon-news/contents/{+path}","compare_url":"https://api.github.com/repos/bm-sms/daimon-news/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bm-sms/daimon-news/merges","archive_url":"https://api.github.com/repos/bm-sms/daimon-news/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bm-sms/daimon-news/downloads","issues_url":"https://api.github.com/repos/bm-sms/daimon-news/issues{/number}","pulls_url":"https://api.github.com/repos/bm-sms/daimon-news/pulls{/number}","milestones_url":"https://api.github.com/repos/bm-sms/daimon-news/milestones{/number}","notifications_url":"https://api.github.com/repos/bm-sms/daimon-news/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bm-sms/daimon-news/labels{/name}","releases_url":"https://api.github.com/repos/bm-sms/daimon-news/releases{/id}","deployments_url":"https://api.github.com/repos/bm-sms/daimon-news/deployments","created_at":"2015-11-16T06:20:35Z","updated_at":"2016-06-02T22:32:01Z","pushed_at":"2016-10-26T09:03:43Z","git_url":"git://github.com/bm-sms/daimon-news.git","ssh_url":"git@github.com:bm-sms/daimon-news.git","clone_url":"https://github.com/bm-sms/daimon-news.git","svn_url":"https://github.com/bm-sms/daimon-news","homepage":"","size":1753,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/650"},"html":{"href":"https://github.com/bm-sms/daimon-news/pull/650"},"issue":{"href":"https://api.github.com/repos/bm-sms/daimon-news/issues/650"},"comments":{"href":"https://api.github.com/repos/bm-sms/daimon-news/issues/650/comments"},"review_comments":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/650/comments"},"review_comment":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bm-sms/daimon-news/pulls/650/commits"},"statuses":{"href":"https://api.github.com/repos/bm-sms/daimon-news/statuses/22cb552b8d2fd9c3bbf0169df69cbf0706f917ba"}}}}
{"actor":{"display_login":"okkez-bot"}}