{"action":"created","comment":{"url":"https://api.github.com/repos/eggjs/egg-cluster/pulls/comments/199340116","pull_request_review_id":133444401,"id":199340116,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTM0MDExNg==","diff_hunk":"@@ -554,3 +556,15 @@ function getAddress({ addressType, address, port, protocal }) {\n function isUnixSock(address) {\n   return address.addressType === -1;\n }\n+\n+function getExecArgv(options) {\n+  // convert `options.require` to execArgv\n+  const execArgv = [ ...process.execArgv ];\n+  if (options.require) {\n+    const arr = [].concat(options.require);\n+    for (const x of arr) {\n+      execArgv.push('-r', x);","path":"lib/master.js","position":47,"original_position":47,"commit_id":"8e14ff7262e522454b6e1555d16365045adf73c0","original_commit_id":"8e14ff7262e522454b6e1555d16365045adf73c0","user":{"login":"atian25","id":227713,"node_id":"MDQ6VXNlcjIyNzcxMw==","avatar_url":"https://avatars2.githubusercontent.com/u/227713?v=4","gravatar_id":"","url":"https://api.github.com/users/atian25","html_url":"https://github.com/atian25","followers_url":"https://api.github.com/users/atian25/followers","following_url":"https://api.github.com/users/atian25/following{/other_user}","gists_url":"https://api.github.com/users/atian25/gists{/gist_id}","starred_url":"https://api.github.com/users/atian25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atian25/subscriptions","organizations_url":"https://api.github.com/users/atian25/orgs","repos_url":"https://api.github.com/users/atian25/repos","events_url":"https://api.github.com/users/atian25/events{/privacy}","received_events_url":"https://api.github.com/users/atian25/received_events","type":"User","site_admin":false},"body":"@popomore 这里要不要做下绝对路径的判断？相对路径的话，就自动 join baseDir?","created_at":"2018-07-01T06:55:38Z","updated_at":"2018-07-01T06:55:39Z","html_url":"https://github.com/eggjs/egg-cluster/pull/73#discussion_r199340116","pull_request_url":"https://api.github.com/repos/eggjs/egg-cluster/pulls/73","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/eggjs/egg-cluster/pulls/comments/199340116"},"html":{"href":"https://github.com/eggjs/egg-cluster/pull/73#discussion_r199340116"},"pull_request":{"href":"https://api.github.com/repos/eggjs/egg-cluster/pulls/73"}}},"pull_request":{"url":"https://api.github.com/repos/eggjs/egg-cluster/pulls/73","id":198510333,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NTEwMzMz","html_url":"https://github.com/eggjs/egg-cluster/pull/73","diff_url":"https://github.com/eggjs/egg-cluster/pull/73.diff","patch_url":"https://github.com/eggjs/egg-cluster/pull/73.patch","issue_url":"https://api.github.com/repos/eggjs/egg-cluster/issues/73","number":73,"state":"open","locked":false,"title":"feat: support options.require","user":{"login":"atian25","id":227713,"node_id":"MDQ6VXNlcjIyNzcxMw==","avatar_url":"https://avatars2.githubusercontent.com/u/227713?v=4","gravatar_id":"","url":"https://api.github.com/users/atian25","html_url":"https://github.com/atian25","followers_url":"https://api.github.com/users/atian25/followers","following_url":"https://api.github.com/users/atian25/following{/other_user}","gists_url":"https://api.github.com/users/atian25/gists{/gist_id}","starred_url":"https://api.github.com/users/atian25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atian25/subscriptions","organizations_url":"https://api.github.com/users/atian25/orgs","repos_url":"https://api.github.com/users/atian25/repos","events_url":"https://api.github.com/users/atian25/events{/privacy}","received_events_url":"https://api.github.com/users/atian25/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for your pull request. Please review below requirements.\r\nBug fixes and new features should include tests and possibly benchmarks.\r\nContributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md\r\n\r\n感谢您贡献代码。请确认下列 checklist 的完成情况。\r\nBug 修复和新功能必须包含测试，必要时请附上性能测试。\r\nContributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [ ] `npm test` passes\r\n- [ ] tests and/or benchmarks are included\r\n- [x] documentation is changed or added\r\n- [ ] commit message follows commit guidelines\r\n\r\n##### Affected core subsystem(s)\r\n<!-- Provide affected core subsystem(s). -->\r\n\r\n\r\n##### Description of change\r\n<!-- Provide a description of the change below this comment. -->\r\n\r\n- support `options.require`, will convert to `-r xx.js` and attach to app/agent 's execArgv\r\n- close https://github.com/eggjs/egg/issues/2706\r\n- ~~use `inject` to avoid `--require` confuse at `egg-bin test`~~\r\n- should pass full path","created_at":"2018-07-01T06:48:25Z","updated_at":"2018-07-01T06:55:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd17effcd045ee443811eb0df52d1d1ca06dec3e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"popomore","id":360661,"node_id":"MDQ6VXNlcjM2MDY2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/360661?v=4","gravatar_id":"","url":"https://api.github.com/users/popomore","html_url":"https://github.com/popomore","followers_url":"https://api.github.com/users/popomore/followers","following_url":"https://api.github.com/users/popomore/following{/other_user}","gists_url":"https://api.github.com/users/popomore/gists{/gist_id}","starred_url":"https://api.github.com/users/popomore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popomore/subscriptions","organizations_url":"https://api.github.com/users/popomore/orgs","repos_url":"https://api.github.com/users/popomore/repos","events_url":"https://api.github.com/users/popomore/events{/privacy}","received_events_url":"https://api.github.com/users/popomore/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eggjs/egg-cluster/pulls/73/commits","review_comments_url":"https://api.github.com/repos/eggjs/egg-cluster/pulls/73/comments","review_comment_url":"https://api.github.com/repos/eggjs/egg-cluster/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eggjs/egg-cluster/issues/73/comments","statuses_url":"https://api.github.com/repos/eggjs/egg-cluster/statuses/8e14ff7262e522454b6e1555d16365045adf73c0","head":{"label":"eggjs:require","ref":"require","sha":"8e14ff7262e522454b6e1555d16365045adf73c0","user":{"login":"eggjs","id":15833670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1ODMzNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/15833670?v=4","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"repo":{"id":61421551,"node_id":"MDEwOlJlcG9zaXRvcnk2MTQyMTU1MQ==","name":"egg-cluster","full_name":"eggjs/egg-cluster","owner":{"login":"eggjs","id":15833670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1ODMzNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/15833670?v=4","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eggjs/egg-cluster","description":"cluster manager for egg","fork":false,"url":"https://api.github.com/repos/eggjs/egg-cluster","forks_url":"https://api.github.com/repos/eggjs/egg-cluster/forks","keys_url":"https://api.github.com/repos/eggjs/egg-cluster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eggjs/egg-cluster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eggjs/egg-cluster/teams","hooks_url":"https://api.github.com/repos/eggjs/egg-cluster/hooks","issue_events_url":"https://api.github.com/repos/eggjs/egg-cluster/issues/events{/number}","events_url":"https://api.github.com/repos/eggjs/egg-cluster/events","assignees_url":"https://api.github.com/repos/eggjs/egg-cluster/assignees{/user}","branches_url":"https://api.github.com/repos/eggjs/egg-cluster/branches{/branch}","tags_url":"https://api.github.com/repos/eggjs/egg-cluster/tags","blobs_url":"https://api.github.com/repos/eggjs/egg-cluster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eggjs/egg-cluster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eggjs/egg-cluster/git/refs{/sha}","trees_url":"https://api.github.com/repos/eggjs/egg-cluster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eggjs/egg-cluster/statuses/{sha}","languages_url":"https://api.github.com/repos/eggjs/egg-cluster/languages","stargazers_url":"https://api.github.com/repos/eggjs/egg-cluster/stargazers","contributors_url":"https://api.github.com/repos/eggjs/egg-cluster/contributors","subscribers_url":"https://api.github.com/repos/eggjs/egg-cluster/subscribers","subscription_url":"https://api.github.com/repos/eggjs/egg-cluster/subscription","commits_url":"https://api.github.com/repos/eggjs/egg-cluster/commits{/sha}","git_commits_url":"https://api.github.com/repos/eggjs/egg-cluster/git/commits{/sha}","comments_url":"https://api.github.com/repos/eggjs/egg-cluster/comments{/number}","issue_comment_url":"https://api.github.com/repos/eggjs/egg-cluster/issues/comments{/number}","contents_url":"https://api.github.com/repos/eggjs/egg-cluster/contents/{+path}","compare_url":"https://api.github.com/repos/eggjs/egg-cluster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eggjs/egg-cluster/merges","archive_url":"https://api.github.com/repos/eggjs/egg-cluster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eggjs/egg-cluster/downloads","issues_url":"https://api.github.com/repos/eggjs/egg-cluster/issues{/number}","pulls_url":"https://api.github.com/repos/eggjs/egg-cluster/pulls{/number}","milestones_url":"https://api.github.com/repos/eggjs/egg-cluster/milestones{/number}","notifications_url":"https://api.github.com/repos/eggjs/egg-cluster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eggjs/egg-cluster/labels{/name}","releases_url":"https://api.github.com/repos/eggjs/egg-cluster/releases{/id}","deployments_url":"https://api.github.com/repos/eggjs/egg-cluster/deployments","created_at":"2016-06-18T07:02:25Z","updated_at":"2018-06-21T05:05:17Z","pushed_at":"2018-07-01T06:53:28Z","git_url":"git://github.com/eggjs/egg-cluster.git","ssh_url":"git@github.com:eggjs/egg-cluster.git","clone_url":"https://github.com/eggjs/egg-cluster.git","svn_url":"https://github.com/eggjs/egg-cluster","homepage":"","size":205,"stargazers_count":75,"watchers_count":75,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":27,"open_issues":4,"watchers":75,"default_branch":"master"}},"base":{"label":"eggjs:master","ref":"master","sha":"b3c0e39d82197cd898f04a0101897e87b574161f","user":{"login":"eggjs","id":15833670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1ODMzNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/15833670?v=4","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"repo":{"id":61421551,"node_id":"MDEwOlJlcG9zaXRvcnk2MTQyMTU1MQ==","name":"egg-cluster","full_name":"eggjs/egg-cluster","owner":{"login":"eggjs","id":15833670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1ODMzNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/15833670?v=4","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eggjs/egg-cluster","description":"cluster manager for egg","fork":false,"url":"https://api.github.com/repos/eggjs/egg-cluster","forks_url":"https://api.github.com/repos/eggjs/egg-cluster/forks","keys_url":"https://api.github.com/repos/eggjs/egg-cluster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eggjs/egg-cluster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eggjs/egg-cluster/teams","hooks_url":"https://api.github.com/repos/eggjs/egg-cluster/hooks","issue_events_url":"https://api.github.com/repos/eggjs/egg-cluster/issues/events{/number}","events_url":"https://api.github.com/repos/eggjs/egg-cluster/events","assignees_url":"https://api.github.com/repos/eggjs/egg-cluster/assignees{/user}","branches_url":"https://api.github.com/repos/eggjs/egg-cluster/branches{/branch}","tags_url":"https://api.github.com/repos/eggjs/egg-cluster/tags","blobs_url":"https://api.github.com/repos/eggjs/egg-cluster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eggjs/egg-cluster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eggjs/egg-cluster/git/refs{/sha}","trees_url":"https://api.github.com/repos/eggjs/egg-cluster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eggjs/egg-cluster/statuses/{sha}","languages_url":"https://api.github.com/repos/eggjs/egg-cluster/languages","stargazers_url":"https://api.github.com/repos/eggjs/egg-cluster/stargazers","contributors_url":"https://api.github.com/repos/eggjs/egg-cluster/contributors","subscribers_url":"https://api.github.com/repos/eggjs/egg-cluster/subscribers","subscription_url":"https://api.github.com/repos/eggjs/egg-cluster/subscription","commits_url":"https://api.github.com/repos/eggjs/egg-cluster/commits{/sha}","git_commits_url":"https://api.github.com/repos/eggjs/egg-cluster/git/commits{/sha}","comments_url":"https://api.github.com/repos/eggjs/egg-cluster/comments{/number}","issue_comment_url":"https://api.github.com/repos/eggjs/egg-cluster/issues/comments{/number}","contents_url":"https://api.github.com/repos/eggjs/egg-cluster/contents/{+path}","compare_url":"https://api.github.com/repos/eggjs/egg-cluster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eggjs/egg-cluster/merges","archive_url":"https://api.github.com/repos/eggjs/egg-cluster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eggjs/egg-cluster/downloads","issues_url":"https://api.github.com/repos/eggjs/egg-cluster/issues{/number}","pulls_url":"https://api.github.com/repos/eggjs/egg-cluster/pulls{/number}","milestones_url":"https://api.github.com/repos/eggjs/egg-cluster/milestones{/number}","notifications_url":"https://api.github.com/repos/eggjs/egg-cluster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eggjs/egg-cluster/labels{/name}","releases_url":"https://api.github.com/repos/eggjs/egg-cluster/releases{/id}","deployments_url":"https://api.github.com/repos/eggjs/egg-cluster/deployments","created_at":"2016-06-18T07:02:25Z","updated_at":"2018-06-21T05:05:17Z","pushed_at":"2018-07-01T06:53:28Z","git_url":"git://github.com/eggjs/egg-cluster.git","ssh_url":"git@github.com:eggjs/egg-cluster.git","clone_url":"https://github.com/eggjs/egg-cluster.git","svn_url":"https://github.com/eggjs/egg-cluster","homepage":"","size":205,"stargazers_count":75,"watchers_count":75,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":27,"open_issues":4,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eggjs/egg-cluster/pulls/73"},"html":{"href":"https://github.com/eggjs/egg-cluster/pull/73"},"issue":{"href":"https://api.github.com/repos/eggjs/egg-cluster/issues/73"},"comments":{"href":"https://api.github.com/repos/eggjs/egg-cluster/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/eggjs/egg-cluster/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/eggjs/egg-cluster/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eggjs/egg-cluster/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/eggjs/egg-cluster/statuses/8e14ff7262e522454b6e1555d16365045adf73c0"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"atian25"}}