{"action":"created","comment":{"url":"https://api.github.com/repos/cachethq/Cachet/pulls/comments/38359443","id":38359443,"diff_hunk":"@@ -107,19 +111,25 @@ public function showTemplates()\n      */\n     public function createIncidentAction()\n     {\n-        $incidentData = Binput::get('incident');\n-        $componentStatus = array_pull($incidentData, 'component_status');\n-\n-        if (array_has($incidentData, 'created_at') && $incidentData['created_at']) {\n-            $incidentDate = Date::createFromFormat('d/m/Y H:i', $incidentData['created_at'], Setting::get('app_timezone'))->setTimezone(Config::get('app.timezone'));\n-            $incidentData['created_at'] = $incidentDate;\n-            $incidentData['updated_at'] = $incidentDate;\n-        } else {\n-            unset($incidentData['created_at']);\n+        if ($createdAt = Binput::get('created_at')) {","path":"app/Http/Controllers/Dashboard/IncidentController.php","position":39,"original_position":39,"commit_id":"1478a2500891155933dd921eafd2d1778b84b9ef","original_commit_id":"1478a2500891155933dd921eafd2d1778b84b9ef","user":{"login":"joecohens","id":1803556,"avatar_url":"https://avatars.githubusercontent.com/u/1803556?v=3","gravatar_id":"","url":"https://api.github.com/users/joecohens","html_url":"https://github.com/joecohens","followers_url":"https://api.github.com/users/joecohens/followers","following_url":"https://api.github.com/users/joecohens/following{/other_user}","gists_url":"https://api.github.com/users/joecohens/gists{/gist_id}","starred_url":"https://api.github.com/users/joecohens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joecohens/subscriptions","organizations_url":"https://api.github.com/users/joecohens/orgs","repos_url":"https://api.github.com/users/joecohens/repos","events_url":"https://api.github.com/users/joecohens/events{/privacy}","received_events_url":"https://api.github.com/users/joecohens/received_events","type":"User","site_admin":false},"body":"@jbrooksuk I would move this functionality to the handler like we did on the AddMetricPointCommandHandler, what do you think?","created_at":"2015-08-31T21:05:25Z","updated_at":"2015-08-31T21:05:25Z","html_url":"https://github.com/cachethq/Cachet/pull/866#discussion_r38359443","pull_request_url":"https://api.github.com/repos/cachethq/Cachet/pulls/866","_links":{"self":{"href":"https://api.github.com/repos/cachethq/Cachet/pulls/comments/38359443"},"html":{"href":"https://github.com/cachethq/Cachet/pull/866#discussion_r38359443"},"pull_request":{"href":"https://api.github.com/repos/cachethq/Cachet/pulls/866"}}},"pull_request":{"url":"https://api.github.com/repos/cachethq/Cachet/pulls/866","id":41493065,"html_url":"https://github.com/cachethq/Cachet/pull/866","diff_url":"https://github.com/cachethq/Cachet/pull/866.diff","patch_url":"https://github.com/cachethq/Cachet/pull/866.patch","issue_url":"https://api.github.com/repos/cachethq/Cachet/issues/866","number":866,"state":"open","locked":false,"title":"[WIP] First steps to Commands","user":{"login":"joecohens","id":1803556,"avatar_url":"https://avatars.githubusercontent.com/u/1803556?v=3","gravatar_id":"","url":"https://api.github.com/users/joecohens","html_url":"https://github.com/joecohens","followers_url":"https://api.github.com/users/joecohens/followers","following_url":"https://api.github.com/users/joecohens/following{/other_user}","gists_url":"https://api.github.com/users/joecohens/gists{/gist_id}","starred_url":"https://api.github.com/users/joecohens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joecohens/subscriptions","organizations_url":"https://api.github.com/users/joecohens/orgs","repos_url":"https://api.github.com/users/joecohens/repos","events_url":"https://api.github.com/users/joecohens/events{/privacy}","received_events_url":"https://api.github.com/users/joecohens/received_events","type":"User","site_admin":false},"body":"- [x] Incidents\r\n   - [x] ReportIncident\r\n   - [x] ScheduleIncident\r\n   - [x] RemoveIncident\r\n- [x] Metrics\r\n   - [x] AddMetric\r\n   - [x] RemoveMetric\r\n- [x] MetricPoints\r\n   - [x] AddMetricPoint\r\n   - [x] RemoveMetricPoint\r\n- [x] Subscribers\r\n   - [x] SubscribeSubcriber\r\n   - [x] UnsubscribeSubcriber\r\n   - [x] VerifySubcriber\r\n- [x] Components\r\n   - [x] AddComponent\r\n   - [x] RemoveComponent\r\n- [x] ComponentGroup\r\n   - [x] AddComponentGroup\r\n   - [x] RemoveComponentGroup\r\n- [x] User\r\n   - [x] AddTeamMember\r\n   - [x] RemoveTeamMember\r\n   - [x] GenerateApiToken","created_at":"2015-08-03T18:02:21Z","updated_at":"2015-08-31T21:05:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38ae8e13d7c16b5bdf5407c90b3dfd585bff59b9","assignee":{"login":"joecohens","id":1803556,"avatar_url":"https://avatars.githubusercontent.com/u/1803556?v=3","gravatar_id":"","url":"https://api.github.com/users/joecohens","html_url":"https://github.com/joecohens","followers_url":"https://api.github.com/users/joecohens/followers","following_url":"https://api.github.com/users/joecohens/following{/other_user}","gists_url":"https://api.github.com/users/joecohens/gists{/gist_id}","starred_url":"https://api.github.com/users/joecohens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joecohens/subscriptions","organizations_url":"https://api.github.com/users/joecohens/orgs","repos_url":"https://api.github.com/users/joecohens/repos","events_url":"https://api.github.com/users/joecohens/events{/privacy}","received_events_url":"https://api.github.com/users/joecohens/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cachethq/Cachet/milestones/4","html_url":"https://github.com/cachethq/Cachet/milestones/V2.0.0","labels_url":"https://api.github.com/repos/cachethq/Cachet/milestones/4/labels","id":1225584,"number":4,"title":"V2.0.0","description":"","creator":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":48,"state":"open","created_at":"2015-07-25T15:18:20Z","updated_at":"2015-08-31T17:59:28Z","due_on":"2015-08-28T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cachethq/Cachet/pulls/866/commits","review_comments_url":"https://api.github.com/repos/cachethq/Cachet/pulls/866/comments","review_comment_url":"https://api.github.com/repos/cachethq/Cachet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cachethq/Cachet/issues/866/comments","statuses_url":"https://api.github.com/repos/cachethq/Cachet/statuses/1478a2500891155933dd921eafd2d1778b84b9ef","head":{"label":"cachethq:commands","ref":"commands","sha":"1478a2500891155933dd921eafd2d1778b84b9ef","user":{"login":"cachethq","id":9951502,"avatar_url":"https://avatars.githubusercontent.com/u/9951502?v=3","gravatar_id":"","url":"https://api.github.com/users/cachethq","html_url":"https://github.com/cachethq","followers_url":"https://api.github.com/users/cachethq/followers","following_url":"https://api.github.com/users/cachethq/following{/other_user}","gists_url":"https://api.github.com/users/cachethq/gists{/gist_id}","starred_url":"https://api.github.com/users/cachethq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachethq/subscriptions","organizations_url":"https://api.github.com/users/cachethq/orgs","repos_url":"https://api.github.com/users/cachethq/repos","events_url":"https://api.github.com/users/cachethq/events{/privacy}","received_events_url":"https://api.github.com/users/cachethq/received_events","type":"Organization","site_admin":false},"repo":{"id":26730195,"name":"Cachet","full_name":"cachethq/Cachet","owner":{"login":"cachethq","id":9951502,"avatar_url":"https://avatars.githubusercontent.com/u/9951502?v=3","gravatar_id":"","url":"https://api.github.com/users/cachethq","html_url":"https://github.com/cachethq","followers_url":"https://api.github.com/users/cachethq/followers","following_url":"https://api.github.com/users/cachethq/following{/other_user}","gists_url":"https://api.github.com/users/cachethq/gists{/gist_id}","starred_url":"https://api.github.com/users/cachethq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachethq/subscriptions","organizations_url":"https://api.github.com/users/cachethq/orgs","repos_url":"https://api.github.com/users/cachethq/repos","events_url":"https://api.github.com/users/cachethq/events{/privacy}","received_events_url":"https://api.github.com/users/cachethq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cachethq/Cachet","description":"An open source status page system, for everyone.","fork":false,"url":"https://api.github.com/repos/cachethq/Cachet","forks_url":"https://api.github.com/repos/cachethq/Cachet/forks","keys_url":"https://api.github.com/repos/cachethq/Cachet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cachethq/Cachet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cachethq/Cachet/teams","hooks_url":"https://api.github.com/repos/cachethq/Cachet/hooks","issue_events_url":"https://api.github.com/repos/cachethq/Cachet/issues/events{/number}","events_url":"https://api.github.com/repos/cachethq/Cachet/events","assignees_url":"https://api.github.com/repos/cachethq/Cachet/assignees{/user}","branches_url":"https://api.github.com/repos/cachethq/Cachet/branches{/branch}","tags_url":"https://api.github.com/repos/cachethq/Cachet/tags","blobs_url":"https://api.github.com/repos/cachethq/Cachet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cachethq/Cachet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cachethq/Cachet/git/refs{/sha}","trees_url":"https://api.github.com/repos/cachethq/Cachet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cachethq/Cachet/statuses/{sha}","languages_url":"https://api.github.com/repos/cachethq/Cachet/languages","stargazers_url":"https://api.github.com/repos/cachethq/Cachet/stargazers","contributors_url":"https://api.github.com/repos/cachethq/Cachet/contributors","subscribers_url":"https://api.github.com/repos/cachethq/Cachet/subscribers","subscription_url":"https://api.github.com/repos/cachethq/Cachet/subscription","commits_url":"https://api.github.com/repos/cachethq/Cachet/commits{/sha}","git_commits_url":"https://api.github.com/repos/cachethq/Cachet/git/commits{/sha}","comments_url":"https://api.github.com/repos/cachethq/Cachet/comments{/number}","issue_comment_url":"https://api.github.com/repos/cachethq/Cachet/issues/comments{/number}","contents_url":"https://api.github.com/repos/cachethq/Cachet/contents/{+path}","compare_url":"https://api.github.com/repos/cachethq/Cachet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cachethq/Cachet/merges","archive_url":"https://api.github.com/repos/cachethq/Cachet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cachethq/Cachet/downloads","issues_url":"https://api.github.com/repos/cachethq/Cachet/issues{/number}","pulls_url":"https://api.github.com/repos/cachethq/Cachet/pulls{/number}","milestones_url":"https://api.github.com/repos/cachethq/Cachet/milestones{/number}","notifications_url":"https://api.github.com/repos/cachethq/Cachet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cachethq/Cachet/labels{/name}","releases_url":"https://api.github.com/repos/cachethq/Cachet/releases{/id}","created_at":"2014-11-16T22:23:11Z","updated_at":"2015-08-31T18:52:19Z","pushed_at":"2015-08-31T19:16:50Z","git_url":"git://github.com/cachethq/Cachet.git","ssh_url":"git@github.com:cachethq/Cachet.git","clone_url":"https://github.com/cachethq/Cachet.git","svn_url":"https://github.com/cachethq/Cachet","homepage":"https://cachethq.io/","size":14714,"stargazers_count":2939,"watchers_count":2939,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":253,"mirror_url":null,"open_issues_count":25,"forks":253,"open_issues":25,"watchers":2939,"default_branch":"1.2"}},"base":{"label":"cachethq:master","ref":"master","sha":"77ce0e21f4512bb5e0994fa4da434203e58452eb","user":{"login":"cachethq","id":9951502,"avatar_url":"https://avatars.githubusercontent.com/u/9951502?v=3","gravatar_id":"","url":"https://api.github.com/users/cachethq","html_url":"https://github.com/cachethq","followers_url":"https://api.github.com/users/cachethq/followers","following_url":"https://api.github.com/users/cachethq/following{/other_user}","gists_url":"https://api.github.com/users/cachethq/gists{/gist_id}","starred_url":"https://api.github.com/users/cachethq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachethq/subscriptions","organizations_url":"https://api.github.com/users/cachethq/orgs","repos_url":"https://api.github.com/users/cachethq/repos","events_url":"https://api.github.com/users/cachethq/events{/privacy}","received_events_url":"https://api.github.com/users/cachethq/received_events","type":"Organization","site_admin":false},"repo":{"id":26730195,"name":"Cachet","full_name":"cachethq/Cachet","owner":{"login":"cachethq","id":9951502,"avatar_url":"https://avatars.githubusercontent.com/u/9951502?v=3","gravatar_id":"","url":"https://api.github.com/users/cachethq","html_url":"https://github.com/cachethq","followers_url":"https://api.github.com/users/cachethq/followers","following_url":"https://api.github.com/users/cachethq/following{/other_user}","gists_url":"https://api.github.com/users/cachethq/gists{/gist_id}","starred_url":"https://api.github.com/users/cachethq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachethq/subscriptions","organizations_url":"https://api.github.com/users/cachethq/orgs","repos_url":"https://api.github.com/users/cachethq/repos","events_url":"https://api.github.com/users/cachethq/events{/privacy}","received_events_url":"https://api.github.com/users/cachethq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cachethq/Cachet","description":"An open source status page system, for everyone.","fork":false,"url":"https://api.github.com/repos/cachethq/Cachet","forks_url":"https://api.github.com/repos/cachethq/Cachet/forks","keys_url":"https://api.github.com/repos/cachethq/Cachet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cachethq/Cachet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cachethq/Cachet/teams","hooks_url":"https://api.github.com/repos/cachethq/Cachet/hooks","issue_events_url":"https://api.github.com/repos/cachethq/Cachet/issues/events{/number}","events_url":"https://api.github.com/repos/cachethq/Cachet/events","assignees_url":"https://api.github.com/repos/cachethq/Cachet/assignees{/user}","branches_url":"https://api.github.com/repos/cachethq/Cachet/branches{/branch}","tags_url":"https://api.github.com/repos/cachethq/Cachet/tags","blobs_url":"https://api.github.com/repos/cachethq/Cachet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cachethq/Cachet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cachethq/Cachet/git/refs{/sha}","trees_url":"https://api.github.com/repos/cachethq/Cachet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cachethq/Cachet/statuses/{sha}","languages_url":"https://api.github.com/repos/cachethq/Cachet/languages","stargazers_url":"https://api.github.com/repos/cachethq/Cachet/stargazers","contributors_url":"https://api.github.com/repos/cachethq/Cachet/contributors","subscribers_url":"https://api.github.com/repos/cachethq/Cachet/subscribers","subscription_url":"https://api.github.com/repos/cachethq/Cachet/subscription","commits_url":"https://api.github.com/repos/cachethq/Cachet/commits{/sha}","git_commits_url":"https://api.github.com/repos/cachethq/Cachet/git/commits{/sha}","comments_url":"https://api.github.com/repos/cachethq/Cachet/comments{/number}","issue_comment_url":"https://api.github.com/repos/cachethq/Cachet/issues/comments{/number}","contents_url":"https://api.github.com/repos/cachethq/Cachet/contents/{+path}","compare_url":"https://api.github.com/repos/cachethq/Cachet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cachethq/Cachet/merges","archive_url":"https://api.github.com/repos/cachethq/Cachet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cachethq/Cachet/downloads","issues_url":"https://api.github.com/repos/cachethq/Cachet/issues{/number}","pulls_url":"https://api.github.com/repos/cachethq/Cachet/pulls{/number}","milestones_url":"https://api.github.com/repos/cachethq/Cachet/milestones{/number}","notifications_url":"https://api.github.com/repos/cachethq/Cachet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cachethq/Cachet/labels{/name}","releases_url":"https://api.github.com/repos/cachethq/Cachet/releases{/id}","created_at":"2014-11-16T22:23:11Z","updated_at":"2015-08-31T18:52:19Z","pushed_at":"2015-08-31T19:16:50Z","git_url":"git://github.com/cachethq/Cachet.git","ssh_url":"git@github.com:cachethq/Cachet.git","clone_url":"https://github.com/cachethq/Cachet.git","svn_url":"https://github.com/cachethq/Cachet","homepage":"https://cachethq.io/","size":14714,"stargazers_count":2939,"watchers_count":2939,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":253,"mirror_url":null,"open_issues_count":25,"forks":253,"open_issues":25,"watchers":2939,"default_branch":"1.2"}},"_links":{"self":{"href":"https://api.github.com/repos/cachethq/Cachet/pulls/866"},"html":{"href":"https://github.com/cachethq/Cachet/pull/866"},"issue":{"href":"https://api.github.com/repos/cachethq/Cachet/issues/866"},"comments":{"href":"https://api.github.com/repos/cachethq/Cachet/issues/866/comments"},"review_comments":{"href":"https://api.github.com/repos/cachethq/Cachet/pulls/866/comments"},"review_comment":{"href":"https://api.github.com/repos/cachethq/Cachet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cachethq/Cachet/pulls/866/commits"},"statuses":{"href":"https://api.github.com/repos/cachethq/Cachet/statuses/1478a2500891155933dd921eafd2d1778b84b9ef"}}}}