{"action":"created","comment":{"url":"https://api.github.com/repos/karma-runner/karma/pulls/comments/195424990","pull_request_review_id":128791344,"id":195424990,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTQyNDk5MA==","diff_hunk":"@@ -96,7 +103,16 @@ class Server extends KarmaEventEmitter {\n   }\n \n   start () {\n-    this._injector.invoke(this._start, this)\n+    return Promise.all([\n+      BundleUtils.bundleResourceIfNotExist('client/main.js', 'static/karma.js'),\n+      BundleUtils.bundleResourceIfNotExist('context/main.js', 'static/context.js')\n+    ])\n+      .then(() => NetUtils.getAvailablePort(this.get('config.port'), this.get('config.listenAddress')))","path":"lib/server.js","position":null,"original_position":30,"commit_id":"43ddc3cbcb3c450edbd0605c109b43666643c182","original_commit_id":"193ccdd1147b58ee2117322a105155aea064827e","user":{"login":"lusarz","id":10059264,"node_id":"MDQ6VXNlcjEwMDU5MjY0","avatar_url":"https://avatars3.githubusercontent.com/u/10059264?v=4","gravatar_id":"","url":"https://api.github.com/users/lusarz","html_url":"https://github.com/lusarz","followers_url":"https://api.github.com/users/lusarz/followers","following_url":"https://api.github.com/users/lusarz/following{/other_user}","gists_url":"https://api.github.com/users/lusarz/gists{/gist_id}","starred_url":"https://api.github.com/users/lusarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lusarz/subscriptions","organizations_url":"https://api.github.com/users/lusarz/orgs","repos_url":"https://api.github.com/users/lusarz/repos","events_url":"https://api.github.com/users/lusarz/events{/privacy}","received_events_url":"https://api.github.com/users/lusarz/received_events","type":"User","site_admin":false},"body":"Updated","created_at":"2018-06-14T13:35:23Z","updated_at":"2018-06-14T13:35:23Z","html_url":"https://github.com/karma-runner/karma/pull/3039#discussion_r195424990","pull_request_url":"https://api.github.com/repos/karma-runner/karma/pulls/3039","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/comments/195424990"},"html":{"href":"https://github.com/karma-runner/karma/pull/3039#discussion_r195424990"},"pull_request":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/3039"}},"in_reply_to_id":195256672},"pull_request":{"url":"https://api.github.com/repos/karma-runner/karma/pulls/3039","id":193972237,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzOTcyMjM3","html_url":"https://github.com/karma-runner/karma/pull/3039","diff_url":"https://github.com/karma-runner/karma/pull/3039.diff","patch_url":"https://github.com/karma-runner/karma/pull/3039.patch","issue_url":"https://api.github.com/repos/karma-runner/karma/issues/3039","number":3039,"state":"open","locked":false,"title":"fix: check for available port before start server (fix #1476, fix #3011)","user":{"login":"lusarz","id":10059264,"node_id":"MDQ6VXNlcjEwMDU5MjY0","avatar_url":"https://avatars3.githubusercontent.com/u/10059264?v=4","gravatar_id":"","url":"https://api.github.com/users/lusarz","html_url":"https://github.com/lusarz","followers_url":"https://api.github.com/users/lusarz/followers","following_url":"https://api.github.com/users/lusarz/following{/other_user}","gists_url":"https://api.github.com/users/lusarz/gists{/gist_id}","starred_url":"https://api.github.com/users/lusarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lusarz/subscriptions","organizations_url":"https://api.github.com/users/lusarz/orgs","repos_url":"https://api.github.com/users/lusarz/repos","events_url":"https://api.github.com/users/lusarz/events{/privacy}","received_events_url":"https://api.github.com/users/lusarz/received_events","type":"User","site_admin":false},"body":"- create NetUtils with `isPortAvailable` and `getAvailablePort` methods\r\n- use NetUtils to search for available port before starting server and build middlewares\r\n- remove handler for `EADDRINUSE` error - with `NetUtils.getAvailablePort` we'll know that port is available for sure, so this error would no raise","created_at":"2018-06-11T12:54:58Z","updated_at":"2018-06-14T13:35:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1da6983e9585436da5c66c7086f33ca29830fdf6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/karma-runner/karma/pulls/3039/commits","review_comments_url":"https://api.github.com/repos/karma-runner/karma/pulls/3039/comments","review_comment_url":"https://api.github.com/repos/karma-runner/karma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/karma-runner/karma/issues/3039/comments","statuses_url":"https://api.github.com/repos/karma-runner/karma/statuses/43ddc3cbcb3c450edbd0605c109b43666643c182","head":{"label":"lusarz:find-available-port-before-start-karma","ref":"find-available-port-before-start-karma","sha":"43ddc3cbcb3c450edbd0605c109b43666643c182","user":{"login":"lusarz","id":10059264,"node_id":"MDQ6VXNlcjEwMDU5MjY0","avatar_url":"https://avatars3.githubusercontent.com/u/10059264?v=4","gravatar_id":"","url":"https://api.github.com/users/lusarz","html_url":"https://github.com/lusarz","followers_url":"https://api.github.com/users/lusarz/followers","following_url":"https://api.github.com/users/lusarz/following{/other_user}","gists_url":"https://api.github.com/users/lusarz/gists{/gist_id}","starred_url":"https://api.github.com/users/lusarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lusarz/subscriptions","organizations_url":"https://api.github.com/users/lusarz/orgs","repos_url":"https://api.github.com/users/lusarz/repos","events_url":"https://api.github.com/users/lusarz/events{/privacy}","received_events_url":"https://api.github.com/users/lusarz/received_events","type":"User","site_admin":false},"repo":{"id":115823509,"node_id":"MDEwOlJlcG9zaXRvcnkxMTU4MjM1MDk=","name":"karma","full_name":"lusarz/karma","owner":{"login":"lusarz","id":10059264,"node_id":"MDQ6VXNlcjEwMDU5MjY0","avatar_url":"https://avatars3.githubusercontent.com/u/10059264?v=4","gravatar_id":"","url":"https://api.github.com/users/lusarz","html_url":"https://github.com/lusarz","followers_url":"https://api.github.com/users/lusarz/followers","following_url":"https://api.github.com/users/lusarz/following{/other_user}","gists_url":"https://api.github.com/users/lusarz/gists{/gist_id}","starred_url":"https://api.github.com/users/lusarz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lusarz/subscriptions","organizations_url":"https://api.github.com/users/lusarz/orgs","repos_url":"https://api.github.com/users/lusarz/repos","events_url":"https://api.github.com/users/lusarz/events{/privacy}","received_events_url":"https://api.github.com/users/lusarz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lusarz/karma","description":"Spectacular Test Runner for JavaScript","fork":true,"url":"https://api.github.com/repos/lusarz/karma","forks_url":"https://api.github.com/repos/lusarz/karma/forks","keys_url":"https://api.github.com/repos/lusarz/karma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lusarz/karma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lusarz/karma/teams","hooks_url":"https://api.github.com/repos/lusarz/karma/hooks","issue_events_url":"https://api.github.com/repos/lusarz/karma/issues/events{/number}","events_url":"https://api.github.com/repos/lusarz/karma/events","assignees_url":"https://api.github.com/repos/lusarz/karma/assignees{/user}","branches_url":"https://api.github.com/repos/lusarz/karma/branches{/branch}","tags_url":"https://api.github.com/repos/lusarz/karma/tags","blobs_url":"https://api.github.com/repos/lusarz/karma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lusarz/karma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lusarz/karma/git/refs{/sha}","trees_url":"https://api.github.com/repos/lusarz/karma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lusarz/karma/statuses/{sha}","languages_url":"https://api.github.com/repos/lusarz/karma/languages","stargazers_url":"https://api.github.com/repos/lusarz/karma/stargazers","contributors_url":"https://api.github.com/repos/lusarz/karma/contributors","subscribers_url":"https://api.github.com/repos/lusarz/karma/subscribers","subscription_url":"https://api.github.com/repos/lusarz/karma/subscription","commits_url":"https://api.github.com/repos/lusarz/karma/commits{/sha}","git_commits_url":"https://api.github.com/repos/lusarz/karma/git/commits{/sha}","comments_url":"https://api.github.com/repos/lusarz/karma/comments{/number}","issue_comment_url":"https://api.github.com/repos/lusarz/karma/issues/comments{/number}","contents_url":"https://api.github.com/repos/lusarz/karma/contents/{+path}","compare_url":"https://api.github.com/repos/lusarz/karma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lusarz/karma/merges","archive_url":"https://api.github.com/repos/lusarz/karma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lusarz/karma/downloads","issues_url":"https://api.github.com/repos/lusarz/karma/issues{/number}","pulls_url":"https://api.github.com/repos/lusarz/karma/pulls{/number}","milestones_url":"https://api.github.com/repos/lusarz/karma/milestones{/number}","notifications_url":"https://api.github.com/repos/lusarz/karma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lusarz/karma/labels{/name}","releases_url":"https://api.github.com/repos/lusarz/karma/releases{/id}","deployments_url":"https://api.github.com/repos/lusarz/karma/deployments","created_at":"2017-12-30T20:56:06Z","updated_at":"2018-06-09T18:35:00Z","pushed_at":"2018-06-14T13:31:48Z","git_url":"git://github.com/lusarz/karma.git","ssh_url":"git@github.com:lusarz/karma.git","clone_url":"https://github.com/lusarz/karma.git","svn_url":"https://github.com/lusarz/karma","homepage":"http://karma-runner.github.io","size":7269,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"karma-runner:master","ref":"master","sha":"0dc8ea4ab5d281e62d324ab02bc79acd1bdd38b1","user":{"login":"karma-runner","id":3284117,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODQxMTc=","avatar_url":"https://avatars0.githubusercontent.com/u/3284117?v=4","gravatar_id":"","url":"https://api.github.com/users/karma-runner","html_url":"https://github.com/karma-runner","followers_url":"https://api.github.com/users/karma-runner/followers","following_url":"https://api.github.com/users/karma-runner/following{/other_user}","gists_url":"https://api.github.com/users/karma-runner/gists{/gist_id}","starred_url":"https://api.github.com/users/karma-runner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karma-runner/subscriptions","organizations_url":"https://api.github.com/users/karma-runner/orgs","repos_url":"https://api.github.com/users/karma-runner/repos","events_url":"https://api.github.com/users/karma-runner/events{/privacy}","received_events_url":"https://api.github.com/users/karma-runner/received_events","type":"Organization","site_admin":false},"repo":{"id":2560988,"node_id":"MDEwOlJlcG9zaXRvcnkyNTYwOTg4","name":"karma","full_name":"karma-runner/karma","owner":{"login":"karma-runner","id":3284117,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODQxMTc=","avatar_url":"https://avatars0.githubusercontent.com/u/3284117?v=4","gravatar_id":"","url":"https://api.github.com/users/karma-runner","html_url":"https://github.com/karma-runner","followers_url":"https://api.github.com/users/karma-runner/followers","following_url":"https://api.github.com/users/karma-runner/following{/other_user}","gists_url":"https://api.github.com/users/karma-runner/gists{/gist_id}","starred_url":"https://api.github.com/users/karma-runner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karma-runner/subscriptions","organizations_url":"https://api.github.com/users/karma-runner/orgs","repos_url":"https://api.github.com/users/karma-runner/repos","events_url":"https://api.github.com/users/karma-runner/events{/privacy}","received_events_url":"https://api.github.com/users/karma-runner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/karma-runner/karma","description":"Spectacular Test Runner for JavaScript","fork":false,"url":"https://api.github.com/repos/karma-runner/karma","forks_url":"https://api.github.com/repos/karma-runner/karma/forks","keys_url":"https://api.github.com/repos/karma-runner/karma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karma-runner/karma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karma-runner/karma/teams","hooks_url":"https://api.github.com/repos/karma-runner/karma/hooks","issue_events_url":"https://api.github.com/repos/karma-runner/karma/issues/events{/number}","events_url":"https://api.github.com/repos/karma-runner/karma/events","assignees_url":"https://api.github.com/repos/karma-runner/karma/assignees{/user}","branches_url":"https://api.github.com/repos/karma-runner/karma/branches{/branch}","tags_url":"https://api.github.com/repos/karma-runner/karma/tags","blobs_url":"https://api.github.com/repos/karma-runner/karma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karma-runner/karma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karma-runner/karma/git/refs{/sha}","trees_url":"https://api.github.com/repos/karma-runner/karma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karma-runner/karma/statuses/{sha}","languages_url":"https://api.github.com/repos/karma-runner/karma/languages","stargazers_url":"https://api.github.com/repos/karma-runner/karma/stargazers","contributors_url":"https://api.github.com/repos/karma-runner/karma/contributors","subscribers_url":"https://api.github.com/repos/karma-runner/karma/subscribers","subscription_url":"https://api.github.com/repos/karma-runner/karma/subscription","commits_url":"https://api.github.com/repos/karma-runner/karma/commits{/sha}","git_commits_url":"https://api.github.com/repos/karma-runner/karma/git/commits{/sha}","comments_url":"https://api.github.com/repos/karma-runner/karma/comments{/number}","issue_comment_url":"https://api.github.com/repos/karma-runner/karma/issues/comments{/number}","contents_url":"https://api.github.com/repos/karma-runner/karma/contents/{+path}","compare_url":"https://api.github.com/repos/karma-runner/karma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karma-runner/karma/merges","archive_url":"https://api.github.com/repos/karma-runner/karma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karma-runner/karma/downloads","issues_url":"https://api.github.com/repos/karma-runner/karma/issues{/number}","pulls_url":"https://api.github.com/repos/karma-runner/karma/pulls{/number}","milestones_url":"https://api.github.com/repos/karma-runner/karma/milestones{/number}","notifications_url":"https://api.github.com/repos/karma-runner/karma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karma-runner/karma/labels{/name}","releases_url":"https://api.github.com/repos/karma-runner/karma/releases{/id}","deployments_url":"https://api.github.com/repos/karma-runner/karma/deployments","created_at":"2011-10-12T07:55:46Z","updated_at":"2018-06-14T13:27:33Z","pushed_at":"2018-06-14T13:31:51Z","git_url":"git://github.com/karma-runner/karma.git","ssh_url":"git@github.com:karma-runner/karma.git","clone_url":"https://github.com/karma-runner/karma.git","svn_url":"https://github.com/karma-runner/karma","homepage":"http://karma-runner.github.io","size":7292,"stargazers_count":9784,"watchers_count":9784,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1491,"mirror_url":null,"archived":false,"open_issues_count":366,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1491,"open_issues":366,"watchers":9784,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/3039"},"html":{"href":"https://github.com/karma-runner/karma/pull/3039"},"issue":{"href":"https://api.github.com/repos/karma-runner/karma/issues/3039"},"comments":{"href":"https://api.github.com/repos/karma-runner/karma/issues/3039/comments"},"review_comments":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/3039/comments"},"review_comment":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/3039/commits"},"statuses":{"href":"https://api.github.com/repos/karma-runner/karma/statuses/43ddc3cbcb3c450edbd0605c109b43666643c182"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"lusarz"}}