{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/gemini-testing/configparser/pulls/1","id":37369070,"html_url":"https://github.com/gemini-testing/configparser/pull/1","diff_url":"https://github.com/gemini-testing/configparser/pull/1.diff","patch_url":"https://github.com/gemini-testing/configparser/pull/1.patch","issue_url":"https://api.github.com/repos/gemini-testing/configparser/issues/1","number":1,"state":"open","locked":false,"title":"Initial version","user":{"login":"SevInf","id":603056,"avatar_url":"https://avatars.githubusercontent.com/u/603056?v=3","gravatar_id":"","url":"https://api.github.com/users/SevInf","html_url":"https://github.com/SevInf","followers_url":"https://api.github.com/users/SevInf/followers","following_url":"https://api.github.com/users/SevInf/following{/other_user}","gists_url":"https://api.github.com/users/SevInf/gists{/gist_id}","starred_url":"https://api.github.com/users/SevInf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SevInf/subscriptions","organizations_url":"https://api.github.com/users/SevInf/orgs","repos_url":"https://api.github.com/users/SevInf/repos","events_url":"https://api.github.com/users/SevInf/events{/privacy}","received_events_url":"https://api.github.com/users/SevInf/received_events","type":"User","site_admin":false},"body":"Использование:\r\n\r\n1. Описываем конфиг:\r\n\r\n```js\r\nvar parser = root(section({\r\n      system: section({\r\n            parallelLimit: option({\r\n                parseEnv: Number,\r\n                parseCli: Number,\r\n                validate: function() {...}\r\n            })\r\n      }),\r\n     browsers: map(\r\n          section({\r\n              calibrate: option(...),\r\n              windowSize: option(...)\r\n          })\r\n     )\r\n})\r\n```\r\n\r\n2. Зовем:\r\n```\r\nvar result = parser({\r\n     options: {\r\n         system: { parallelLimit: 3}\r\n         browsers: { ie: {...}}\r\n     },\r\n    argv: process.argv,\r\n    env: process.env\r\n});\r\n\r\n3. Получаем распаршенные опции с учетом конфига, переменных среды и аргументов.\r\n\r\nТипы полей в конфиге:\r\n- `option` - одиночная опция\r\n- `section` - секция с жестко заданными опциями. Любая лишняя опция в ней = ошибка\r\n- `map` - объект, где ключи задаются пользователем","created_at":"2015-06-10T15:08:37Z","updated_at":"2015-06-10T15:08:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gemini-testing/configparser/pulls/1/commits","review_comments_url":"https://api.github.com/repos/gemini-testing/configparser/pulls/1/comments","review_comment_url":"https://api.github.com/repos/gemini-testing/configparser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-testing/configparser/issues/1/comments","statuses_url":"https://api.github.com/repos/gemini-testing/configparser/statuses/c4dbd5647f6462bd0cfdea6009dad8516ffb31c9","head":{"label":"gemini-testing:feature/initial","ref":"feature/initial","sha":"c4dbd5647f6462bd0cfdea6009dad8516ffb31c9","user":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"repo":{"id":37203240,"name":"configparser","full_name":"gemini-testing/configparser","owner":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-testing/configparser","description":"","fork":false,"url":"https://api.github.com/repos/gemini-testing/configparser","forks_url":"https://api.github.com/repos/gemini-testing/configparser/forks","keys_url":"https://api.github.com/repos/gemini-testing/configparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/configparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/configparser/teams","hooks_url":"https://api.github.com/repos/gemini-testing/configparser/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/configparser/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/configparser/events","assignees_url":"https://api.github.com/repos/gemini-testing/configparser/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/configparser/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/configparser/tags","blobs_url":"https://api.github.com/repos/gemini-testing/configparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/configparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/configparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/configparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/configparser/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/configparser/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/configparser/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/configparser/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/configparser/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/configparser/subscription","commits_url":"https://api.github.com/repos/gemini-testing/configparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/configparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/configparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/configparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/configparser/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/configparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/configparser/merges","archive_url":"https://api.github.com/repos/gemini-testing/configparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/configparser/downloads","issues_url":"https://api.github.com/repos/gemini-testing/configparser/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/configparser/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/configparser/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/configparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/configparser/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/configparser/releases{/id}","created_at":"2015-06-10T14:48:47Z","updated_at":"2015-06-10T14:48:47Z","pushed_at":"2015-06-10T14:56:34Z","git_url":"git://github.com/gemini-testing/configparser.git","ssh_url":"git@github.com:gemini-testing/configparser.git","clone_url":"https://github.com/gemini-testing/configparser.git","svn_url":"https://github.com/gemini-testing/configparser","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"gemini-testing:master","ref":"master","sha":"e4c8df35bf6c8d525cb654a387d569dcf3a062fa","user":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"repo":{"id":37203240,"name":"configparser","full_name":"gemini-testing/configparser","owner":{"login":"gemini-testing","id":11424134,"avatar_url":"https://avatars.githubusercontent.com/u/11424134?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-testing","html_url":"https://github.com/gemini-testing","followers_url":"https://api.github.com/users/gemini-testing/followers","following_url":"https://api.github.com/users/gemini-testing/following{/other_user}","gists_url":"https://api.github.com/users/gemini-testing/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-testing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-testing/subscriptions","organizations_url":"https://api.github.com/users/gemini-testing/orgs","repos_url":"https://api.github.com/users/gemini-testing/repos","events_url":"https://api.github.com/users/gemini-testing/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-testing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-testing/configparser","description":"","fork":false,"url":"https://api.github.com/repos/gemini-testing/configparser","forks_url":"https://api.github.com/repos/gemini-testing/configparser/forks","keys_url":"https://api.github.com/repos/gemini-testing/configparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-testing/configparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-testing/configparser/teams","hooks_url":"https://api.github.com/repos/gemini-testing/configparser/hooks","issue_events_url":"https://api.github.com/repos/gemini-testing/configparser/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-testing/configparser/events","assignees_url":"https://api.github.com/repos/gemini-testing/configparser/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-testing/configparser/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-testing/configparser/tags","blobs_url":"https://api.github.com/repos/gemini-testing/configparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-testing/configparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-testing/configparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-testing/configparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-testing/configparser/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-testing/configparser/languages","stargazers_url":"https://api.github.com/repos/gemini-testing/configparser/stargazers","contributors_url":"https://api.github.com/repos/gemini-testing/configparser/contributors","subscribers_url":"https://api.github.com/repos/gemini-testing/configparser/subscribers","subscription_url":"https://api.github.com/repos/gemini-testing/configparser/subscription","commits_url":"https://api.github.com/repos/gemini-testing/configparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-testing/configparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-testing/configparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-testing/configparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-testing/configparser/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-testing/configparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-testing/configparser/merges","archive_url":"https://api.github.com/repos/gemini-testing/configparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-testing/configparser/downloads","issues_url":"https://api.github.com/repos/gemini-testing/configparser/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-testing/configparser/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-testing/configparser/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-testing/configparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-testing/configparser/labels{/name}","releases_url":"https://api.github.com/repos/gemini-testing/configparser/releases{/id}","created_at":"2015-06-10T14:48:47Z","updated_at":"2015-06-10T14:48:47Z","pushed_at":"2015-06-10T14:56:34Z","git_url":"git://github.com/gemini-testing/configparser.git","ssh_url":"git@github.com:gemini-testing/configparser.git","clone_url":"https://github.com/gemini-testing/configparser.git","svn_url":"https://github.com/gemini-testing/configparser","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-testing/configparser/pulls/1"},"html":{"href":"https://github.com/gemini-testing/configparser/pull/1"},"issue":{"href":"https://api.github.com/repos/gemini-testing/configparser/issues/1"},"comments":{"href":"https://api.github.com/repos/gemini-testing/configparser/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-testing/configparser/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-testing/configparser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-testing/configparser/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-testing/configparser/statuses/c4dbd5647f6462bd0cfdea6009dad8516ffb31c9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":694,"deletions":0,"changed_files":14}}