{"action":"created","comment":{"url":"https://api.github.com/repos/paulirish/pwmetrics/pulls/comments/225005522","pull_request_review_id":164511262,"id":225005522,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTAwNTUyMg==","diff_hunk":"@@ -17,7 +23,20 @@ function getConfigFromFile(fileName: string = 'package.json') {\n       return config.pwmetrics || {};\n     else return config;\n   } else throw new Error(`Invalid config from ${fileName}`);\n-  \n+\n }\n \n-module.exports = { getConfigFromFile };\n+export function writeToDisk(fileName: string, data: string) {\n+  return new Promise((resolve, reject) => {\n+    const filePath = path.join(process.cwd(), fileName);\n+\n+    try {\n+      fs.writeFileSync(filePath, data);","path":"lib/utils/fs.ts","position":30,"original_position":30,"commit_id":"4a69ab03efeaaf454ccef97a217c61185452831d","original_commit_id":"4a69ab03efeaaf454ccef97a217c61185452831d","user":{"login":"denar90","id":6231516,"node_id":"MDQ6VXNlcjYyMzE1MTY=","avatar_url":"https://avatars0.githubusercontent.com/u/6231516?v=4","gravatar_id":"","url":"https://api.github.com/users/denar90","html_url":"https://github.com/denar90","followers_url":"https://api.github.com/users/denar90/followers","following_url":"https://api.github.com/users/denar90/following{/other_user}","gists_url":"https://api.github.com/users/denar90/gists{/gist_id}","starred_url":"https://api.github.com/users/denar90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denar90/subscriptions","organizations_url":"https://api.github.com/users/denar90/orgs","repos_url":"https://api.github.com/users/denar90/repos","events_url":"https://api.github.com/users/denar90/events{/privacy}","received_events_url":"https://api.github.com/users/denar90/received_events","type":"User","site_admin":false},"body":"wdyt if we wrap `fs.writeFile` with `micro-promisify` (we already have it as dep) and stick to async/await here?","created_at":"2018-10-14T19:28:55Z","updated_at":"2018-10-14T19:28:55Z","html_url":"https://github.com/paulirish/pwmetrics/pull/195#discussion_r225005522","pull_request_url":"https://api.github.com/repos/paulirish/pwmetrics/pulls/195","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/paulirish/pwmetrics/pulls/comments/225005522"},"html":{"href":"https://github.com/paulirish/pwmetrics/pull/195#discussion_r225005522"},"pull_request":{"href":"https://api.github.com/repos/paulirish/pwmetrics/pulls/195"}}},"pull_request":{"url":"https://api.github.com/repos/paulirish/pwmetrics/pulls/195","id":222591752,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNTkxNzUy","html_url":"https://github.com/paulirish/pwmetrics/pull/195","diff_url":"https://github.com/paulirish/pwmetrics/pull/195.diff","patch_url":"https://github.com/paulirish/pwmetrics/pull/195.patch","issue_url":"https://api.github.com/repos/paulirish/pwmetrics/issues/195","number":195,"state":"open","locked":false,"title":"refactor: outputData as a proper PWMetrics method","user":{"login":"GuillaumeAmat","id":1179174,"node_id":"MDQ6VXNlcjExNzkxNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1179174?v=4","gravatar_id":"","url":"https://api.github.com/users/GuillaumeAmat","html_url":"https://github.com/GuillaumeAmat","followers_url":"https://api.github.com/users/GuillaumeAmat/followers","following_url":"https://api.github.com/users/GuillaumeAmat/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeAmat/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeAmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeAmat/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeAmat/orgs","repos_url":"https://api.github.com/users/GuillaumeAmat/repos","events_url":"https://api.github.com/users/GuillaumeAmat/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeAmat/received_events","type":"User","site_admin":false},"body":"Related to: https://github.com/paulirish/pwmetrics/pull/194#discussion_r224896044","created_at":"2018-10-12T21:31:56Z","updated_at":"2018-10-14T19:28:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"146979bc61f02e2da2f769b7d5e08a4875540b18","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/paulirish/pwmetrics/pulls/195/commits","review_comments_url":"https://api.github.com/repos/paulirish/pwmetrics/pulls/195/comments","review_comment_url":"https://api.github.com/repos/paulirish/pwmetrics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/paulirish/pwmetrics/issues/195/comments","statuses_url":"https://api.github.com/repos/paulirish/pwmetrics/statuses/4a69ab03efeaaf454ccef97a217c61185452831d","head":{"label":"GuillaumeAmat:proper-method-for-output-data","ref":"proper-method-for-output-data","sha":"4a69ab03efeaaf454ccef97a217c61185452831d","user":{"login":"GuillaumeAmat","id":1179174,"node_id":"MDQ6VXNlcjExNzkxNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1179174?v=4","gravatar_id":"","url":"https://api.github.com/users/GuillaumeAmat","html_url":"https://github.com/GuillaumeAmat","followers_url":"https://api.github.com/users/GuillaumeAmat/followers","following_url":"https://api.github.com/users/GuillaumeAmat/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeAmat/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeAmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeAmat/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeAmat/orgs","repos_url":"https://api.github.com/users/GuillaumeAmat/repos","events_url":"https://api.github.com/users/GuillaumeAmat/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeAmat/received_events","type":"User","site_admin":false},"repo":{"id":150093984,"node_id":"MDEwOlJlcG9zaXRvcnkxNTAwOTM5ODQ=","name":"pwmetrics","full_name":"GuillaumeAmat/pwmetrics","private":false,"owner":{"login":"GuillaumeAmat","id":1179174,"node_id":"MDQ6VXNlcjExNzkxNzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1179174?v=4","gravatar_id":"","url":"https://api.github.com/users/GuillaumeAmat","html_url":"https://github.com/GuillaumeAmat","followers_url":"https://api.github.com/users/GuillaumeAmat/followers","following_url":"https://api.github.com/users/GuillaumeAmat/following{/other_user}","gists_url":"https://api.github.com/users/GuillaumeAmat/gists{/gist_id}","starred_url":"https://api.github.com/users/GuillaumeAmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuillaumeAmat/subscriptions","organizations_url":"https://api.github.com/users/GuillaumeAmat/orgs","repos_url":"https://api.github.com/users/GuillaumeAmat/repos","events_url":"https://api.github.com/users/GuillaumeAmat/events{/privacy}","received_events_url":"https://api.github.com/users/GuillaumeAmat/received_events","type":"User","site_admin":false},"html_url":"https://github.com/GuillaumeAmat/pwmetrics","description":"Progressive web metrics at your fingertipz","fork":true,"url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics","forks_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/forks","keys_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/teams","hooks_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/hooks","issue_events_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/issues/events{/number}","events_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/events","assignees_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/assignees{/user}","branches_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/branches{/branch}","tags_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/tags","blobs_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/statuses/{sha}","languages_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/languages","stargazers_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/stargazers","contributors_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/contributors","subscribers_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/subscribers","subscription_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/subscription","commits_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/contents/{+path}","compare_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/merges","archive_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/downloads","issues_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/issues{/number}","pulls_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/pulls{/number}","milestones_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/milestones{/number}","notifications_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/labels{/name}","releases_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/releases{/id}","deployments_url":"https://api.github.com/repos/GuillaumeAmat/pwmetrics/deployments","created_at":"2018-09-24T11:42:23Z","updated_at":"2018-09-24T11:42:25Z","pushed_at":"2018-10-12T21:30:55Z","git_url":"git://github.com/GuillaumeAmat/pwmetrics.git","ssh_url":"git@github.com:GuillaumeAmat/pwmetrics.git","clone_url":"https://github.com/GuillaumeAmat/pwmetrics.git","svn_url":"https://github.com/GuillaumeAmat/pwmetrics","homepage":"","size":547,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"paulirish:master","ref":"master","sha":"624aaae1dc7d9ac69e3a2b466c349bbe145f9814","user":{"login":"paulirish","id":39191,"node_id":"MDQ6VXNlcjM5MTkx","avatar_url":"https://avatars0.githubusercontent.com/u/39191?v=4","gravatar_id":"","url":"https://api.github.com/users/paulirish","html_url":"https://github.com/paulirish","followers_url":"https://api.github.com/users/paulirish/followers","following_url":"https://api.github.com/users/paulirish/following{/other_user}","gists_url":"https://api.github.com/users/paulirish/gists{/gist_id}","starred_url":"https://api.github.com/users/paulirish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulirish/subscriptions","organizations_url":"https://api.github.com/users/paulirish/orgs","repos_url":"https://api.github.com/users/paulirish/repos","events_url":"https://api.github.com/users/paulirish/events{/privacy}","received_events_url":"https://api.github.com/users/paulirish/received_events","type":"User","site_admin":false},"repo":{"id":66429461,"node_id":"MDEwOlJlcG9zaXRvcnk2NjQyOTQ2MQ==","name":"pwmetrics","full_name":"paulirish/pwmetrics","private":false,"owner":{"login":"paulirish","id":39191,"node_id":"MDQ6VXNlcjM5MTkx","avatar_url":"https://avatars0.githubusercontent.com/u/39191?v=4","gravatar_id":"","url":"https://api.github.com/users/paulirish","html_url":"https://github.com/paulirish","followers_url":"https://api.github.com/users/paulirish/followers","following_url":"https://api.github.com/users/paulirish/following{/other_user}","gists_url":"https://api.github.com/users/paulirish/gists{/gist_id}","starred_url":"https://api.github.com/users/paulirish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulirish/subscriptions","organizations_url":"https://api.github.com/users/paulirish/orgs","repos_url":"https://api.github.com/users/paulirish/repos","events_url":"https://api.github.com/users/paulirish/events{/privacy}","received_events_url":"https://api.github.com/users/paulirish/received_events","type":"User","site_admin":false},"html_url":"https://github.com/paulirish/pwmetrics","description":"Progressive web metrics at your fingertipz","fork":false,"url":"https://api.github.com/repos/paulirish/pwmetrics","forks_url":"https://api.github.com/repos/paulirish/pwmetrics/forks","keys_url":"https://api.github.com/repos/paulirish/pwmetrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulirish/pwmetrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulirish/pwmetrics/teams","hooks_url":"https://api.github.com/repos/paulirish/pwmetrics/hooks","issue_events_url":"https://api.github.com/repos/paulirish/pwmetrics/issues/events{/number}","events_url":"https://api.github.com/repos/paulirish/pwmetrics/events","assignees_url":"https://api.github.com/repos/paulirish/pwmetrics/assignees{/user}","branches_url":"https://api.github.com/repos/paulirish/pwmetrics/branches{/branch}","tags_url":"https://api.github.com/repos/paulirish/pwmetrics/tags","blobs_url":"https://api.github.com/repos/paulirish/pwmetrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulirish/pwmetrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulirish/pwmetrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulirish/pwmetrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulirish/pwmetrics/statuses/{sha}","languages_url":"https://api.github.com/repos/paulirish/pwmetrics/languages","stargazers_url":"https://api.github.com/repos/paulirish/pwmetrics/stargazers","contributors_url":"https://api.github.com/repos/paulirish/pwmetrics/contributors","subscribers_url":"https://api.github.com/repos/paulirish/pwmetrics/subscribers","subscription_url":"https://api.github.com/repos/paulirish/pwmetrics/subscription","commits_url":"https://api.github.com/repos/paulirish/pwmetrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulirish/pwmetrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulirish/pwmetrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulirish/pwmetrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulirish/pwmetrics/contents/{+path}","compare_url":"https://api.github.com/repos/paulirish/pwmetrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulirish/pwmetrics/merges","archive_url":"https://api.github.com/repos/paulirish/pwmetrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulirish/pwmetrics/downloads","issues_url":"https://api.github.com/repos/paulirish/pwmetrics/issues{/number}","pulls_url":"https://api.github.com/repos/paulirish/pwmetrics/pulls{/number}","milestones_url":"https://api.github.com/repos/paulirish/pwmetrics/milestones{/number}","notifications_url":"https://api.github.com/repos/paulirish/pwmetrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulirish/pwmetrics/labels{/name}","releases_url":"https://api.github.com/repos/paulirish/pwmetrics/releases{/id}","deployments_url":"https://api.github.com/repos/paulirish/pwmetrics/deployments","created_at":"2016-08-24T04:22:43Z","updated_at":"2018-10-13T16:38:40Z","pushed_at":"2018-10-12T21:31:57Z","git_url":"git://github.com/paulirish/pwmetrics.git","ssh_url":"git@github.com:paulirish/pwmetrics.git","clone_url":"https://github.com/paulirish/pwmetrics.git","svn_url":"https://github.com/paulirish/pwmetrics","homepage":"","size":543,"stargazers_count":973,"watchers_count":973,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":43,"open_issues":11,"watchers":973,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/paulirish/pwmetrics/pulls/195"},"html":{"href":"https://github.com/paulirish/pwmetrics/pull/195"},"issue":{"href":"https://api.github.com/repos/paulirish/pwmetrics/issues/195"},"comments":{"href":"https://api.github.com/repos/paulirish/pwmetrics/issues/195/comments"},"review_comments":{"href":"https://api.github.com/repos/paulirish/pwmetrics/pulls/195/comments"},"review_comment":{"href":"https://api.github.com/repos/paulirish/pwmetrics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/paulirish/pwmetrics/pulls/195/commits"},"statuses":{"href":"https://api.github.com/repos/paulirish/pwmetrics/statuses/4a69ab03efeaaf454ccef97a217c61185452831d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"denar90"}}