{"action":"created","comment":{"url":"https://api.github.com/repos/source-config/source-config/pulls/comments/233856629","pull_request_review_id":175367178,"id":233856629,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzg1NjYyOQ==","diff_hunk":"@@ -0,0 +1,97 @@\n+import { Emitter as SourceEmitter, Options as SourceOptions, Source } from './index';\n+import { EventEmitter } from 'events';\n+import { readFile } from 'fs';\n+import { get } from 'lodash';\n+\n+interface Options extends SourceOptions {\n+  /**\n+   * Path to file content\n+   */\n+  source: string;\n+  /**\n+   * Options for process behavior changes\n+   */\n+  options?: {\n+    /**\n+     * Options for fs.readFile processor\n+     */\n+    reader?: { encoding?: string | null; flag?: string; } | string | undefined | null;\n+    /**\n+     * Convert Buffer to string options for using it in Buffer.toString() call\n+     */\n+    buffer?: { encoding?: string, start?: number, end?: number };\n+  };\n+}\n+\n+/**\n+ * Extract configuration options from process.env property\n+ */\n+class File<TData extends string> extends Source<TData> {\n+  /**\n+   * Create an EventEmitter instance for every source\n+   * @type {EventEmitter}\n+   */\n+  public readonly emitter: SourceEmitter<TData> = new EventEmitter();\n+\n+  public constructor(protected options: Options) {","path":"src/source/file.ts","position":36,"original_position":36,"commit_id":"ffda368fb8d79cc262aa25ec713013b8234d4c93","original_commit_id":"ffda368fb8d79cc262aa25ec713013b8234d4c93","user":{"login":"nlebedevinc","id":11016898,"node_id":"MDQ6VXNlcjExMDE2ODk4","avatar_url":"https://avatars1.githubusercontent.com/u/11016898?v=4","gravatar_id":"","url":"https://api.github.com/users/nlebedevinc","html_url":"https://github.com/nlebedevinc","followers_url":"https://api.github.com/users/nlebedevinc/followers","following_url":"https://api.github.com/users/nlebedevinc/following{/other_user}","gists_url":"https://api.github.com/users/nlebedevinc/gists{/gist_id}","starred_url":"https://api.github.com/users/nlebedevinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlebedevinc/subscriptions","organizations_url":"https://api.github.com/users/nlebedevinc/orgs","repos_url":"https://api.github.com/users/nlebedevinc/repos","events_url":"https://api.github.com/users/nlebedevinc/events{/privacy}","received_events_url":"https://api.github.com/users/nlebedevinc/received_events","type":"User","site_admin":false},"body":"Please remove `public` here.","created_at":"2018-11-15T14:15:04Z","updated_at":"2018-11-15T14:15:04Z","html_url":"https://github.com/source-config/source-config/pull/8#discussion_r233856629","pull_request_url":"https://api.github.com/repos/source-config/source-config/pulls/8","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/source-config/source-config/pulls/comments/233856629"},"html":{"href":"https://github.com/source-config/source-config/pull/8#discussion_r233856629"},"pull_request":{"href":"https://api.github.com/repos/source-config/source-config/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/source-config/source-config/pulls/8","id":231207011,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMjA3MDEx","html_url":"https://github.com/source-config/source-config/pull/8","diff_url":"https://github.com/source-config/source-config/pull/8.diff","patch_url":"https://github.com/source-config/source-config/pull/8.patch","issue_url":"https://api.github.com/repos/source-config/source-config/issues/8","number":8,"state":"open","locked":false,"title":"File source","user":{"login":"akazakou","id":326397,"node_id":"MDQ6VXNlcjMyNjM5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/326397?v=4","gravatar_id":"","url":"https://api.github.com/users/akazakou","html_url":"https://github.com/akazakou","followers_url":"https://api.github.com/users/akazakou/followers","following_url":"https://api.github.com/users/akazakou/following{/other_user}","gists_url":"https://api.github.com/users/akazakou/gists{/gist_id}","starred_url":"https://api.github.com/users/akazakou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akazakou/subscriptions","organizations_url":"https://api.github.com/users/akazakou/orgs","repos_url":"https://api.github.com/users/akazakou/repos","events_url":"https://api.github.com/users/akazakou/events{/privacy}","received_events_url":"https://api.github.com/users/akazakou/received_events","type":"User","site_admin":false},"body":"Related to #2 ","created_at":"2018-11-15T14:09:25Z","updated_at":"2018-11-15T14:15:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2eca9bc7f4d7814d77cdd2037729767acfc5ccc","assignee":{"login":"akazakou","id":326397,"node_id":"MDQ6VXNlcjMyNjM5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/326397?v=4","gravatar_id":"","url":"https://api.github.com/users/akazakou","html_url":"https://github.com/akazakou","followers_url":"https://api.github.com/users/akazakou/followers","following_url":"https://api.github.com/users/akazakou/following{/other_user}","gists_url":"https://api.github.com/users/akazakou/gists{/gist_id}","starred_url":"https://api.github.com/users/akazakou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akazakou/subscriptions","organizations_url":"https://api.github.com/users/akazakou/orgs","repos_url":"https://api.github.com/users/akazakou/repos","events_url":"https://api.github.com/users/akazakou/events{/privacy}","received_events_url":"https://api.github.com/users/akazakou/received_events","type":"User","site_admin":false},"assignees":[{"login":"akazakou","id":326397,"node_id":"MDQ6VXNlcjMyNjM5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/326397?v=4","gravatar_id":"","url":"https://api.github.com/users/akazakou","html_url":"https://github.com/akazakou","followers_url":"https://api.github.com/users/akazakou/followers","following_url":"https://api.github.com/users/akazakou/following{/other_user}","gists_url":"https://api.github.com/users/akazakou/gists{/gist_id}","starred_url":"https://api.github.com/users/akazakou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akazakou/subscriptions","organizations_url":"https://api.github.com/users/akazakou/orgs","repos_url":"https://api.github.com/users/akazakou/repos","events_url":"https://api.github.com/users/akazakou/events{/privacy}","received_events_url":"https://api.github.com/users/akazakou/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1077047953,"node_id":"MDU6TGFiZWwxMDc3MDQ3OTUz","url":"https://api.github.com/repos/source-config/source-config/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/source-config/source-config/pulls/8/commits","review_comments_url":"https://api.github.com/repos/source-config/source-config/pulls/8/comments","review_comment_url":"https://api.github.com/repos/source-config/source-config/pulls/comments{/number}","comments_url":"https://api.github.com/repos/source-config/source-config/issues/8/comments","statuses_url":"https://api.github.com/repos/source-config/source-config/statuses/ffda368fb8d79cc262aa25ec713013b8234d4c93","head":{"label":"source-config:feature/source-file-implementation","ref":"feature/source-file-implementation","sha":"ffda368fb8d79cc262aa25ec713013b8234d4c93","user":{"login":"source-config","id":43750635,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNzUwNjM1","avatar_url":"https://avatars0.githubusercontent.com/u/43750635?v=4","gravatar_id":"","url":"https://api.github.com/users/source-config","html_url":"https://github.com/source-config","followers_url":"https://api.github.com/users/source-config/followers","following_url":"https://api.github.com/users/source-config/following{/other_user}","gists_url":"https://api.github.com/users/source-config/gists{/gist_id}","starred_url":"https://api.github.com/users/source-config/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/source-config/subscriptions","organizations_url":"https://api.github.com/users/source-config/orgs","repos_url":"https://api.github.com/users/source-config/repos","events_url":"https://api.github.com/users/source-config/events{/privacy}","received_events_url":"https://api.github.com/users/source-config/received_events","type":"Organization","site_admin":false},"repo":{"id":151294295,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEyOTQyOTU=","name":"source-config","full_name":"source-config/source-config","private":false,"owner":{"login":"source-config","id":43750635,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNzUwNjM1","avatar_url":"https://avatars0.githubusercontent.com/u/43750635?v=4","gravatar_id":"","url":"https://api.github.com/users/source-config","html_url":"https://github.com/source-config","followers_url":"https://api.github.com/users/source-config/followers","following_url":"https://api.github.com/users/source-config/following{/other_user}","gists_url":"https://api.github.com/users/source-config/gists{/gist_id}","starred_url":"https://api.github.com/users/source-config/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/source-config/subscriptions","organizations_url":"https://api.github.com/users/source-config/orgs","repos_url":"https://api.github.com/users/source-config/repos","events_url":"https://api.github.com/users/source-config/events{/privacy}","received_events_url":"https://api.github.com/users/source-config/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/source-config/source-config","description":"Node.js Application configuration using various of sources","fork":false,"url":"https://api.github.com/repos/source-config/source-config","forks_url":"https://api.github.com/repos/source-config/source-config/forks","keys_url":"https://api.github.com/repos/source-config/source-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/source-config/source-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/source-config/source-config/teams","hooks_url":"https://api.github.com/repos/source-config/source-config/hooks","issue_events_url":"https://api.github.com/repos/source-config/source-config/issues/events{/number}","events_url":"https://api.github.com/repos/source-config/source-config/events","assignees_url":"https://api.github.com/repos/source-config/source-config/assignees{/user}","branches_url":"https://api.github.com/repos/source-config/source-config/branches{/branch}","tags_url":"https://api.github.com/repos/source-config/source-config/tags","blobs_url":"https://api.github.com/repos/source-config/source-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/source-config/source-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/source-config/source-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/source-config/source-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/source-config/source-config/statuses/{sha}","languages_url":"https://api.github.com/repos/source-config/source-config/languages","stargazers_url":"https://api.github.com/repos/source-config/source-config/stargazers","contributors_url":"https://api.github.com/repos/source-config/source-config/contributors","subscribers_url":"https://api.github.com/repos/source-config/source-config/subscribers","subscription_url":"https://api.github.com/repos/source-config/source-config/subscription","commits_url":"https://api.github.com/repos/source-config/source-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/source-config/source-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/source-config/source-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/source-config/source-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/source-config/source-config/contents/{+path}","compare_url":"https://api.github.com/repos/source-config/source-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/source-config/source-config/merges","archive_url":"https://api.github.com/repos/source-config/source-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/source-config/source-config/downloads","issues_url":"https://api.github.com/repos/source-config/source-config/issues{/number}","pulls_url":"https://api.github.com/repos/source-config/source-config/pulls{/number}","milestones_url":"https://api.github.com/repos/source-config/source-config/milestones{/number}","notifications_url":"https://api.github.com/repos/source-config/source-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/source-config/source-config/labels{/name}","releases_url":"https://api.github.com/repos/source-config/source-config/releases{/id}","deployments_url":"https://api.github.com/repos/source-config/source-config/deployments","created_at":"2018-10-02T17:22:15Z","updated_at":"2018-11-09T17:34:59Z","pushed_at":"2018-11-15T14:09:26Z","git_url":"git://github.com/source-config/source-config.git","ssh_url":"git@github.com:source-config/source-config.git","clone_url":"https://github.com/source-config/source-config.git","svn_url":"https://github.com/source-config/source-config","homepage":null,"size":15,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"source-config:master","ref":"master","sha":"569a7d9c5caa67ac94908aeb4270149a4be62bb5","user":{"login":"source-config","id":43750635,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNzUwNjM1","avatar_url":"https://avatars0.githubusercontent.com/u/43750635?v=4","gravatar_id":"","url":"https://api.github.com/users/source-config","html_url":"https://github.com/source-config","followers_url":"https://api.github.com/users/source-config/followers","following_url":"https://api.github.com/users/source-config/following{/other_user}","gists_url":"https://api.github.com/users/source-config/gists{/gist_id}","starred_url":"https://api.github.com/users/source-config/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/source-config/subscriptions","organizations_url":"https://api.github.com/users/source-config/orgs","repos_url":"https://api.github.com/users/source-config/repos","events_url":"https://api.github.com/users/source-config/events{/privacy}","received_events_url":"https://api.github.com/users/source-config/received_events","type":"Organization","site_admin":false},"repo":{"id":151294295,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEyOTQyOTU=","name":"source-config","full_name":"source-config/source-config","private":false,"owner":{"login":"source-config","id":43750635,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNzUwNjM1","avatar_url":"https://avatars0.githubusercontent.com/u/43750635?v=4","gravatar_id":"","url":"https://api.github.com/users/source-config","html_url":"https://github.com/source-config","followers_url":"https://api.github.com/users/source-config/followers","following_url":"https://api.github.com/users/source-config/following{/other_user}","gists_url":"https://api.github.com/users/source-config/gists{/gist_id}","starred_url":"https://api.github.com/users/source-config/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/source-config/subscriptions","organizations_url":"https://api.github.com/users/source-config/orgs","repos_url":"https://api.github.com/users/source-config/repos","events_url":"https://api.github.com/users/source-config/events{/privacy}","received_events_url":"https://api.github.com/users/source-config/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/source-config/source-config","description":"Node.js Application configuration using various of sources","fork":false,"url":"https://api.github.com/repos/source-config/source-config","forks_url":"https://api.github.com/repos/source-config/source-config/forks","keys_url":"https://api.github.com/repos/source-config/source-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/source-config/source-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/source-config/source-config/teams","hooks_url":"https://api.github.com/repos/source-config/source-config/hooks","issue_events_url":"https://api.github.com/repos/source-config/source-config/issues/events{/number}","events_url":"https://api.github.com/repos/source-config/source-config/events","assignees_url":"https://api.github.com/repos/source-config/source-config/assignees{/user}","branches_url":"https://api.github.com/repos/source-config/source-config/branches{/branch}","tags_url":"https://api.github.com/repos/source-config/source-config/tags","blobs_url":"https://api.github.com/repos/source-config/source-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/source-config/source-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/source-config/source-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/source-config/source-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/source-config/source-config/statuses/{sha}","languages_url":"https://api.github.com/repos/source-config/source-config/languages","stargazers_url":"https://api.github.com/repos/source-config/source-config/stargazers","contributors_url":"https://api.github.com/repos/source-config/source-config/contributors","subscribers_url":"https://api.github.com/repos/source-config/source-config/subscribers","subscription_url":"https://api.github.com/repos/source-config/source-config/subscription","commits_url":"https://api.github.com/repos/source-config/source-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/source-config/source-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/source-config/source-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/source-config/source-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/source-config/source-config/contents/{+path}","compare_url":"https://api.github.com/repos/source-config/source-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/source-config/source-config/merges","archive_url":"https://api.github.com/repos/source-config/source-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/source-config/source-config/downloads","issues_url":"https://api.github.com/repos/source-config/source-config/issues{/number}","pulls_url":"https://api.github.com/repos/source-config/source-config/pulls{/number}","milestones_url":"https://api.github.com/repos/source-config/source-config/milestones{/number}","notifications_url":"https://api.github.com/repos/source-config/source-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/source-config/source-config/labels{/name}","releases_url":"https://api.github.com/repos/source-config/source-config/releases{/id}","deployments_url":"https://api.github.com/repos/source-config/source-config/deployments","created_at":"2018-10-02T17:22:15Z","updated_at":"2018-11-09T17:34:59Z","pushed_at":"2018-11-15T14:09:26Z","git_url":"git://github.com/source-config/source-config.git","ssh_url":"git@github.com:source-config/source-config.git","clone_url":"https://github.com/source-config/source-config.git","svn_url":"https://github.com/source-config/source-config","homepage":null,"size":15,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/source-config/source-config/pulls/8"},"html":{"href":"https://github.com/source-config/source-config/pull/8"},"issue":{"href":"https://api.github.com/repos/source-config/source-config/issues/8"},"comments":{"href":"https://api.github.com/repos/source-config/source-config/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/source-config/source-config/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/source-config/source-config/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/source-config/source-config/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/source-config/source-config/statuses/ffda368fb8d79cc262aa25ec713013b8234d4c93"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nlebedevinc"}}