{"action":"created","comment":{"url":"https://api.github.com/repos/mrtc0/todo/pulls/comments/205000783","pull_request_review_id":140182785,"id":205000783,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTAwMDc4Mw==","diff_hunk":"@@ -87,4 +87,22 @@\n     expect_task = Task.filter_by_title('task').filter_by_status('doing')\n     expect(page.all('tbody tr').count).to eq(expect_task.count)\n   end\n+\n+  example '優先度が高い順でソートされること' do\n+    create_list(:priority_is_random_task, 10)\n+    visit tasks_path\n+    click_link('sort_by_priority_desc')\n+    @expire_priorities = page.all('#priority').map(&:text)","path":"spec/features/tasks_spec.rb","position":null,"original_position":9,"commit_id":"386932f0f5b378bd9874574eb7a3b3c83825e793","original_commit_id":"b36c129f89edfb9e85aadec698f2ffe7ad440cde","user":{"login":"june29","id":3970,"node_id":"MDQ6VXNlcjM5NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/3970?v=4","gravatar_id":"","url":"https://api.github.com/users/june29","html_url":"https://github.com/june29","followers_url":"https://api.github.com/users/june29/followers","following_url":"https://api.github.com/users/june29/following{/other_user}","gists_url":"https://api.github.com/users/june29/gists{/gist_id}","starred_url":"https://api.github.com/users/june29/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/june29/subscriptions","organizations_url":"https://api.github.com/users/june29/orgs","repos_url":"https://api.github.com/users/june29/repos","events_url":"https://api.github.com/users/june29/events{/privacy}","received_events_url":"https://api.github.com/users/june29/received_events","type":"User","site_admin":false},"body":"あー、そういうことか :bulb:\r\n","created_at":"2018-07-25T07:02:12Z","updated_at":"2018-07-25T07:02:12Z","html_url":"https://github.com/mrtc0/todo/pull/29#discussion_r205000783","pull_request_url":"https://api.github.com/repos/mrtc0/todo/pulls/29","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mrtc0/todo/pulls/comments/205000783"},"html":{"href":"https://github.com/mrtc0/todo/pull/29#discussion_r205000783"},"pull_request":{"href":"https://api.github.com/repos/mrtc0/todo/pulls/29"}},"in_reply_to_id":204998658},"pull_request":{"url":"https://api.github.com/repos/mrtc0/todo/pulls/29","id":202750828,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNzUwODI4","html_url":"https://github.com/mrtc0/todo/pull/29","diff_url":"https://github.com/mrtc0/todo/pull/29.diff","patch_url":"https://github.com/mrtc0/todo/pull/29.patch","issue_url":"https://api.github.com/repos/mrtc0/todo/issues/29","number":29,"state":"open","locked":false,"title":"タスクを優先順位でソートできるようにした","user":{"login":"mrtc0","id":5842353,"node_id":"MDQ6VXNlcjU4NDIzNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5842353?v=4","gravatar_id":"","url":"https://api.github.com/users/mrtc0","html_url":"https://github.com/mrtc0","followers_url":"https://api.github.com/users/mrtc0/followers","following_url":"https://api.github.com/users/mrtc0/following{/other_user}","gists_url":"https://api.github.com/users/mrtc0/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtc0/subscriptions","organizations_url":"https://api.github.com/users/mrtc0/orgs","repos_url":"https://api.github.com/users/mrtc0/repos","events_url":"https://api.github.com/users/mrtc0/events{/privacy}","received_events_url":"https://api.github.com/users/mrtc0/received_events","type":"User","site_admin":false},"body":"### 概要\r\n\r\nタスクの優先度でソートできるようにしました。`DESC` を指定した場合は High ~ Non の順に、それ以外の場合は Non ~ High の順番でソートされます。\r\n\r\n<img width=\"601\" alt=\"2018-07-20 14 29 45\" src=\"https://user-images.githubusercontent.com/5842353/42984816-6610623c-8c29-11e8-9d66-07723680af0a.png\">\r\n\r\n#### 補足\r\n\r\nコントローラーに条件が増えて来てつらくなってきたので、今回のアクションは `before_action` で処理することにしました。  \r\n`search_controller` として切り出すほうが良いのかなと思ったりしたのですが、もうこれ以上タスクをソートできる要素がないことから、今回の方針にしました。\r\n\r\n### レビュアー\r\n\r\n@june29 さん, 誰でも","created_at":"2018-07-20T05:34:53Z","updated_at":"2018-07-25T07:02:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa96451099aeb366bd45b497f27f1bee1ce7ce06","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mrtc0/todo/pulls/29/commits","review_comments_url":"https://api.github.com/repos/mrtc0/todo/pulls/29/comments","review_comment_url":"https://api.github.com/repos/mrtc0/todo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrtc0/todo/issues/29/comments","statuses_url":"https://api.github.com/repos/mrtc0/todo/statuses/386932f0f5b378bd9874574eb7a3b3c83825e793","head":{"label":"mrtc0:sort-by-priority","ref":"sort-by-priority","sha":"386932f0f5b378bd9874574eb7a3b3c83825e793","user":{"login":"mrtc0","id":5842353,"node_id":"MDQ6VXNlcjU4NDIzNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5842353?v=4","gravatar_id":"","url":"https://api.github.com/users/mrtc0","html_url":"https://github.com/mrtc0","followers_url":"https://api.github.com/users/mrtc0/followers","following_url":"https://api.github.com/users/mrtc0/following{/other_user}","gists_url":"https://api.github.com/users/mrtc0/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtc0/subscriptions","organizations_url":"https://api.github.com/users/mrtc0/orgs","repos_url":"https://api.github.com/users/mrtc0/repos","events_url":"https://api.github.com/users/mrtc0/events{/privacy}","received_events_url":"https://api.github.com/users/mrtc0/received_events","type":"User","site_admin":false},"repo":{"id":137699736,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc2OTk3MzY=","name":"todo","full_name":"mrtc0/todo","owner":{"login":"mrtc0","id":5842353,"node_id":"MDQ6VXNlcjU4NDIzNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5842353?v=4","gravatar_id":"","url":"https://api.github.com/users/mrtc0","html_url":"https://github.com/mrtc0","followers_url":"https://api.github.com/users/mrtc0/followers","following_url":"https://api.github.com/users/mrtc0/following{/other_user}","gists_url":"https://api.github.com/users/mrtc0/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtc0/subscriptions","organizations_url":"https://api.github.com/users/mrtc0/orgs","repos_url":"https://api.github.com/users/mrtc0/repos","events_url":"https://api.github.com/users/mrtc0/events{/privacy}","received_events_url":"https://api.github.com/users/mrtc0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrtc0/todo","description":null,"fork":false,"url":"https://api.github.com/repos/mrtc0/todo","forks_url":"https://api.github.com/repos/mrtc0/todo/forks","keys_url":"https://api.github.com/repos/mrtc0/todo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrtc0/todo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrtc0/todo/teams","hooks_url":"https://api.github.com/repos/mrtc0/todo/hooks","issue_events_url":"https://api.github.com/repos/mrtc0/todo/issues/events{/number}","events_url":"https://api.github.com/repos/mrtc0/todo/events","assignees_url":"https://api.github.com/repos/mrtc0/todo/assignees{/user}","branches_url":"https://api.github.com/repos/mrtc0/todo/branches{/branch}","tags_url":"https://api.github.com/repos/mrtc0/todo/tags","blobs_url":"https://api.github.com/repos/mrtc0/todo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrtc0/todo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrtc0/todo/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrtc0/todo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrtc0/todo/statuses/{sha}","languages_url":"https://api.github.com/repos/mrtc0/todo/languages","stargazers_url":"https://api.github.com/repos/mrtc0/todo/stargazers","contributors_url":"https://api.github.com/repos/mrtc0/todo/contributors","subscribers_url":"https://api.github.com/repos/mrtc0/todo/subscribers","subscription_url":"https://api.github.com/repos/mrtc0/todo/subscription","commits_url":"https://api.github.com/repos/mrtc0/todo/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrtc0/todo/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrtc0/todo/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrtc0/todo/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrtc0/todo/contents/{+path}","compare_url":"https://api.github.com/repos/mrtc0/todo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrtc0/todo/merges","archive_url":"https://api.github.com/repos/mrtc0/todo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrtc0/todo/downloads","issues_url":"https://api.github.com/repos/mrtc0/todo/issues{/number}","pulls_url":"https://api.github.com/repos/mrtc0/todo/pulls{/number}","milestones_url":"https://api.github.com/repos/mrtc0/todo/milestones{/number}","notifications_url":"https://api.github.com/repos/mrtc0/todo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrtc0/todo/labels{/name}","releases_url":"https://api.github.com/repos/mrtc0/todo/releases{/id}","deployments_url":"https://api.github.com/repos/mrtc0/todo/deployments","created_at":"2018-06-18T01:33:06Z","updated_at":"2018-07-18T07:23:59Z","pushed_at":"2018-07-25T07:00:29Z","git_url":"git://github.com/mrtc0/todo.git","ssh_url":"git@github.com:mrtc0/todo.git","clone_url":"https://github.com/mrtc0/todo.git","svn_url":"https://github.com/mrtc0/todo","homepage":null,"size":237,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"mrtc0:master","ref":"master","sha":"ab8b5686c45bbc1d245a3e6919286bc36ec486e0","user":{"login":"mrtc0","id":5842353,"node_id":"MDQ6VXNlcjU4NDIzNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5842353?v=4","gravatar_id":"","url":"https://api.github.com/users/mrtc0","html_url":"https://github.com/mrtc0","followers_url":"https://api.github.com/users/mrtc0/followers","following_url":"https://api.github.com/users/mrtc0/following{/other_user}","gists_url":"https://api.github.com/users/mrtc0/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtc0/subscriptions","organizations_url":"https://api.github.com/users/mrtc0/orgs","repos_url":"https://api.github.com/users/mrtc0/repos","events_url":"https://api.github.com/users/mrtc0/events{/privacy}","received_events_url":"https://api.github.com/users/mrtc0/received_events","type":"User","site_admin":false},"repo":{"id":137699736,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc2OTk3MzY=","name":"todo","full_name":"mrtc0/todo","owner":{"login":"mrtc0","id":5842353,"node_id":"MDQ6VXNlcjU4NDIzNTM=","avatar_url":"https://avatars2.githubusercontent.com/u/5842353?v=4","gravatar_id":"","url":"https://api.github.com/users/mrtc0","html_url":"https://github.com/mrtc0","followers_url":"https://api.github.com/users/mrtc0/followers","following_url":"https://api.github.com/users/mrtc0/following{/other_user}","gists_url":"https://api.github.com/users/mrtc0/gists{/gist_id}","starred_url":"https://api.github.com/users/mrtc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrtc0/subscriptions","organizations_url":"https://api.github.com/users/mrtc0/orgs","repos_url":"https://api.github.com/users/mrtc0/repos","events_url":"https://api.github.com/users/mrtc0/events{/privacy}","received_events_url":"https://api.github.com/users/mrtc0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrtc0/todo","description":null,"fork":false,"url":"https://api.github.com/repos/mrtc0/todo","forks_url":"https://api.github.com/repos/mrtc0/todo/forks","keys_url":"https://api.github.com/repos/mrtc0/todo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrtc0/todo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrtc0/todo/teams","hooks_url":"https://api.github.com/repos/mrtc0/todo/hooks","issue_events_url":"https://api.github.com/repos/mrtc0/todo/issues/events{/number}","events_url":"https://api.github.com/repos/mrtc0/todo/events","assignees_url":"https://api.github.com/repos/mrtc0/todo/assignees{/user}","branches_url":"https://api.github.com/repos/mrtc0/todo/branches{/branch}","tags_url":"https://api.github.com/repos/mrtc0/todo/tags","blobs_url":"https://api.github.com/repos/mrtc0/todo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrtc0/todo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrtc0/todo/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrtc0/todo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrtc0/todo/statuses/{sha}","languages_url":"https://api.github.com/repos/mrtc0/todo/languages","stargazers_url":"https://api.github.com/repos/mrtc0/todo/stargazers","contributors_url":"https://api.github.com/repos/mrtc0/todo/contributors","subscribers_url":"https://api.github.com/repos/mrtc0/todo/subscribers","subscription_url":"https://api.github.com/repos/mrtc0/todo/subscription","commits_url":"https://api.github.com/repos/mrtc0/todo/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrtc0/todo/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrtc0/todo/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrtc0/todo/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrtc0/todo/contents/{+path}","compare_url":"https://api.github.com/repos/mrtc0/todo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrtc0/todo/merges","archive_url":"https://api.github.com/repos/mrtc0/todo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrtc0/todo/downloads","issues_url":"https://api.github.com/repos/mrtc0/todo/issues{/number}","pulls_url":"https://api.github.com/repos/mrtc0/todo/pulls{/number}","milestones_url":"https://api.github.com/repos/mrtc0/todo/milestones{/number}","notifications_url":"https://api.github.com/repos/mrtc0/todo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrtc0/todo/labels{/name}","releases_url":"https://api.github.com/repos/mrtc0/todo/releases{/id}","deployments_url":"https://api.github.com/repos/mrtc0/todo/deployments","created_at":"2018-06-18T01:33:06Z","updated_at":"2018-07-18T07:23:59Z","pushed_at":"2018-07-25T07:00:29Z","git_url":"git://github.com/mrtc0/todo.git","ssh_url":"git@github.com:mrtc0/todo.git","clone_url":"https://github.com/mrtc0/todo.git","svn_url":"https://github.com/mrtc0/todo","homepage":null,"size":237,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mrtc0/todo/pulls/29"},"html":{"href":"https://github.com/mrtc0/todo/pull/29"},"issue":{"href":"https://api.github.com/repos/mrtc0/todo/issues/29"},"comments":{"href":"https://api.github.com/repos/mrtc0/todo/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/mrtc0/todo/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/mrtc0/todo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrtc0/todo/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/mrtc0/todo/statuses/386932f0f5b378bd9874574eb7a3b3c83825e793"}},"author_association":"OWNER"}}
{"actor":{"display_login":"june29"}}