{"action":"closed","number":6,"pull_request":{"url":"https://api.github.com/repos/Cocycles/electron-storage/pulls/6","id":95418420,"html_url":"https://github.com/Cocycles/electron-storage/pull/6","diff_url":"https://github.com/Cocycles/electron-storage/pull/6.diff","patch_url":"https://github.com/Cocycles/electron-storage/pull/6.patch","issue_url":"https://api.github.com/repos/Cocycles/electron-storage/issues/6","number":6,"state":"closed","locked":false,"title":"Add boolean to create new file on enoent","user":{"login":"colmose","id":8244036,"avatar_url":"https://avatars.githubusercontent.com/u/8244036?v=3","gravatar_id":"","url":"https://api.github.com/users/colmose","html_url":"https://github.com/colmose","followers_url":"https://api.github.com/users/colmose/followers","following_url":"https://api.github.com/users/colmose/following{/other_user}","gists_url":"https://api.github.com/users/colmose/gists{/gist_id}","starred_url":"https://api.github.com/users/colmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colmose/subscriptions","organizations_url":"https://api.github.com/users/colmose/orgs","repos_url":"https://api.github.com/users/colmose/repos","events_url":"https://api.github.com/users/colmose/events{/privacy}","received_events_url":"https://api.github.com/users/colmose/received_events","type":"User","site_admin":false},"body":"Added an optional options object to the get() call which creates a new file if none exists. \r\n\r\nI wanted to update existing json files with a `storage.get()`, then `storage.set()` but it blows up on the initial pass. \r\n\r\nExample:\r\n\r\n```\r\nstorage.get('my-nonexistent.json', {create: true}, (err, data) => {\r\n    console.log(data);\r\n});\r\n\r\n```\r\n\r\nwill create the file `my-nonexistent.json` and return `{}` if it doesn't exist.\r\n\r\nIt returns the file as normal if the file exists. ","created_at":"2016-11-27T21:59:47Z","updated_at":"2016-11-30T06:25:35Z","closed_at":"2016-11-30T06:25:35Z","merged_at":null,"merge_commit_sha":"fe23bf940fd34c858f445872a0754280e58913f5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Cocycles/electron-storage/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Cocycles/electron-storage/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Cocycles/electron-storage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cocycles/electron-storage/issues/6/comments","statuses_url":"https://api.github.com/repos/Cocycles/electron-storage/statuses/9584f5c42ce52a06c4b1417c89d4039084bff8d1","head":{"label":"colmose:add-boolean-to-create-new-file-on-ENOENT","ref":"add-boolean-to-create-new-file-on-ENOENT","sha":"9584f5c42ce52a06c4b1417c89d4039084bff8d1","user":{"login":"colmose","id":8244036,"avatar_url":"https://avatars.githubusercontent.com/u/8244036?v=3","gravatar_id":"","url":"https://api.github.com/users/colmose","html_url":"https://github.com/colmose","followers_url":"https://api.github.com/users/colmose/followers","following_url":"https://api.github.com/users/colmose/following{/other_user}","gists_url":"https://api.github.com/users/colmose/gists{/gist_id}","starred_url":"https://api.github.com/users/colmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colmose/subscriptions","organizations_url":"https://api.github.com/users/colmose/orgs","repos_url":"https://api.github.com/users/colmose/repos","events_url":"https://api.github.com/users/colmose/events{/privacy}","received_events_url":"https://api.github.com/users/colmose/received_events","type":"User","site_admin":false},"repo":{"id":74912913,"name":"electron-storage","full_name":"colmose/electron-storage","owner":{"login":"colmose","id":8244036,"avatar_url":"https://avatars.githubusercontent.com/u/8244036?v=3","gravatar_id":"","url":"https://api.github.com/users/colmose","html_url":"https://github.com/colmose","followers_url":"https://api.github.com/users/colmose/followers","following_url":"https://api.github.com/users/colmose/following{/other_user}","gists_url":"https://api.github.com/users/colmose/gists{/gist_id}","starred_url":"https://api.github.com/users/colmose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colmose/subscriptions","organizations_url":"https://api.github.com/users/colmose/orgs","repos_url":"https://api.github.com/users/colmose/repos","events_url":"https://api.github.com/users/colmose/events{/privacy}","received_events_url":"https://api.github.com/users/colmose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/colmose/electron-storage","description":"Simply save/load json files to/from file system in electron applications","fork":true,"url":"https://api.github.com/repos/colmose/electron-storage","forks_url":"https://api.github.com/repos/colmose/electron-storage/forks","keys_url":"https://api.github.com/repos/colmose/electron-storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colmose/electron-storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colmose/electron-storage/teams","hooks_url":"https://api.github.com/repos/colmose/electron-storage/hooks","issue_events_url":"https://api.github.com/repos/colmose/electron-storage/issues/events{/number}","events_url":"https://api.github.com/repos/colmose/electron-storage/events","assignees_url":"https://api.github.com/repos/colmose/electron-storage/assignees{/user}","branches_url":"https://api.github.com/repos/colmose/electron-storage/branches{/branch}","tags_url":"https://api.github.com/repos/colmose/electron-storage/tags","blobs_url":"https://api.github.com/repos/colmose/electron-storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colmose/electron-storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colmose/electron-storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/colmose/electron-storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colmose/electron-storage/statuses/{sha}","languages_url":"https://api.github.com/repos/colmose/electron-storage/languages","stargazers_url":"https://api.github.com/repos/colmose/electron-storage/stargazers","contributors_url":"https://api.github.com/repos/colmose/electron-storage/contributors","subscribers_url":"https://api.github.com/repos/colmose/electron-storage/subscribers","subscription_url":"https://api.github.com/repos/colmose/electron-storage/subscription","commits_url":"https://api.github.com/repos/colmose/electron-storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/colmose/electron-storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/colmose/electron-storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/colmose/electron-storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/colmose/electron-storage/contents/{+path}","compare_url":"https://api.github.com/repos/colmose/electron-storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colmose/electron-storage/merges","archive_url":"https://api.github.com/repos/colmose/electron-storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colmose/electron-storage/downloads","issues_url":"https://api.github.com/repos/colmose/electron-storage/issues{/number}","pulls_url":"https://api.github.com/repos/colmose/electron-storage/pulls{/number}","milestones_url":"https://api.github.com/repos/colmose/electron-storage/milestones{/number}","notifications_url":"https://api.github.com/repos/colmose/electron-storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colmose/electron-storage/labels{/name}","releases_url":"https://api.github.com/repos/colmose/electron-storage/releases{/id}","deployments_url":"https://api.github.com/repos/colmose/electron-storage/deployments","created_at":"2016-11-27T20:39:35Z","updated_at":"2016-11-27T20:39:36Z","pushed_at":"2016-11-27T21:59:22Z","git_url":"git://github.com/colmose/electron-storage.git","ssh_url":"git@github.com:colmose/electron-storage.git","clone_url":"https://github.com/colmose/electron-storage.git","svn_url":"https://github.com/colmose/electron-storage","homepage":"","size":21,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Cocycles:master","ref":"master","sha":"d53c9e2d4454248da3fd919715b62bb9c91a70ad","user":{"login":"Cocycles","id":6418174,"avatar_url":"https://avatars.githubusercontent.com/u/6418174?v=3","gravatar_id":"","url":"https://api.github.com/users/Cocycles","html_url":"https://github.com/Cocycles","followers_url":"https://api.github.com/users/Cocycles/followers","following_url":"https://api.github.com/users/Cocycles/following{/other_user}","gists_url":"https://api.github.com/users/Cocycles/gists{/gist_id}","starred_url":"https://api.github.com/users/Cocycles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cocycles/subscriptions","organizations_url":"https://api.github.com/users/Cocycles/orgs","repos_url":"https://api.github.com/users/Cocycles/repos","events_url":"https://api.github.com/users/Cocycles/events{/privacy}","received_events_url":"https://api.github.com/users/Cocycles/received_events","type":"Organization","site_admin":false},"repo":{"id":62633293,"name":"electron-storage","full_name":"Cocycles/electron-storage","owner":{"login":"Cocycles","id":6418174,"avatar_url":"https://avatars.githubusercontent.com/u/6418174?v=3","gravatar_id":"","url":"https://api.github.com/users/Cocycles","html_url":"https://github.com/Cocycles","followers_url":"https://api.github.com/users/Cocycles/followers","following_url":"https://api.github.com/users/Cocycles/following{/other_user}","gists_url":"https://api.github.com/users/Cocycles/gists{/gist_id}","starred_url":"https://api.github.com/users/Cocycles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cocycles/subscriptions","organizations_url":"https://api.github.com/users/Cocycles/orgs","repos_url":"https://api.github.com/users/Cocycles/repos","events_url":"https://api.github.com/users/Cocycles/events{/privacy}","received_events_url":"https://api.github.com/users/Cocycles/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cocycles/electron-storage","description":"Simply save/load json files to/from file system in electron applications","fork":false,"url":"https://api.github.com/repos/Cocycles/electron-storage","forks_url":"https://api.github.com/repos/Cocycles/electron-storage/forks","keys_url":"https://api.github.com/repos/Cocycles/electron-storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cocycles/electron-storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cocycles/electron-storage/teams","hooks_url":"https://api.github.com/repos/Cocycles/electron-storage/hooks","issue_events_url":"https://api.github.com/repos/Cocycles/electron-storage/issues/events{/number}","events_url":"https://api.github.com/repos/Cocycles/electron-storage/events","assignees_url":"https://api.github.com/repos/Cocycles/electron-storage/assignees{/user}","branches_url":"https://api.github.com/repos/Cocycles/electron-storage/branches{/branch}","tags_url":"https://api.github.com/repos/Cocycles/electron-storage/tags","blobs_url":"https://api.github.com/repos/Cocycles/electron-storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cocycles/electron-storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cocycles/electron-storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cocycles/electron-storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cocycles/electron-storage/statuses/{sha}","languages_url":"https://api.github.com/repos/Cocycles/electron-storage/languages","stargazers_url":"https://api.github.com/repos/Cocycles/electron-storage/stargazers","contributors_url":"https://api.github.com/repos/Cocycles/electron-storage/contributors","subscribers_url":"https://api.github.com/repos/Cocycles/electron-storage/subscribers","subscription_url":"https://api.github.com/repos/Cocycles/electron-storage/subscription","commits_url":"https://api.github.com/repos/Cocycles/electron-storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cocycles/electron-storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cocycles/electron-storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cocycles/electron-storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cocycles/electron-storage/contents/{+path}","compare_url":"https://api.github.com/repos/Cocycles/electron-storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cocycles/electron-storage/merges","archive_url":"https://api.github.com/repos/Cocycles/electron-storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cocycles/electron-storage/downloads","issues_url":"https://api.github.com/repos/Cocycles/electron-storage/issues{/number}","pulls_url":"https://api.github.com/repos/Cocycles/electron-storage/pulls{/number}","milestones_url":"https://api.github.com/repos/Cocycles/electron-storage/milestones{/number}","notifications_url":"https://api.github.com/repos/Cocycles/electron-storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cocycles/electron-storage/labels{/name}","releases_url":"https://api.github.com/repos/Cocycles/electron-storage/releases{/id}","deployments_url":"https://api.github.com/repos/Cocycles/electron-storage/deployments","created_at":"2016-07-05T11:59:51Z","updated_at":"2016-11-30T00:04:19Z","pushed_at":"2016-11-27T21:59:47Z","git_url":"git://github.com/Cocycles/electron-storage.git","ssh_url":"git@github.com:Cocycles/electron-storage.git","clone_url":"https://github.com/Cocycles/electron-storage.git","svn_url":"https://github.com/Cocycles/electron-storage","homepage":"","size":18,"stargazers_count":50,"watchers_count":50,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Cocycles/electron-storage/pulls/6"},"html":{"href":"https://github.com/Cocycles/electron-storage/pull/6"},"issue":{"href":"https://api.github.com/repos/Cocycles/electron-storage/issues/6"},"comments":{"href":"https://api.github.com/repos/Cocycles/electron-storage/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Cocycles/electron-storage/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Cocycles/electron-storage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cocycles/electron-storage/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Cocycles/electron-storage/statuses/9584f5c42ce52a06c4b1417c89d4039084bff8d1"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":0,"commits":3,"additions":52,"deletions":13,"changed_files":2}}
{"actor":{"display_login":"ran-y"}}