{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/comments/238527113","pull_request_review_id":181088076,"id":238527113,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODUyNzExMw==","diff_hunk":"@@ -14,6 +14,52 @@ const isStar = true;\n  */\n function runParallel(jobs, parallelNum, timeout = 1000) {\n     // асинхронная магия\n+\n+    if (!jobs.length || parallelNum <= 0) {\n+        return Promise.resolve([]);\n+    }\n+\n+    return new Promise((resolve) => {\n+        let results = [];\n+\n+        let completeJobs = 0;","path":"async.js","position":12,"original_position":12,"commit_id":"470743686a27f8b95d582cb8ba3c492ce5d6d7f7","original_commit_id":"470743686a27f8b95d582cb8ba3c492ce5d6d7f7","user":{"login":"dimastark","id":11780431,"node_id":"MDQ6VXNlcjExNzgwNDMx","avatar_url":"https://avatars3.githubusercontent.com/u/11780431?v=4","gravatar_id":"","url":"https://api.github.com/users/dimastark","html_url":"https://github.com/dimastark","followers_url":"https://api.github.com/users/dimastark/followers","following_url":"https://api.github.com/users/dimastark/following{/other_user}","gists_url":"https://api.github.com/users/dimastark/gists{/gist_id}","starred_url":"https://api.github.com/users/dimastark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimastark/subscriptions","organizations_url":"https://api.github.com/users/dimastark/orgs","repos_url":"https://api.github.com/users/dimastark/repos","events_url":"https://api.github.com/users/dimastark/events{/privacy}","received_events_url":"https://api.github.com/users/dimastark/received_events","type":"User","site_admin":false},"body":"Может как-то декомпозировать? Например в класс? Уж слишком много логики размазано по одной функции и состояний тоже много. Можно состояние инкапсулировать в класс.","created_at":"2018-12-04T04:33:22Z","updated_at":"2018-12-04T04:33:30Z","html_url":"https://github.com/urfu-2018/javascript-task-8/pull/4#discussion_r238527113","pull_request_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/comments/238527113"},"html":{"href":"https://github.com/urfu-2018/javascript-task-8/pull/4#discussion_r238527113"},"pull_request":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/4","id":234527241,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NTI3MjQx","html_url":"https://github.com/urfu-2018/javascript-task-8/pull/4","diff_url":"https://github.com/urfu-2018/javascript-task-8/pull/4.diff","patch_url":"https://github.com/urfu-2018/javascript-task-8/pull/4.patch","issue_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/issues/4","number":4,"state":"open","locked":false,"title":"Барабанщикова Анастасия","user":{"login":"AIBarabanshchikova","id":38308325,"node_id":"MDQ6VXNlcjM4MzA4MzI1","avatar_url":"https://avatars1.githubusercontent.com/u/38308325?v=4","gravatar_id":"","url":"https://api.github.com/users/AIBarabanshchikova","html_url":"https://github.com/AIBarabanshchikova","followers_url":"https://api.github.com/users/AIBarabanshchikova/followers","following_url":"https://api.github.com/users/AIBarabanshchikova/following{/other_user}","gists_url":"https://api.github.com/users/AIBarabanshchikova/gists{/gist_id}","starred_url":"https://api.github.com/users/AIBarabanshchikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIBarabanshchikova/subscriptions","organizations_url":"https://api.github.com/users/AIBarabanshchikova/orgs","repos_url":"https://api.github.com/users/AIBarabanshchikova/repos","events_url":"https://api.github.com/users/AIBarabanshchikova/events{/privacy}","received_events_url":"https://api.github.com/users/AIBarabanshchikova/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-29T06:52:53Z","updated_at":"2018-12-04T04:33:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ed915722e7def67d9fcafcce8d3c4a0c5c42744","assignee":{"login":"dimastark","id":11780431,"node_id":"MDQ6VXNlcjExNzgwNDMx","avatar_url":"https://avatars3.githubusercontent.com/u/11780431?v=4","gravatar_id":"","url":"https://api.github.com/users/dimastark","html_url":"https://github.com/dimastark","followers_url":"https://api.github.com/users/dimastark/followers","following_url":"https://api.github.com/users/dimastark/following{/other_user}","gists_url":"https://api.github.com/users/dimastark/gists{/gist_id}","starred_url":"https://api.github.com/users/dimastark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimastark/subscriptions","organizations_url":"https://api.github.com/users/dimastark/orgs","repos_url":"https://api.github.com/users/dimastark/repos","events_url":"https://api.github.com/users/dimastark/events{/privacy}","received_events_url":"https://api.github.com/users/dimastark/received_events","type":"User","site_admin":false},"assignees":[{"login":"dimastark","id":11780431,"node_id":"MDQ6VXNlcjExNzgwNDMx","avatar_url":"https://avatars3.githubusercontent.com/u/11780431?v=4","gravatar_id":"","url":"https://api.github.com/users/dimastark","html_url":"https://github.com/dimastark","followers_url":"https://api.github.com/users/dimastark/followers","following_url":"https://api.github.com/users/dimastark/following{/other_user}","gists_url":"https://api.github.com/users/dimastark/gists{/gist_id}","starred_url":"https://api.github.com/users/dimastark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimastark/subscriptions","organizations_url":"https://api.github.com/users/dimastark/orgs","repos_url":"https://api.github.com/users/dimastark/repos","events_url":"https://api.github.com/users/dimastark/events{/privacy}","received_events_url":"https://api.github.com/users/dimastark/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/4/commits","review_comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/4/comments","review_comment_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/issues/4/comments","statuses_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/statuses/470743686a27f8b95d582cb8ba3c492ce5d6d7f7","head":{"label":"AIBarabanshchikova:master","ref":"master","sha":"470743686a27f8b95d582cb8ba3c492ce5d6d7f7","user":{"login":"AIBarabanshchikova","id":38308325,"node_id":"MDQ6VXNlcjM4MzA4MzI1","avatar_url":"https://avatars1.githubusercontent.com/u/38308325?v=4","gravatar_id":"","url":"https://api.github.com/users/AIBarabanshchikova","html_url":"https://github.com/AIBarabanshchikova","followers_url":"https://api.github.com/users/AIBarabanshchikova/followers","following_url":"https://api.github.com/users/AIBarabanshchikova/following{/other_user}","gists_url":"https://api.github.com/users/AIBarabanshchikova/gists{/gist_id}","starred_url":"https://api.github.com/users/AIBarabanshchikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIBarabanshchikova/subscriptions","organizations_url":"https://api.github.com/users/AIBarabanshchikova/orgs","repos_url":"https://api.github.com/users/AIBarabanshchikova/repos","events_url":"https://api.github.com/users/AIBarabanshchikova/events{/privacy}","received_events_url":"https://api.github.com/users/AIBarabanshchikova/received_events","type":"User","site_admin":false},"repo":{"id":159443926,"node_id":"MDEwOlJlcG9zaXRvcnkxNTk0NDM5MjY=","name":"javascript-task-8","full_name":"AIBarabanshchikova/javascript-task-8","private":false,"owner":{"login":"AIBarabanshchikova","id":38308325,"node_id":"MDQ6VXNlcjM4MzA4MzI1","avatar_url":"https://avatars1.githubusercontent.com/u/38308325?v=4","gravatar_id":"","url":"https://api.github.com/users/AIBarabanshchikova","html_url":"https://github.com/AIBarabanshchikova","followers_url":"https://api.github.com/users/AIBarabanshchikova/followers","following_url":"https://api.github.com/users/AIBarabanshchikova/following{/other_user}","gists_url":"https://api.github.com/users/AIBarabanshchikova/gists{/gist_id}","starred_url":"https://api.github.com/users/AIBarabanshchikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIBarabanshchikova/subscriptions","organizations_url":"https://api.github.com/users/AIBarabanshchikova/orgs","repos_url":"https://api.github.com/users/AIBarabanshchikova/repos","events_url":"https://api.github.com/users/AIBarabanshchikova/events{/privacy}","received_events_url":"https://api.github.com/users/AIBarabanshchikova/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AIBarabanshchikova/javascript-task-8","description":" Задача «Мальчишник у Аркадия»","fork":true,"url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8","forks_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/forks","keys_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/teams","hooks_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/hooks","issue_events_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/issues/events{/number}","events_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/events","assignees_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/assignees{/user}","branches_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/branches{/branch}","tags_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/tags","blobs_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/git/refs{/sha}","trees_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/statuses/{sha}","languages_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/languages","stargazers_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/stargazers","contributors_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/contributors","subscribers_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/subscribers","subscription_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/subscription","commits_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/commits{/sha}","git_commits_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/git/commits{/sha}","comments_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/comments{/number}","issue_comment_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/issues/comments{/number}","contents_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/contents/{+path}","compare_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/merges","archive_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/downloads","issues_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/issues{/number}","pulls_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/pulls{/number}","milestones_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/milestones{/number}","notifications_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/labels{/name}","releases_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/releases{/id}","deployments_url":"https://api.github.com/repos/AIBarabanshchikova/javascript-task-8/deployments","created_at":"2018-11-28T04:32:32Z","updated_at":"2018-12-03T15:03:40Z","pushed_at":"2018-12-03T15:03:38Z","git_url":"git://github.com/AIBarabanshchikova/javascript-task-8.git","ssh_url":"git@github.com:AIBarabanshchikova/javascript-task-8.git","clone_url":"https://github.com/AIBarabanshchikova/javascript-task-8.git","svn_url":"https://github.com/AIBarabanshchikova/javascript-task-8","homepage":null,"size":38,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"urfu-2018:master","ref":"master","sha":"7635f3805262fbcba5f30839786d827bf3eebc77","user":{"login":"urfu-2018","id":43127233,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMTI3MjMz","avatar_url":"https://avatars0.githubusercontent.com/u/43127233?v=4","gravatar_id":"","url":"https://api.github.com/users/urfu-2018","html_url":"https://github.com/urfu-2018","followers_url":"https://api.github.com/users/urfu-2018/followers","following_url":"https://api.github.com/users/urfu-2018/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2018/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2018/subscriptions","organizations_url":"https://api.github.com/users/urfu-2018/orgs","repos_url":"https://api.github.com/users/urfu-2018/repos","events_url":"https://api.github.com/users/urfu-2018/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2018/received_events","type":"Organization","site_admin":false},"repo":{"id":159351920,"node_id":"MDEwOlJlcG9zaXRvcnkxNTkzNTE5MjA=","name":"javascript-task-8","full_name":"urfu-2018/javascript-task-8","private":false,"owner":{"login":"urfu-2018","id":43127233,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMTI3MjMz","avatar_url":"https://avatars0.githubusercontent.com/u/43127233?v=4","gravatar_id":"","url":"https://api.github.com/users/urfu-2018","html_url":"https://github.com/urfu-2018","followers_url":"https://api.github.com/users/urfu-2018/followers","following_url":"https://api.github.com/users/urfu-2018/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2018/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2018/subscriptions","organizations_url":"https://api.github.com/users/urfu-2018/orgs","repos_url":"https://api.github.com/users/urfu-2018/repos","events_url":"https://api.github.com/users/urfu-2018/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2018/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/urfu-2018/javascript-task-8","description":" Задача «Мальчишник у Аркадия»","fork":false,"url":"https://api.github.com/repos/urfu-2018/javascript-task-8","forks_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/forks","keys_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/teams","hooks_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/hooks","issue_events_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/events","assignees_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/tags","blobs_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/languages","stargazers_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/stargazers","contributors_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/contributors","subscribers_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/subscribers","subscription_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/subscription","commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/merges","archive_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/downloads","issues_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/releases{/id}","deployments_url":"https://api.github.com/repos/urfu-2018/javascript-task-8/deployments","created_at":"2018-11-27T14:54:03Z","updated_at":"2018-11-27T15:11:43Z","pushed_at":"2018-12-04T02:51:49Z","git_url":"git://github.com/urfu-2018/javascript-task-8.git","ssh_url":"git@github.com:urfu-2018/javascript-task-8.git","clone_url":"https://github.com/urfu-2018/javascript-task-8.git","svn_url":"https://github.com/urfu-2018/javascript-task-8","homepage":null,"size":30,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"archived":false,"open_issues_count":43,"license":null,"forks":69,"open_issues":43,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/4"},"html":{"href":"https://github.com/urfu-2018/javascript-task-8/pull/4"},"issue":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/issues/4"},"comments":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2018/javascript-task-8/statuses/470743686a27f8b95d582cb8ba3c492ce5d6d7f7"}},"author_association":"NONE"}}
{"actor":{"display_login":"dimastark"}}