{"action":"created","comment":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/49395178","id":49395178,"diff_hunk":"@@ -75,7 +112,21 @@ mostrar quantos assentos ainda podem ser ocupados, com a frase:\n - Se couber somente mais uma pessoa, mostrar a palavra \"pessoa\" no retorno\n citado acima, no lugar de \"pessoas\".\n */\n-?\n+carro.adicionaPessoas = function( x ){\n+  var total = x + carro.quantidadePessoas;\n+  \n+    if(carro.quantidadePessoas === carro.assentos){\n+      return 'O carro está lotado';\n+    } \n+  \n+    if(carro.quantidadePessoas < carro.assentos && total > carro.assentos){\n+      var assentosRestam = carro.assentos - carro.quantidadePessoas;\n+      var palavraFinal = assentosRestam === 1 ? ' pessoa' : ' pessoas';\n+        return 'Só cabem mais '+ assentosRestam + palavraFinal + '!';\n+    }\n+      carro.quantidadePessoas = total;\n+        return 'Já temos '+ carro.quantidadePessoas + ' pessoas no carro';","path":"challenge-04/README.md","position":116,"original_position":116,"commit_id":"3d8b682d0dc24edbd7ec249fa31c8514a5d74cfc","original_commit_id":"3d8b682d0dc24edbd7ec249fa31c8514a5d74cfc","user":{"login":"fdaciuk","id":487669,"avatar_url":"https://avatars.githubusercontent.com/u/487669?v=3","gravatar_id":"","url":"https://api.github.com/users/fdaciuk","html_url":"https://github.com/fdaciuk","followers_url":"https://api.github.com/users/fdaciuk/followers","following_url":"https://api.github.com/users/fdaciuk/following{/other_user}","gists_url":"https://api.github.com/users/fdaciuk/gists{/gist_id}","starred_url":"https://api.github.com/users/fdaciuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdaciuk/subscriptions","organizations_url":"https://api.github.com/users/fdaciuk/orgs","repos_url":"https://api.github.com/users/fdaciuk/repos","events_url":"https://api.github.com/users/fdaciuk/events{/privacy}","received_events_url":"https://api.github.com/users/fdaciuk/received_events","type":"User","site_admin":false},"body":"-1\r\nAjustar indentação.","created_at":"2016-01-11T23:24:34Z","updated_at":"2016-01-11T23:24:34Z","html_url":"https://github.com/da2k/curso-javascript-ninja/pull/430#discussion_r49395178","pull_request_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/430","_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments/49395178"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/430#discussion_r49395178"},"pull_request":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/430"}}},"pull_request":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/430","id":49134101,"html_url":"https://github.com/da2k/curso-javascript-ninja/pull/430","diff_url":"https://github.com/da2k/curso-javascript-ninja/pull/430.diff","patch_url":"https://github.com/da2k/curso-javascript-ninja/pull/430.patch","issue_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/430","number":430,"state":"open","locked":false,"title":"Challenge 04","user":{"login":"Feabbud","id":6944976,"avatar_url":"https://avatars.githubusercontent.com/u/6944976?v=3","gravatar_id":"","url":"https://api.github.com/users/Feabbud","html_url":"https://github.com/Feabbud","followers_url":"https://api.github.com/users/Feabbud/followers","following_url":"https://api.github.com/users/Feabbud/following{/other_user}","gists_url":"https://api.github.com/users/Feabbud/gists{/gist_id}","starred_url":"https://api.github.com/users/Feabbud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Feabbud/subscriptions","organizations_url":"https://api.github.com/users/Feabbud/orgs","repos_url":"https://api.github.com/users/Feabbud/repos","events_url":"https://api.github.com/users/Feabbud/events{/privacy}","received_events_url":"https://api.github.com/users/Feabbud/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-29T12:44:19Z","updated_at":"2016-01-11T23:24:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e00f3af9c7ed12a19d091b8f7dc5c2a7f5db703d","assignee":null,"milestone":{"url":"https://api.github.com/repos/da2k/curso-javascript-ninja/milestones/4","html_url":"https://github.com/da2k/curso-javascript-ninja/milestones/%234%20class","labels_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/milestones/4/labels","id":1083614,"number":4,"title":"#4 class","description":"","creator":{"login":"fdaciuk","id":487669,"avatar_url":"https://avatars.githubusercontent.com/u/487669?v=3","gravatar_id":"","url":"https://api.github.com/users/fdaciuk","html_url":"https://github.com/fdaciuk","followers_url":"https://api.github.com/users/fdaciuk/followers","following_url":"https://api.github.com/users/fdaciuk/following{/other_user}","gists_url":"https://api.github.com/users/fdaciuk/gists{/gist_id}","starred_url":"https://api.github.com/users/fdaciuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdaciuk/subscriptions","organizations_url":"https://api.github.com/users/fdaciuk/orgs","repos_url":"https://api.github.com/users/fdaciuk/repos","events_url":"https://api.github.com/users/fdaciuk/events{/privacy}","received_events_url":"https://api.github.com/users/fdaciuk/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":23,"state":"open","created_at":"2015-04-25T21:49:04Z","updated_at":"2016-01-09T22:04:07Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/430/commits","review_comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/430/comments","review_comment_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments{/number}","comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/430/comments","statuses_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/3d8b682d0dc24edbd7ec249fa31c8514a5d74cfc","head":{"label":"Feabbud:challenge-04","ref":"challenge-04","sha":"3d8b682d0dc24edbd7ec249fa31c8514a5d74cfc","user":{"login":"Feabbud","id":6944976,"avatar_url":"https://avatars.githubusercontent.com/u/6944976?v=3","gravatar_id":"","url":"https://api.github.com/users/Feabbud","html_url":"https://github.com/Feabbud","followers_url":"https://api.github.com/users/Feabbud/followers","following_url":"https://api.github.com/users/Feabbud/following{/other_user}","gists_url":"https://api.github.com/users/Feabbud/gists{/gist_id}","starred_url":"https://api.github.com/users/Feabbud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Feabbud/subscriptions","organizations_url":"https://api.github.com/users/Feabbud/orgs","repos_url":"https://api.github.com/users/Feabbud/repos","events_url":"https://api.github.com/users/Feabbud/events{/privacy}","received_events_url":"https://api.github.com/users/Feabbud/received_events","type":"User","site_admin":false},"repo":{"id":44743017,"name":"curso-javascript-ninja","full_name":"Feabbud/curso-javascript-ninja","owner":{"login":"Feabbud","id":6944976,"avatar_url":"https://avatars.githubusercontent.com/u/6944976?v=3","gravatar_id":"","url":"https://api.github.com/users/Feabbud","html_url":"https://github.com/Feabbud","followers_url":"https://api.github.com/users/Feabbud/followers","following_url":"https://api.github.com/users/Feabbud/following{/other_user}","gists_url":"https://api.github.com/users/Feabbud/gists{/gist_id}","starred_url":"https://api.github.com/users/Feabbud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Feabbud/subscriptions","organizations_url":"https://api.github.com/users/Feabbud/orgs","repos_url":"https://api.github.com/users/Feabbud/repos","events_url":"https://api.github.com/users/Feabbud/events{/privacy}","received_events_url":"https://api.github.com/users/Feabbud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Feabbud/curso-javascript-ninja","description":"Curso Javascript Ninja","fork":true,"url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja","forks_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/forks","keys_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/teams","hooks_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/hooks","issue_events_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/events","assignees_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/tags","blobs_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/languages","stargazers_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/stargazers","contributors_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/contributors","subscribers_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/subscribers","subscription_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/subscription","commits_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/merges","archive_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/downloads","issues_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/labels{/name}","releases_url":"https://api.github.com/repos/Feabbud/curso-javascript-ninja/releases{/id}","created_at":"2015-10-22T12:13:59Z","updated_at":"2015-10-22T12:14:00Z","pushed_at":"2015-11-23T10:45:49Z","git_url":"git://github.com/Feabbud/curso-javascript-ninja.git","ssh_url":"git@github.com:Feabbud/curso-javascript-ninja.git","clone_url":"https://github.com/Feabbud/curso-javascript-ninja.git","svn_url":"https://github.com/Feabbud/curso-javascript-ninja","homepage":"http://blog.da2k.com.br/curso-javascript-ninja/","size":77,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"da2k:master","ref":"master","sha":"6c63918755f17440f4ff39a5db15d2c6cb1f7ffc","user":{"login":"da2k","id":11011075,"avatar_url":"https://avatars.githubusercontent.com/u/11011075?v=3","gravatar_id":"","url":"https://api.github.com/users/da2k","html_url":"https://github.com/da2k","followers_url":"https://api.github.com/users/da2k/followers","following_url":"https://api.github.com/users/da2k/following{/other_user}","gists_url":"https://api.github.com/users/da2k/gists{/gist_id}","starred_url":"https://api.github.com/users/da2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/da2k/subscriptions","organizations_url":"https://api.github.com/users/da2k/orgs","repos_url":"https://api.github.com/users/da2k/repos","events_url":"https://api.github.com/users/da2k/events{/privacy}","received_events_url":"https://api.github.com/users/da2k/received_events","type":"Organization","site_admin":false},"repo":{"id":30896610,"name":"curso-javascript-ninja","full_name":"da2k/curso-javascript-ninja","owner":{"login":"da2k","id":11011075,"avatar_url":"https://avatars.githubusercontent.com/u/11011075?v=3","gravatar_id":"","url":"https://api.github.com/users/da2k","html_url":"https://github.com/da2k","followers_url":"https://api.github.com/users/da2k/followers","following_url":"https://api.github.com/users/da2k/following{/other_user}","gists_url":"https://api.github.com/users/da2k/gists{/gist_id}","starred_url":"https://api.github.com/users/da2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/da2k/subscriptions","organizations_url":"https://api.github.com/users/da2k/orgs","repos_url":"https://api.github.com/users/da2k/repos","events_url":"https://api.github.com/users/da2k/events{/privacy}","received_events_url":"https://api.github.com/users/da2k/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/da2k/curso-javascript-ninja","description":"Curso Javascript Ninja","fork":false,"url":"https://api.github.com/repos/da2k/curso-javascript-ninja","forks_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/forks","keys_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/teams","hooks_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/hooks","issue_events_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/events{/number}","events_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/events","assignees_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/assignees{/user}","branches_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/branches{/branch}","tags_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/tags","blobs_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/refs{/sha}","trees_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/{sha}","languages_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/languages","stargazers_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/stargazers","contributors_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/contributors","subscribers_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/subscribers","subscription_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/subscription","commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/commits{/sha}","git_commits_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/git/commits{/sha}","comments_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/comments{/number}","issue_comment_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/comments{/number}","contents_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/contents/{+path}","compare_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/merges","archive_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/downloads","issues_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues{/number}","pulls_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls{/number}","milestones_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/milestones{/number}","notifications_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/labels{/name}","releases_url":"https://api.github.com/repos/da2k/curso-javascript-ninja/releases{/id}","created_at":"2015-02-17T00:57:58Z","updated_at":"2016-01-06T01:54:39Z","pushed_at":"2016-01-11T12:24:32Z","git_url":"git://github.com/da2k/curso-javascript-ninja.git","ssh_url":"git@github.com:da2k/curso-javascript-ninja.git","clone_url":"https://github.com/da2k/curso-javascript-ninja.git","svn_url":"https://github.com/da2k/curso-javascript-ninja","homepage":"http://blog.da2k.com.br/curso-javascript-ninja/","size":1126,"stargazers_count":56,"watchers_count":56,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":106,"forks":58,"open_issues":106,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/430"},"html":{"href":"https://github.com/da2k/curso-javascript-ninja/pull/430"},"issue":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/430"},"comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/issues/430/comments"},"review_comments":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/430/comments"},"review_comment":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/pulls/430/commits"},"statuses":{"href":"https://api.github.com/repos/da2k/curso-javascript-ninja/statuses/3d8b682d0dc24edbd7ec249fa31c8514a5d74cfc"}}}}