{"action":"created","comment":{"url":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/comments/242023567","pull_request_review_id":185436184,"id":242023567,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjAyMzU2Nw==","diff_hunk":"@@ -25,10 +27,20 @@ def import_work_times\n       calendars_service = CalendarsService.new\n       calendar_datas = calendars_service.google_calendar_api(params)\n \n-      calendar_datas.each do |calendar_data|\n-        work_times << WorkTime.new(time: calc_work_time(calendar_data.start.dateTime, calendar_data.end.dateTime),\n-        category_id: 34, created_at: calendar_data.start.dateTime, updated_at: calendar_data.end.dateTime,\n-        user_id: 1111)\n+      if Rails.env == 'development'\n+        calendar_datas.each do |calendar_data|\n+          work_times << WorkTime.new(time: calc_work_time(calendar_data.start.dateTime, calendar_data.end.dateTime),\n+          category_id: 34, created_at: calendar_data.start.dateTime, updated_at: calendar_data.end.dateTime,\n+          user_id: 1111)\n+        end\n+      end\n+\n+      if Rails.env == 'test'\n+        calendar_datas.each do |calendar_data|\n+          work_times << WorkTime.new(time: calc_work_time(calendar_data[:start][:dateTime], calendar_data[:end][:dateTime]),\n+          category_id: 34, created_at: calendar_data[:start][:dateTime], updated_at: calendar_data[:end][:dateTime],\n+          user_id: 1111)\n+        end\n       end","path":"app/controllers/api/v1/work_times_controller.rb","position":40,"original_position":40,"commit_id":"7271fc8dbd012673585443803f6da1f31e819808","original_commit_id":"7271fc8dbd012673585443803f6da1f31e819808","user":{"login":"bp-dev-share","id":43743959,"node_id":"MDQ6VXNlcjQzNzQzOTU5","avatar_url":"https://avatars1.githubusercontent.com/u/43743959?v=4","gravatar_id":"","url":"https://api.github.com/users/bp-dev-share","html_url":"https://github.com/bp-dev-share","followers_url":"https://api.github.com/users/bp-dev-share/followers","following_url":"https://api.github.com/users/bp-dev-share/following{/other_user}","gists_url":"https://api.github.com/users/bp-dev-share/gists{/gist_id}","starred_url":"https://api.github.com/users/bp-dev-share/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bp-dev-share/subscriptions","organizations_url":"https://api.github.com/users/bp-dev-share/orgs","repos_url":"https://api.github.com/users/bp-dev-share/repos","events_url":"https://api.github.com/users/bp-dev-share/events{/privacy}","received_events_url":"https://api.github.com/users/bp-dev-share/received_events","type":"User","site_admin":false},"body":"あれ、これだとdevとtestしか処理が動かない気がするんですが、productionとかは動かさなくていいんでしたっけ？","created_at":"2018-12-17T04:32:14Z","updated_at":"2018-12-17T04:35:13Z","html_url":"https://github.com/Nanbeee/aggregate_graph/pull/27#discussion_r242023567","pull_request_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/27","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/comments/242023567"},"html":{"href":"https://github.com/Nanbeee/aggregate_graph/pull/27#discussion_r242023567"},"pull_request":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/27","id":239017514,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MDE3NTE0","html_url":"https://github.com/Nanbeee/aggregate_graph/pull/27","diff_url":"https://github.com/Nanbeee/aggregate_graph/pull/27.diff","patch_url":"https://github.com/Nanbeee/aggregate_graph/pull/27.patch","issue_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues/27","number":27,"state":"open","locked":false,"title":"controllerのテストファイル作成","user":{"login":"Nanbeee","id":43743270,"node_id":"MDQ6VXNlcjQzNzQzMjcw","avatar_url":"https://avatars1.githubusercontent.com/u/43743270?v=4","gravatar_id":"","url":"https://api.github.com/users/Nanbeee","html_url":"https://github.com/Nanbeee","followers_url":"https://api.github.com/users/Nanbeee/followers","following_url":"https://api.github.com/users/Nanbeee/following{/other_user}","gists_url":"https://api.github.com/users/Nanbeee/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanbeee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanbeee/subscriptions","organizations_url":"https://api.github.com/users/Nanbeee/orgs","repos_url":"https://api.github.com/users/Nanbeee/repos","events_url":"https://api.github.com/users/Nanbeee/events{/privacy}","received_events_url":"https://api.github.com/users/Nanbeee/received_events","type":"User","site_admin":false},"body":"## なぜ必要か\r\n*テストのため\r\n\r\n## どういう対応か\r\n*controllerのテストファイル作成\r\n\r\n### Front\r\n*\r\n\r\n### Server\r\n*\r\n\r\n## その他確認したいこと等\r\n* \r\n","created_at":"2018-12-17T03:26:56Z","updated_at":"2018-12-17T04:35:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"856eff1c22149be7cedc473b05bb3a48f1c152bd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/27/commits","review_comments_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/27/comments","review_comment_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues/27/comments","statuses_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/statuses/7271fc8dbd012673585443803f6da1f31e819808","head":{"label":"Nanbeee:featuer/create_category_controller_spec","ref":"featuer/create_category_controller_spec","sha":"7271fc8dbd012673585443803f6da1f31e819808","user":{"login":"Nanbeee","id":43743270,"node_id":"MDQ6VXNlcjQzNzQzMjcw","avatar_url":"https://avatars1.githubusercontent.com/u/43743270?v=4","gravatar_id":"","url":"https://api.github.com/users/Nanbeee","html_url":"https://github.com/Nanbeee","followers_url":"https://api.github.com/users/Nanbeee/followers","following_url":"https://api.github.com/users/Nanbeee/following{/other_user}","gists_url":"https://api.github.com/users/Nanbeee/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanbeee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanbeee/subscriptions","organizations_url":"https://api.github.com/users/Nanbeee/orgs","repos_url":"https://api.github.com/users/Nanbeee/repos","events_url":"https://api.github.com/users/Nanbeee/events{/privacy}","received_events_url":"https://api.github.com/users/Nanbeee/received_events","type":"User","site_admin":false},"repo":{"id":151062564,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEwNjI1NjQ=","name":"aggregate_graph","full_name":"Nanbeee/aggregate_graph","private":false,"owner":{"login":"Nanbeee","id":43743270,"node_id":"MDQ6VXNlcjQzNzQzMjcw","avatar_url":"https://avatars1.githubusercontent.com/u/43743270?v=4","gravatar_id":"","url":"https://api.github.com/users/Nanbeee","html_url":"https://github.com/Nanbeee","followers_url":"https://api.github.com/users/Nanbeee/followers","following_url":"https://api.github.com/users/Nanbeee/following{/other_user}","gists_url":"https://api.github.com/users/Nanbeee/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanbeee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanbeee/subscriptions","organizations_url":"https://api.github.com/users/Nanbeee/orgs","repos_url":"https://api.github.com/users/Nanbeee/repos","events_url":"https://api.github.com/users/Nanbeee/events{/privacy}","received_events_url":"https://api.github.com/users/Nanbeee/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Nanbeee/aggregate_graph","description":null,"fork":false,"url":"https://api.github.com/repos/Nanbeee/aggregate_graph","forks_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/forks","keys_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/teams","hooks_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/hooks","issue_events_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues/events{/number}","events_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/events","assignees_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/assignees{/user}","branches_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/branches{/branch}","tags_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/tags","blobs_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/statuses/{sha}","languages_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/languages","stargazers_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/stargazers","contributors_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/contributors","subscribers_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/subscribers","subscription_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/subscription","commits_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/contents/{+path}","compare_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/merges","archive_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/downloads","issues_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues{/number}","pulls_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls{/number}","milestones_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/milestones{/number}","notifications_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/labels{/name}","releases_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/releases{/id}","deployments_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/deployments","created_at":"2018-10-01T09:11:54Z","updated_at":"2018-11-14T09:34:08Z","pushed_at":"2018-12-17T03:26:57Z","git_url":"git://github.com/Nanbeee/aggregate_graph.git","ssh_url":"git@github.com:Nanbeee/aggregate_graph.git","clone_url":"https://github.com/Nanbeee/aggregate_graph.git","svn_url":"https://github.com/Nanbeee/aggregate_graph","homepage":null,"size":25905,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Nanbeee:example_view","ref":"example_view","sha":"a1a27ab7c8db32054ac09635a3678faae734733c","user":{"login":"Nanbeee","id":43743270,"node_id":"MDQ6VXNlcjQzNzQzMjcw","avatar_url":"https://avatars1.githubusercontent.com/u/43743270?v=4","gravatar_id":"","url":"https://api.github.com/users/Nanbeee","html_url":"https://github.com/Nanbeee","followers_url":"https://api.github.com/users/Nanbeee/followers","following_url":"https://api.github.com/users/Nanbeee/following{/other_user}","gists_url":"https://api.github.com/users/Nanbeee/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanbeee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanbeee/subscriptions","organizations_url":"https://api.github.com/users/Nanbeee/orgs","repos_url":"https://api.github.com/users/Nanbeee/repos","events_url":"https://api.github.com/users/Nanbeee/events{/privacy}","received_events_url":"https://api.github.com/users/Nanbeee/received_events","type":"User","site_admin":false},"repo":{"id":151062564,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEwNjI1NjQ=","name":"aggregate_graph","full_name":"Nanbeee/aggregate_graph","private":false,"owner":{"login":"Nanbeee","id":43743270,"node_id":"MDQ6VXNlcjQzNzQzMjcw","avatar_url":"https://avatars1.githubusercontent.com/u/43743270?v=4","gravatar_id":"","url":"https://api.github.com/users/Nanbeee","html_url":"https://github.com/Nanbeee","followers_url":"https://api.github.com/users/Nanbeee/followers","following_url":"https://api.github.com/users/Nanbeee/following{/other_user}","gists_url":"https://api.github.com/users/Nanbeee/gists{/gist_id}","starred_url":"https://api.github.com/users/Nanbeee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nanbeee/subscriptions","organizations_url":"https://api.github.com/users/Nanbeee/orgs","repos_url":"https://api.github.com/users/Nanbeee/repos","events_url":"https://api.github.com/users/Nanbeee/events{/privacy}","received_events_url":"https://api.github.com/users/Nanbeee/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Nanbeee/aggregate_graph","description":null,"fork":false,"url":"https://api.github.com/repos/Nanbeee/aggregate_graph","forks_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/forks","keys_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/teams","hooks_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/hooks","issue_events_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues/events{/number}","events_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/events","assignees_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/assignees{/user}","branches_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/branches{/branch}","tags_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/tags","blobs_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/statuses/{sha}","languages_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/languages","stargazers_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/stargazers","contributors_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/contributors","subscribers_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/subscribers","subscription_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/subscription","commits_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/contents/{+path}","compare_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/merges","archive_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/downloads","issues_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues{/number}","pulls_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls{/number}","milestones_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/milestones{/number}","notifications_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/labels{/name}","releases_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/releases{/id}","deployments_url":"https://api.github.com/repos/Nanbeee/aggregate_graph/deployments","created_at":"2018-10-01T09:11:54Z","updated_at":"2018-11-14T09:34:08Z","pushed_at":"2018-12-17T03:26:57Z","git_url":"git://github.com/Nanbeee/aggregate_graph.git","ssh_url":"git@github.com:Nanbeee/aggregate_graph.git","clone_url":"https://github.com/Nanbeee/aggregate_graph.git","svn_url":"https://github.com/Nanbeee/aggregate_graph","homepage":null,"size":25905,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/27"},"html":{"href":"https://github.com/Nanbeee/aggregate_graph/pull/27"},"issue":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues/27"},"comments":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/Nanbeee/aggregate_graph/statuses/7271fc8dbd012673585443803f6da1f31e819808"}},"author_association":"OWNER"}}
{"actor":{"display_login":"bp-dev-share"}}