{"action":"created","comment":{"url":"https://api.github.com/repos/atom/electron/pulls/comments/49910721","id":49910721,"diff_hunk":"@@ -2,70 +2,62 @@ const app = require('electron').app;\n const EventEmitter = require('events').EventEmitter;\n const url = require('url');\n const squirrelUpdate = require('./squirrel-update-win');\n+const util = require('util');\n \n-var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n-hasProp = {}.hasOwnProperty;\n+function AutoUpdater() {\n+  AutoUpdater.super_.call(this);\n+}\n \n-var AutoUpdater = (function(superClass) {\n-  extend(AutoUpdater, superClass);\n+util.inherits(AutoUpdater, EventEmitter);\n \n-  function AutoUpdater() {\n-    return AutoUpdater.__super__.constructor.apply(this, arguments);\n-  }\n-\n-  AutoUpdater.prototype.quitAndInstall = function() {\n-    squirrelUpdate.processStart();\n-    return app.quit();\n-  };\n+AutoUpdater.prototype.quitAndInstall = function() {\n+  squirrelUpdate.processStart();\n+  return app.quit();\n+};\n \n-  AutoUpdater.prototype.setFeedURL = function(updateURL) {\n-    return this.updateURL = updateURL;\n-  };\n+AutoUpdater.prototype.setFeedURL = function(updateURL) {\n+  return this.updateURL = updateURL;\n+};\n \n-  AutoUpdater.prototype.checkForUpdates = function() {\n-    if (!this.updateURL) {\n-      return this.emitError('Update URL is not set');\n-    }\n-    if (!squirrelUpdate.supported()) {\n-      return this.emitError('Can not find Squirrel');\n-    }\n-    this.emit('checking-for-update');\n-    return squirrelUpdate.download(this.updateURL, (function(_this) {\n-      return function(error, update) {\n+AutoUpdater.prototype.checkForUpdates = function() {\n+  if (!this.updateURL) {\n+    return this.emitError('Update URL is not set');\n+  }\n+  if (!squirrelUpdate.supported()) {\n+    return this.emitError('Can not find Squirrel');\n+  }\n+  this.emit('checking-for-update');\n+  return squirrelUpdate.download(this.updateURL, (function(_this) {\n+    return function(error, update) {\n+      if (error != null) {\n+        return _this.emitError(error);\n+      }\n+      if (update == null) {\n+        return _this.emit('update-not-available');\n+      }\n+      _this.emit('update-available');\n+      return squirrelUpdate.update(_this.updateURL, function(error) {\n+        var date, releaseNotes, version;\n         if (error != null) {\n           return _this.emitError(error);\n         }\n-        if (update == null) {\n-          return _this.emit('update-not-available');\n-        }\n-        _this.emit('update-available');\n-        return squirrelUpdate.update(_this.updateURL, function(error) {\n-          var date, releaseNotes, version;\n-          if (error != null) {\n-            return _this.emitError(error);\n-          }\n-          releaseNotes = update.releaseNotes, version = update.version;\n+        releaseNotes = update.releaseNotes, version = update.version;","path":"atom/browser/api/lib/auto-updater/auto-updater-win.js","position":78,"original_position":78,"commit_id":"caf7cf5582586fae2a202f079c603879bb20188d","original_commit_id":"caf7cf5582586fae2a202f079c603879bb20188d","user":{"login":"etiktin","id":4381579,"avatar_url":"https://avatars.githubusercontent.com/u/4381579?v=3","gravatar_id":"","url":"https://api.github.com/users/etiktin","html_url":"https://github.com/etiktin","followers_url":"https://api.github.com/users/etiktin/followers","following_url":"https://api.github.com/users/etiktin/following{/other_user}","gists_url":"https://api.github.com/users/etiktin/gists{/gist_id}","starred_url":"https://api.github.com/users/etiktin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etiktin/subscriptions","organizations_url":"https://api.github.com/users/etiktin/orgs","repos_url":"https://api.github.com/users/etiktin/repos","events_url":"https://api.github.com/users/etiktin/events{/privacy}","received_events_url":"https://api.github.com/users/etiktin/received_events","type":"User","site_admin":false},"body":"For readability, I would split these assignments into separate lines.","created_at":"2016-01-15T22:04:15Z","updated_at":"2016-01-15T22:04:15Z","html_url":"https://github.com/atom/electron/pull/4121#discussion_r49910721","pull_request_url":"https://api.github.com/repos/atom/electron/pulls/4121","_links":{"self":{"href":"https://api.github.com/repos/atom/electron/pulls/comments/49910721"},"html":{"href":"https://github.com/atom/electron/pull/4121#discussion_r49910721"},"pull_request":{"href":"https://api.github.com/repos/atom/electron/pulls/4121"}}},"pull_request":{"url":"https://api.github.com/repos/atom/electron/pulls/4121","id":56200996,"html_url":"https://github.com/atom/electron/pull/4121","diff_url":"https://github.com/atom/electron/pull/4121.diff","patch_url":"https://github.com/atom/electron/pull/4121.patch","issue_url":"https://api.github.com/repos/atom/electron/issues/4121","number":4121,"state":"open","locked":false,"title":"Format leftover CoffeeScript helpers","user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"body":"- [x] Use `[].includes` instead of `[].indexOf` where appropriate\r\n- [x] Use [util.inherits](https://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor) instead of inlined `extend` helper previously provided by CoffeeScript\r\n- [x] Reformat class definitions to be properly fully outdented\r\n\r\nRefs #4065 \r\n\r\n/cc @jlord @zcbenz :eyes: ","created_at":"2016-01-15T17:59:57Z","updated_at":"2016-01-15T22:04:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c03dea8a1a0497773b0a344c61bd3347a6c0572","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/electron/pulls/4121/commits","review_comments_url":"https://api.github.com/repos/atom/electron/pulls/4121/comments","review_comment_url":"https://api.github.com/repos/atom/electron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/electron/issues/4121/comments","statuses_url":"https://api.github.com/repos/atom/electron/statuses/caf7cf5582586fae2a202f079c603879bb20188d","head":{"label":"atom:format-coffee-helpers","ref":"format-coffee-helpers","sha":"caf7cf5582586fae2a202f079c603879bb20188d","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":9384267,"name":"electron","full_name":"atom/electron","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/electron","description":"Build cross platform desktop apps with web technologies","fork":false,"url":"https://api.github.com/repos/atom/electron","forks_url":"https://api.github.com/repos/atom/electron/forks","keys_url":"https://api.github.com/repos/atom/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/electron/teams","hooks_url":"https://api.github.com/repos/atom/electron/hooks","issue_events_url":"https://api.github.com/repos/atom/electron/issues/events{/number}","events_url":"https://api.github.com/repos/atom/electron/events","assignees_url":"https://api.github.com/repos/atom/electron/assignees{/user}","branches_url":"https://api.github.com/repos/atom/electron/branches{/branch}","tags_url":"https://api.github.com/repos/atom/electron/tags","blobs_url":"https://api.github.com/repos/atom/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/electron/languages","stargazers_url":"https://api.github.com/repos/atom/electron/stargazers","contributors_url":"https://api.github.com/repos/atom/electron/contributors","subscribers_url":"https://api.github.com/repos/atom/electron/subscribers","subscription_url":"https://api.github.com/repos/atom/electron/subscription","commits_url":"https://api.github.com/repos/atom/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/electron/contents/{+path}","compare_url":"https://api.github.com/repos/atom/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/electron/merges","archive_url":"https://api.github.com/repos/atom/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/electron/downloads","issues_url":"https://api.github.com/repos/atom/electron/issues{/number}","pulls_url":"https://api.github.com/repos/atom/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/electron/labels{/name}","releases_url":"https://api.github.com/repos/atom/electron/releases{/id}","created_at":"2013-04-12T01:47:36Z","updated_at":"2016-01-15T21:57:34Z","pushed_at":"2016-01-15T19:46:59Z","git_url":"git://github.com/atom/electron.git","ssh_url":"git@github.com:atom/electron.git","clone_url":"https://github.com/atom/electron.git","svn_url":"https://github.com/atom/electron","homepage":"http://electron.atom.io","size":17073,"stargazers_count":22342,"watchers_count":22342,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2160,"mirror_url":null,"open_issues_count":245,"forks":2160,"open_issues":245,"watchers":22342,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"1b0da44f3803f0ff069f8e8078edf8cb5bd089e3","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":9384267,"name":"electron","full_name":"atom/electron","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/electron","description":"Build cross platform desktop apps with web technologies","fork":false,"url":"https://api.github.com/repos/atom/electron","forks_url":"https://api.github.com/repos/atom/electron/forks","keys_url":"https://api.github.com/repos/atom/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/electron/teams","hooks_url":"https://api.github.com/repos/atom/electron/hooks","issue_events_url":"https://api.github.com/repos/atom/electron/issues/events{/number}","events_url":"https://api.github.com/repos/atom/electron/events","assignees_url":"https://api.github.com/repos/atom/electron/assignees{/user}","branches_url":"https://api.github.com/repos/atom/electron/branches{/branch}","tags_url":"https://api.github.com/repos/atom/electron/tags","blobs_url":"https://api.github.com/repos/atom/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/electron/languages","stargazers_url":"https://api.github.com/repos/atom/electron/stargazers","contributors_url":"https://api.github.com/repos/atom/electron/contributors","subscribers_url":"https://api.github.com/repos/atom/electron/subscribers","subscription_url":"https://api.github.com/repos/atom/electron/subscription","commits_url":"https://api.github.com/repos/atom/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/electron/contents/{+path}","compare_url":"https://api.github.com/repos/atom/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/electron/merges","archive_url":"https://api.github.com/repos/atom/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/electron/downloads","issues_url":"https://api.github.com/repos/atom/electron/issues{/number}","pulls_url":"https://api.github.com/repos/atom/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/electron/labels{/name}","releases_url":"https://api.github.com/repos/atom/electron/releases{/id}","created_at":"2013-04-12T01:47:36Z","updated_at":"2016-01-15T21:57:34Z","pushed_at":"2016-01-15T19:46:59Z","git_url":"git://github.com/atom/electron.git","ssh_url":"git@github.com:atom/electron.git","clone_url":"https://github.com/atom/electron.git","svn_url":"https://github.com/atom/electron","homepage":"http://electron.atom.io","size":17073,"stargazers_count":22342,"watchers_count":22342,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2160,"mirror_url":null,"open_issues_count":245,"forks":2160,"open_issues":245,"watchers":22342,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/electron/pulls/4121"},"html":{"href":"https://github.com/atom/electron/pull/4121"},"issue":{"href":"https://api.github.com/repos/atom/electron/issues/4121"},"comments":{"href":"https://api.github.com/repos/atom/electron/issues/4121/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/electron/pulls/4121/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/electron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/electron/pulls/4121/commits"},"statuses":{"href":"https://api.github.com/repos/atom/electron/statuses/caf7cf5582586fae2a202f079c603879bb20188d"}}}}