{"action":"created","comment":{"url":"https://api.github.com/repos/idevelopment/serviceforce/pulls/comments/74713892","id":74713892,"diff_hunk":"@@ -54,39 +52,48 @@ public function handle()\n       $apiUrl   = 'https://api.leaseweb.com/v1';\n \n       // Get all servers that need to execute provisioning\n-      $PayAsYouGo = Servers::where('status', 'progress')\n-               ->orderBy('id', 'asc')\n-               ->get();\n+      $PayAsYouGo = Servers::where('status', 'Provisioning')->orderBy('id', 'asc')->get();\n \n  foreach($PayAsYouGo as $order){\n \n-    $serverId = $order->bareMetalId;\n-\n-     $installResource = \"/bareMetals/$serverId/installationStatus\";\n+      $serverId = $order->bareMetalId;\n+      $installResource = \"/bareMetals/$serverId/installationStatus\";\n \n       $checkInstall = curl_init();\n       curl_setopt($checkInstall, CURLOPT_URL, $apiUrl . $installResource);\n       curl_setopt($checkInstall, CURLOPT_RETURNTRANSFER, 1);\n       curl_setopt($checkInstall, CURLOPT_HTTPHEADER, array(\"X-Lsw-Auth: $apiKey\"));\n       $verify = curl_exec($checkInstall);\n       $data = json_decode($verify, true);\n+      $status = $data[\"installationStatus\"][\"description\"];\n+      print_r($data);\n \n-      if($data[\"installationStatus\"][\"code\"] = \"1000\"){\n-        Servers::where('id', $order->id)\n-         ->where('status', 'progress')\n-         ->update(['status' => 'completed', 'bareMetalId' => $order->bareMetalId]);\n-      }\n-      else{\n+      if($status == \"Installing\"){\n \n-      Mail::send('emails.serverInstall', $data, function ($message) {\n-        $message->from('provisioning@idevelopment.be', 'iDevelopment Provisioning');\n-        $message->subject(\"Checking installation process - $order->bareMetalId \");\n-        $message->to('support@idevelopment.be');\n-        }\n-      });\n+        Mail::send('emails.serverInstall', $data, function ($message) {\n+          $message->from('no-reply@idevelopment.be', 'iDevelopment Provisioning');\n+          $message->to('sales@idevelopment.be');\n+          $message->subject(\"Installation still running\");","path":"app/Console/Commands/CheckServerInstall.php","position":52,"original_position":52,"commit_id":"931061327d399dbed7886732dd3141acdd6f8e79","original_commit_id":"931061327d399dbed7886732dd3141acdd6f8e79","user":{"login":"Nitpick-CI","id":12626182,"avatar_url":"https://avatars.githubusercontent.com/u/12626182?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitpick-CI","html_url":"https://github.com/Nitpick-CI","followers_url":"https://api.github.com/users/Nitpick-CI/followers","following_url":"https://api.github.com/users/Nitpick-CI/following{/other_user}","gists_url":"https://api.github.com/users/Nitpick-CI/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitpick-CI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitpick-CI/subscriptions","organizations_url":"https://api.github.com/users/Nitpick-CI/orgs","repos_url":"https://api.github.com/users/Nitpick-CI/repos","events_url":"https://api.github.com/users/Nitpick-CI/events{/privacy}","received_events_url":"https://api.github.com/users/Nitpick-CI/received_events","type":"User","site_admin":false},"body":"Line indented incorrectly; expected at least 12 spaces, found 10","created_at":"2016-08-15T01:44:46Z","updated_at":"2016-08-15T01:44:46Z","html_url":"https://github.com/idevelopment/serviceforce/pull/68#discussion_r74713892","pull_request_url":"https://api.github.com/repos/idevelopment/serviceforce/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/idevelopment/serviceforce/pulls/comments/74713892"},"html":{"href":"https://github.com/idevelopment/serviceforce/pull/68#discussion_r74713892"},"pull_request":{"href":"https://api.github.com/repos/idevelopment/serviceforce/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/idevelopment/serviceforce/pulls/68","id":81219893,"html_url":"https://github.com/idevelopment/serviceforce/pull/68","diff_url":"https://github.com/idevelopment/serviceforce/pull/68.diff","patch_url":"https://github.com/idevelopment/serviceforce/pull/68.patch","issue_url":"https://api.github.com/repos/idevelopment/serviceforce/issues/68","number":68,"state":"open","locked":false,"title":"Disable register routes","user":{"login":"Tjoosten","id":5157609,"avatar_url":"https://avatars.githubusercontent.com/u/5157609?v=3","gravatar_id":"","url":"https://api.github.com/users/Tjoosten","html_url":"https://github.com/Tjoosten","followers_url":"https://api.github.com/users/Tjoosten/followers","following_url":"https://api.github.com/users/Tjoosten/following{/other_user}","gists_url":"https://api.github.com/users/Tjoosten/gists{/gist_id}","starred_url":"https://api.github.com/users/Tjoosten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tjoosten/subscriptions","organizations_url":"https://api.github.com/users/Tjoosten/orgs","repos_url":"https://api.github.com/users/Tjoosten/repos","events_url":"https://api.github.com/users/Tjoosten/events{/privacy}","received_events_url":"https://api.github.com/users/Tjoosten/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-13T16:32:37Z","updated_at":"2016-08-15T01:44:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d11a977e352fc8a332563b4bc4463bfd3366a9a4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/idevelopment/serviceforce/pulls/68/commits","review_comments_url":"https://api.github.com/repos/idevelopment/serviceforce/pulls/68/comments","review_comment_url":"https://api.github.com/repos/idevelopment/serviceforce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/idevelopment/serviceforce/issues/68/comments","statuses_url":"https://api.github.com/repos/idevelopment/serviceforce/statuses/931061327d399dbed7886732dd3141acdd6f8e79","head":{"label":"idevelopment:development","ref":"development","sha":"931061327d399dbed7886732dd3141acdd6f8e79","user":{"login":"idevelopment","id":14967398,"avatar_url":"https://avatars.githubusercontent.com/u/14967398?v=3","gravatar_id":"","url":"https://api.github.com/users/idevelopment","html_url":"https://github.com/idevelopment","followers_url":"https://api.github.com/users/idevelopment/followers","following_url":"https://api.github.com/users/idevelopment/following{/other_user}","gists_url":"https://api.github.com/users/idevelopment/gists{/gist_id}","starred_url":"https://api.github.com/users/idevelopment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idevelopment/subscriptions","organizations_url":"https://api.github.com/users/idevelopment/orgs","repos_url":"https://api.github.com/users/idevelopment/repos","events_url":"https://api.github.com/users/idevelopment/events{/privacy}","received_events_url":"https://api.github.com/users/idevelopment/received_events","type":"Organization","site_admin":false},"repo":{"id":59806177,"name":"serviceforce","full_name":"idevelopment/serviceforce","owner":{"login":"idevelopment","id":14967398,"avatar_url":"https://avatars.githubusercontent.com/u/14967398?v=3","gravatar_id":"","url":"https://api.github.com/users/idevelopment","html_url":"https://github.com/idevelopment","followers_url":"https://api.github.com/users/idevelopment/followers","following_url":"https://api.github.com/users/idevelopment/following{/other_user}","gists_url":"https://api.github.com/users/idevelopment/gists{/gist_id}","starred_url":"https://api.github.com/users/idevelopment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idevelopment/subscriptions","organizations_url":"https://api.github.com/users/idevelopment/orgs","repos_url":"https://api.github.com/users/idevelopment/repos","events_url":"https://api.github.com/users/idevelopment/events{/privacy}","received_events_url":"https://api.github.com/users/idevelopment/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/idevelopment/serviceforce","description":"","fork":false,"url":"https://api.github.com/repos/idevelopment/serviceforce","forks_url":"https://api.github.com/repos/idevelopment/serviceforce/forks","keys_url":"https://api.github.com/repos/idevelopment/serviceforce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/idevelopment/serviceforce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/idevelopment/serviceforce/teams","hooks_url":"https://api.github.com/repos/idevelopment/serviceforce/hooks","issue_events_url":"https://api.github.com/repos/idevelopment/serviceforce/issues/events{/number}","events_url":"https://api.github.com/repos/idevelopment/serviceforce/events","assignees_url":"https://api.github.com/repos/idevelopment/serviceforce/assignees{/user}","branches_url":"https://api.github.com/repos/idevelopment/serviceforce/branches{/branch}","tags_url":"https://api.github.com/repos/idevelopment/serviceforce/tags","blobs_url":"https://api.github.com/repos/idevelopment/serviceforce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/idevelopment/serviceforce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/idevelopment/serviceforce/git/refs{/sha}","trees_url":"https://api.github.com/repos/idevelopment/serviceforce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/idevelopment/serviceforce/statuses/{sha}","languages_url":"https://api.github.com/repos/idevelopment/serviceforce/languages","stargazers_url":"https://api.github.com/repos/idevelopment/serviceforce/stargazers","contributors_url":"https://api.github.com/repos/idevelopment/serviceforce/contributors","subscribers_url":"https://api.github.com/repos/idevelopment/serviceforce/subscribers","subscription_url":"https://api.github.com/repos/idevelopment/serviceforce/subscription","commits_url":"https://api.github.com/repos/idevelopment/serviceforce/commits{/sha}","git_commits_url":"https://api.github.com/repos/idevelopment/serviceforce/git/commits{/sha}","comments_url":"https://api.github.com/repos/idevelopment/serviceforce/comments{/number}","issue_comment_url":"https://api.github.com/repos/idevelopment/serviceforce/issues/comments{/number}","contents_url":"https://api.github.com/repos/idevelopment/serviceforce/contents/{+path}","compare_url":"https://api.github.com/repos/idevelopment/serviceforce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/idevelopment/serviceforce/merges","archive_url":"https://api.github.com/repos/idevelopment/serviceforce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/idevelopment/serviceforce/downloads","issues_url":"https://api.github.com/repos/idevelopment/serviceforce/issues{/number}","pulls_url":"https://api.github.com/repos/idevelopment/serviceforce/pulls{/number}","milestones_url":"https://api.github.com/repos/idevelopment/serviceforce/milestones{/number}","notifications_url":"https://api.github.com/repos/idevelopment/serviceforce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/idevelopment/serviceforce/labels{/name}","releases_url":"https://api.github.com/repos/idevelopment/serviceforce/releases{/id}","deployments_url":"https://api.github.com/repos/idevelopment/serviceforce/deployments","created_at":"2016-05-27T05:17:59Z","updated_at":"2016-08-14T04:34:44Z","pushed_at":"2016-08-15T01:44:28Z","git_url":"git://github.com/idevelopment/serviceforce.git","ssh_url":"git@github.com:idevelopment/serviceforce.git","clone_url":"https://github.com/idevelopment/serviceforce.git","svn_url":"https://github.com/idevelopment/serviceforce","homepage":null,"size":1036,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":21,"forks":1,"open_issues":21,"watchers":2,"default_branch":"master"}},"base":{"label":"idevelopment:master","ref":"master","sha":"516595746237e6db09fb1625f03069ed2db4a996","user":{"login":"idevelopment","id":14967398,"avatar_url":"https://avatars.githubusercontent.com/u/14967398?v=3","gravatar_id":"","url":"https://api.github.com/users/idevelopment","html_url":"https://github.com/idevelopment","followers_url":"https://api.github.com/users/idevelopment/followers","following_url":"https://api.github.com/users/idevelopment/following{/other_user}","gists_url":"https://api.github.com/users/idevelopment/gists{/gist_id}","starred_url":"https://api.github.com/users/idevelopment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idevelopment/subscriptions","organizations_url":"https://api.github.com/users/idevelopment/orgs","repos_url":"https://api.github.com/users/idevelopment/repos","events_url":"https://api.github.com/users/idevelopment/events{/privacy}","received_events_url":"https://api.github.com/users/idevelopment/received_events","type":"Organization","site_admin":false},"repo":{"id":59806177,"name":"serviceforce","full_name":"idevelopment/serviceforce","owner":{"login":"idevelopment","id":14967398,"avatar_url":"https://avatars.githubusercontent.com/u/14967398?v=3","gravatar_id":"","url":"https://api.github.com/users/idevelopment","html_url":"https://github.com/idevelopment","followers_url":"https://api.github.com/users/idevelopment/followers","following_url":"https://api.github.com/users/idevelopment/following{/other_user}","gists_url":"https://api.github.com/users/idevelopment/gists{/gist_id}","starred_url":"https://api.github.com/users/idevelopment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idevelopment/subscriptions","organizations_url":"https://api.github.com/users/idevelopment/orgs","repos_url":"https://api.github.com/users/idevelopment/repos","events_url":"https://api.github.com/users/idevelopment/events{/privacy}","received_events_url":"https://api.github.com/users/idevelopment/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/idevelopment/serviceforce","description":"","fork":false,"url":"https://api.github.com/repos/idevelopment/serviceforce","forks_url":"https://api.github.com/repos/idevelopment/serviceforce/forks","keys_url":"https://api.github.com/repos/idevelopment/serviceforce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/idevelopment/serviceforce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/idevelopment/serviceforce/teams","hooks_url":"https://api.github.com/repos/idevelopment/serviceforce/hooks","issue_events_url":"https://api.github.com/repos/idevelopment/serviceforce/issues/events{/number}","events_url":"https://api.github.com/repos/idevelopment/serviceforce/events","assignees_url":"https://api.github.com/repos/idevelopment/serviceforce/assignees{/user}","branches_url":"https://api.github.com/repos/idevelopment/serviceforce/branches{/branch}","tags_url":"https://api.github.com/repos/idevelopment/serviceforce/tags","blobs_url":"https://api.github.com/repos/idevelopment/serviceforce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/idevelopment/serviceforce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/idevelopment/serviceforce/git/refs{/sha}","trees_url":"https://api.github.com/repos/idevelopment/serviceforce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/idevelopment/serviceforce/statuses/{sha}","languages_url":"https://api.github.com/repos/idevelopment/serviceforce/languages","stargazers_url":"https://api.github.com/repos/idevelopment/serviceforce/stargazers","contributors_url":"https://api.github.com/repos/idevelopment/serviceforce/contributors","subscribers_url":"https://api.github.com/repos/idevelopment/serviceforce/subscribers","subscription_url":"https://api.github.com/repos/idevelopment/serviceforce/subscription","commits_url":"https://api.github.com/repos/idevelopment/serviceforce/commits{/sha}","git_commits_url":"https://api.github.com/repos/idevelopment/serviceforce/git/commits{/sha}","comments_url":"https://api.github.com/repos/idevelopment/serviceforce/comments{/number}","issue_comment_url":"https://api.github.com/repos/idevelopment/serviceforce/issues/comments{/number}","contents_url":"https://api.github.com/repos/idevelopment/serviceforce/contents/{+path}","compare_url":"https://api.github.com/repos/idevelopment/serviceforce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/idevelopment/serviceforce/merges","archive_url":"https://api.github.com/repos/idevelopment/serviceforce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/idevelopment/serviceforce/downloads","issues_url":"https://api.github.com/repos/idevelopment/serviceforce/issues{/number}","pulls_url":"https://api.github.com/repos/idevelopment/serviceforce/pulls{/number}","milestones_url":"https://api.github.com/repos/idevelopment/serviceforce/milestones{/number}","notifications_url":"https://api.github.com/repos/idevelopment/serviceforce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/idevelopment/serviceforce/labels{/name}","releases_url":"https://api.github.com/repos/idevelopment/serviceforce/releases{/id}","deployments_url":"https://api.github.com/repos/idevelopment/serviceforce/deployments","created_at":"2016-05-27T05:17:59Z","updated_at":"2016-08-14T04:34:44Z","pushed_at":"2016-08-15T01:44:28Z","git_url":"git://github.com/idevelopment/serviceforce.git","ssh_url":"git@github.com:idevelopment/serviceforce.git","clone_url":"https://github.com/idevelopment/serviceforce.git","svn_url":"https://github.com/idevelopment/serviceforce","homepage":null,"size":1036,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":21,"forks":1,"open_issues":21,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/idevelopment/serviceforce/pulls/68"},"html":{"href":"https://github.com/idevelopment/serviceforce/pull/68"},"issue":{"href":"https://api.github.com/repos/idevelopment/serviceforce/issues/68"},"comments":{"href":"https://api.github.com/repos/idevelopment/serviceforce/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/idevelopment/serviceforce/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/idevelopment/serviceforce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/idevelopment/serviceforce/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/idevelopment/serviceforce/statuses/931061327d399dbed7886732dd3141acdd6f8e79"}}}}
{"actor":{"display_login":"Nitpick-CI"}}