{"action":"created","comment":{"url":"https://api.github.com/repos/datproject/dat-desktop/pulls/comments/89050075","pull_request_review_id":9601141,"id":89050075,"diff_hunk":"@@ -1,60 +1,29 @@\n-const {app, BrowserWindow, ipcMain, Menu, shell} = require('electron')\n const defaultMenu = require('electron-default-menu')\n+const window = require('electron-window')\n+const electron = require('electron')\n+const Env = require('envobj')\n+const path = require('path')\n \n-const env = process.env.NODE_ENV\n+const delegateEvents = require('./lib/delegate-electron-events')\n \n-let win, file, link\n+const shell = electron.shell\n+const Menu = electron.Menu\n+const app = electron.app","path":"index.js","position":14,"original_position":14,"commit_id":"de64f9439b9cb7815ed7c406bbb54f4b0f8eeafb","original_commit_id":"de64f9439b9cb7815ed7c406bbb54f4b0f8eeafb","user":{"login":"clkao","id":69736,"avatar_url":"https://avatars.githubusercontent.com/u/69736?v=3","gravatar_id":"","url":"https://api.github.com/users/clkao","html_url":"https://github.com/clkao","followers_url":"https://api.github.com/users/clkao/followers","following_url":"https://api.github.com/users/clkao/following{/other_user}","gists_url":"https://api.github.com/users/clkao/gists{/gist_id}","starred_url":"https://api.github.com/users/clkao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clkao/subscriptions","organizations_url":"https://api.github.com/users/clkao/orgs","repos_url":"https://api.github.com/users/clkao/repos","events_url":"https://api.github.com/users/clkao/events{/privacy}","received_events_url":"https://api.github.com/users/clkao/received_events","type":"User","site_admin":false},"body":"I think the standard style guide doesn't cover destructuring.  I think one level for same-name destructuring is fine in general.\r\n\r\nHint: to work out the nested one, just image you are flipping the LHS and RHS, so it's like grabbing `inputClass = manager.options.inputClass`.  Though expressive, this is far too much mental exercise that reduces readability","created_at":"2016-11-22T06:32:32Z","updated_at":"2016-11-22T06:32:32Z","html_url":"https://github.com/datproject/dat-desktop/pull/88#discussion_r89050075","pull_request_url":"https://api.github.com/repos/datproject/dat-desktop/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/datproject/dat-desktop/pulls/comments/89050075"},"html":{"href":"https://github.com/datproject/dat-desktop/pull/88#discussion_r89050075"},"pull_request":{"href":"https://api.github.com/repos/datproject/dat-desktop/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/datproject/dat-desktop/pulls/88","id":94616574,"html_url":"https://github.com/datproject/dat-desktop/pull/88","diff_url":"https://github.com/datproject/dat-desktop/pull/88.diff","patch_url":"https://github.com/datproject/dat-desktop/pull/88.patch","issue_url":"https://api.github.com/repos/datproject/dat-desktop/issues/88","number":88,"state":"open","locked":false,"title":"feat(index): use electron-window","user":{"login":"yoshuawuyts","id":2467194,"avatar_url":"https://avatars.githubusercontent.com/u/2467194?v=3","gravatar_id":"","url":"https://api.github.com/users/yoshuawuyts","html_url":"https://github.com/yoshuawuyts","followers_url":"https://api.github.com/users/yoshuawuyts/followers","following_url":"https://api.github.com/users/yoshuawuyts/following{/other_user}","gists_url":"https://api.github.com/users/yoshuawuyts/gists{/gist_id}","starred_url":"https://api.github.com/users/yoshuawuyts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoshuawuyts/subscriptions","organizations_url":"https://api.github.com/users/yoshuawuyts/orgs","repos_url":"https://api.github.com/users/yoshuawuyts/repos","events_url":"https://api.github.com/users/yoshuawuyts/events{/privacy}","received_events_url":"https://api.github.com/users/yoshuawuyts/received_events","type":"User","site_admin":false},"body":"Lil maintenance patch to clean up `index.js` - gives us some room to add more features. Think this is cool because it turns the entry file for electron into something that weighs 30 lines of code that's easy to follow :sparkles:\r\n\r\n## Changes\r\n- use `envobj` to validate environment variables\r\n- create `lib/delegate-electron-events` to wrap boilerplate in `index.js`, needed to safely delegate file and link events sent to electron while booting (should turn into a package at some point probably)\r\n- use `electron-window` to remove some of the browser boot boilerplate","created_at":"2016-11-21T13:38:52Z","updated_at":"2016-11-22T06:32:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a973229d738a7571f3023f8b54ceb4983f3ce1d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/datproject/dat-desktop/pulls/88/commits","review_comments_url":"https://api.github.com/repos/datproject/dat-desktop/pulls/88/comments","review_comment_url":"https://api.github.com/repos/datproject/dat-desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datproject/dat-desktop/issues/88/comments","statuses_url":"https://api.github.com/repos/datproject/dat-desktop/statuses/de64f9439b9cb7815ed7c406bbb54f4b0f8eeafb","head":{"label":"datproject:libify-boot","ref":"libify-boot","sha":"de64f9439b9cb7815ed7c406bbb54f4b0f8eeafb","user":{"login":"datproject","id":7143718,"avatar_url":"https://avatars.githubusercontent.com/u/7143718?v=3","gravatar_id":"","url":"https://api.github.com/users/datproject","html_url":"https://github.com/datproject","followers_url":"https://api.github.com/users/datproject/followers","following_url":"https://api.github.com/users/datproject/following{/other_user}","gists_url":"https://api.github.com/users/datproject/gists{/gist_id}","starred_url":"https://api.github.com/users/datproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datproject/subscriptions","organizations_url":"https://api.github.com/users/datproject/orgs","repos_url":"https://api.github.com/users/datproject/repos","events_url":"https://api.github.com/users/datproject/events{/privacy}","received_events_url":"https://api.github.com/users/datproject/received_events","type":"Organization","site_admin":false},"repo":{"id":59699743,"name":"dat-desktop","full_name":"datproject/dat-desktop","owner":{"login":"datproject","id":7143718,"avatar_url":"https://avatars.githubusercontent.com/u/7143718?v=3","gravatar_id":"","url":"https://api.github.com/users/datproject","html_url":"https://github.com/datproject","followers_url":"https://api.github.com/users/datproject/followers","following_url":"https://api.github.com/users/datproject/following{/other_user}","gists_url":"https://api.github.com/users/datproject/gists{/gist_id}","starred_url":"https://api.github.com/users/datproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datproject/subscriptions","organizations_url":"https://api.github.com/users/datproject/orgs","repos_url":"https://api.github.com/users/datproject/repos","events_url":"https://api.github.com/users/datproject/events{/privacy}","received_events_url":"https://api.github.com/users/datproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datproject/dat-desktop","description":"Desktop app for dat","fork":false,"url":"https://api.github.com/repos/datproject/dat-desktop","forks_url":"https://api.github.com/repos/datproject/dat-desktop/forks","keys_url":"https://api.github.com/repos/datproject/dat-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datproject/dat-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datproject/dat-desktop/teams","hooks_url":"https://api.github.com/repos/datproject/dat-desktop/hooks","issue_events_url":"https://api.github.com/repos/datproject/dat-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/datproject/dat-desktop/events","assignees_url":"https://api.github.com/repos/datproject/dat-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/datproject/dat-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/datproject/dat-desktop/tags","blobs_url":"https://api.github.com/repos/datproject/dat-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datproject/dat-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datproject/dat-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/datproject/dat-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datproject/dat-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/datproject/dat-desktop/languages","stargazers_url":"https://api.github.com/repos/datproject/dat-desktop/stargazers","contributors_url":"https://api.github.com/repos/datproject/dat-desktop/contributors","subscribers_url":"https://api.github.com/repos/datproject/dat-desktop/subscribers","subscription_url":"https://api.github.com/repos/datproject/dat-desktop/subscription","commits_url":"https://api.github.com/repos/datproject/dat-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/datproject/dat-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/datproject/dat-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/datproject/dat-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/datproject/dat-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/datproject/dat-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datproject/dat-desktop/merges","archive_url":"https://api.github.com/repos/datproject/dat-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datproject/dat-desktop/downloads","issues_url":"https://api.github.com/repos/datproject/dat-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/datproject/dat-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/datproject/dat-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/datproject/dat-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datproject/dat-desktop/labels{/name}","releases_url":"https://api.github.com/repos/datproject/dat-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/datproject/dat-desktop/deployments","created_at":"2016-05-25T21:42:53Z","updated_at":"2016-11-21T17:16:10Z","pushed_at":"2016-11-22T03:03:57Z","git_url":"git://github.com/datproject/dat-desktop.git","ssh_url":"git@github.com:datproject/dat-desktop.git","clone_url":"https://github.com/datproject/dat-desktop.git","svn_url":"https://github.com/datproject/dat-desktop","homepage":"http://datproject.org","size":712,"stargazers_count":66,"watchers_count":66,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":24,"forks":6,"open_issues":24,"watchers":66,"default_branch":"master"}},"base":{"label":"datproject:master","ref":"master","sha":"37421c5de8e6063c70cc5089ea1d569805a183fa","user":{"login":"datproject","id":7143718,"avatar_url":"https://avatars.githubusercontent.com/u/7143718?v=3","gravatar_id":"","url":"https://api.github.com/users/datproject","html_url":"https://github.com/datproject","followers_url":"https://api.github.com/users/datproject/followers","following_url":"https://api.github.com/users/datproject/following{/other_user}","gists_url":"https://api.github.com/users/datproject/gists{/gist_id}","starred_url":"https://api.github.com/users/datproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datproject/subscriptions","organizations_url":"https://api.github.com/users/datproject/orgs","repos_url":"https://api.github.com/users/datproject/repos","events_url":"https://api.github.com/users/datproject/events{/privacy}","received_events_url":"https://api.github.com/users/datproject/received_events","type":"Organization","site_admin":false},"repo":{"id":59699743,"name":"dat-desktop","full_name":"datproject/dat-desktop","owner":{"login":"datproject","id":7143718,"avatar_url":"https://avatars.githubusercontent.com/u/7143718?v=3","gravatar_id":"","url":"https://api.github.com/users/datproject","html_url":"https://github.com/datproject","followers_url":"https://api.github.com/users/datproject/followers","following_url":"https://api.github.com/users/datproject/following{/other_user}","gists_url":"https://api.github.com/users/datproject/gists{/gist_id}","starred_url":"https://api.github.com/users/datproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datproject/subscriptions","organizations_url":"https://api.github.com/users/datproject/orgs","repos_url":"https://api.github.com/users/datproject/repos","events_url":"https://api.github.com/users/datproject/events{/privacy}","received_events_url":"https://api.github.com/users/datproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datproject/dat-desktop","description":"Desktop app for dat","fork":false,"url":"https://api.github.com/repos/datproject/dat-desktop","forks_url":"https://api.github.com/repos/datproject/dat-desktop/forks","keys_url":"https://api.github.com/repos/datproject/dat-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datproject/dat-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datproject/dat-desktop/teams","hooks_url":"https://api.github.com/repos/datproject/dat-desktop/hooks","issue_events_url":"https://api.github.com/repos/datproject/dat-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/datproject/dat-desktop/events","assignees_url":"https://api.github.com/repos/datproject/dat-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/datproject/dat-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/datproject/dat-desktop/tags","blobs_url":"https://api.github.com/repos/datproject/dat-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datproject/dat-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datproject/dat-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/datproject/dat-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datproject/dat-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/datproject/dat-desktop/languages","stargazers_url":"https://api.github.com/repos/datproject/dat-desktop/stargazers","contributors_url":"https://api.github.com/repos/datproject/dat-desktop/contributors","subscribers_url":"https://api.github.com/repos/datproject/dat-desktop/subscribers","subscription_url":"https://api.github.com/repos/datproject/dat-desktop/subscription","commits_url":"https://api.github.com/repos/datproject/dat-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/datproject/dat-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/datproject/dat-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/datproject/dat-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/datproject/dat-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/datproject/dat-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datproject/dat-desktop/merges","archive_url":"https://api.github.com/repos/datproject/dat-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datproject/dat-desktop/downloads","issues_url":"https://api.github.com/repos/datproject/dat-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/datproject/dat-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/datproject/dat-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/datproject/dat-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datproject/dat-desktop/labels{/name}","releases_url":"https://api.github.com/repos/datproject/dat-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/datproject/dat-desktop/deployments","created_at":"2016-05-25T21:42:53Z","updated_at":"2016-11-21T17:16:10Z","pushed_at":"2016-11-22T03:03:57Z","git_url":"git://github.com/datproject/dat-desktop.git","ssh_url":"git@github.com:datproject/dat-desktop.git","clone_url":"https://github.com/datproject/dat-desktop.git","svn_url":"https://github.com/datproject/dat-desktop","homepage":"http://datproject.org","size":712,"stargazers_count":66,"watchers_count":66,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":24,"forks":6,"open_issues":24,"watchers":66,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datproject/dat-desktop/pulls/88"},"html":{"href":"https://github.com/datproject/dat-desktop/pull/88"},"issue":{"href":"https://api.github.com/repos/datproject/dat-desktop/issues/88"},"comments":{"href":"https://api.github.com/repos/datproject/dat-desktop/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/datproject/dat-desktop/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/datproject/dat-desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datproject/dat-desktop/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/datproject/dat-desktop/statuses/de64f9439b9cb7815ed7c406bbb54f4b0f8eeafb"}}}}
{"actor":{"display_login":"clkao"}}