{"action":"created","comment":{"url":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/comments/34331254","id":34331254,"diff_hunk":"@@ -0,0 +1,48 @@\n+# contants\n+analyticsWriteKey = 'pDV1EgxAbco4gjPXpJzuOeDyYgtkrmmG'\n+\n+# imports\n+_ = require 'underscore-plus'\n+\n+module.exports =\n+class Tracker\n+\n+  constructor: (@analyticsUserIdConfig) ->\n+    {allowUnsafeEval} = require 'loophole'\n+    @pkg ?= require(\"../package.json\")\n+\n+    # Setup Analytics\n+    Analytics = null\n+    allowUnsafeEval -> Analytics = require 'analytics-node'","path":"lib/tracker.coffee","position":16,"original_position":16,"commit_id":"35eca1aa6e9287cdc3015e92acc941a7d6d2617c","original_commit_id":"35eca1aa6e9287cdc3015e92acc941a7d6d2617c","user":{"login":"groupsky","id":185580,"avatar_url":"https://avatars.githubusercontent.com/u/185580?v=3","gravatar_id":"","url":"https://api.github.com/users/groupsky","html_url":"https://github.com/groupsky","followers_url":"https://api.github.com/users/groupsky/followers","following_url":"https://api.github.com/users/groupsky/following{/other_user}","gists_url":"https://api.github.com/users/groupsky/gists{/gist_id}","starred_url":"https://api.github.com/users/groupsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groupsky/subscriptions","organizations_url":"https://api.github.com/users/groupsky/orgs","repos_url":"https://api.github.com/users/groupsky/repos","events_url":"https://api.github.com/users/groupsky/events{/privacy}","received_events_url":"https://api.github.com/users/groupsky/received_events","type":"User","site_admin":false},"body":"the costly operation is the allowUnsafeEval, so it makes sense to cache the import and call it only once","created_at":"2015-07-10T06:50:54Z","updated_at":"2015-07-10T06:50:54Z","html_url":"https://github.com/Hackafe/atom-sync-settings/pull/89#discussion_r34331254","pull_request_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/comments/34331254"},"html":{"href":"https://github.com/Hackafe/atom-sync-settings/pull/89#discussion_r34331254"},"pull_request":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/89","id":38784279,"html_url":"https://github.com/Hackafe/atom-sync-settings/pull/89","diff_url":"https://github.com/Hackafe/atom-sync-settings/pull/89.diff","patch_url":"https://github.com/Hackafe/atom-sync-settings/pull/89.patch","issue_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/issues/89","number":89,"state":"open","locked":false,"title":"Features/tracking","user":{"login":"groupsky","id":185580,"avatar_url":"https://avatars.githubusercontent.com/u/185580?v=3","gravatar_id":"","url":"https://api.github.com/users/groupsky","html_url":"https://github.com/groupsky","followers_url":"https://api.github.com/users/groupsky/followers","following_url":"https://api.github.com/users/groupsky/following{/other_user}","gists_url":"https://api.github.com/users/groupsky/gists{/gist_id}","starred_url":"https://api.github.com/users/groupsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groupsky/subscriptions","organizations_url":"https://api.github.com/users/groupsky/orgs","repos_url":"https://api.github.com/users/groupsky/repos","events_url":"https://api.github.com/users/groupsky/events{/privacy}","received_events_url":"https://api.github.com/users/groupsky/received_events","type":"User","site_admin":false},"body":"- [x] track package version\r\n- [x] track backup action\r\n- [x] track restore action\r\n- [x] track atom version\r\n\r\n\r\nloophole is used because of [`Unsafe-Eval error`](https://github.com/Glavin001/atom-beautify/commit/fbc58a648d3ccd845548d556f3dd1e046075bf04)\r\nRef #82 ","created_at":"2015-06-29T15:16:11Z","updated_at":"2015-07-10T06:50:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e5777da09b679d508f6c7cd5cf01b5557d6ba04c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/89/commits","review_comments_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/89/comments","review_comment_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/issues/89/comments","statuses_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/statuses/35eca1aa6e9287cdc3015e92acc941a7d6d2617c","head":{"label":"groupsky:features/tracking","ref":"features/tracking","sha":"35eca1aa6e9287cdc3015e92acc941a7d6d2617c","user":{"login":"groupsky","id":185580,"avatar_url":"https://avatars.githubusercontent.com/u/185580?v=3","gravatar_id":"","url":"https://api.github.com/users/groupsky","html_url":"https://github.com/groupsky","followers_url":"https://api.github.com/users/groupsky/followers","following_url":"https://api.github.com/users/groupsky/following{/other_user}","gists_url":"https://api.github.com/users/groupsky/gists{/gist_id}","starred_url":"https://api.github.com/users/groupsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groupsky/subscriptions","organizations_url":"https://api.github.com/users/groupsky/orgs","repos_url":"https://api.github.com/users/groupsky/repos","events_url":"https://api.github.com/users/groupsky/events{/privacy}","received_events_url":"https://api.github.com/users/groupsky/received_events","type":"User","site_admin":false},"repo":{"id":21868601,"name":"atom-sync-settings","full_name":"groupsky/atom-sync-settings","owner":{"login":"groupsky","id":185580,"avatar_url":"https://avatars.githubusercontent.com/u/185580?v=3","gravatar_id":"","url":"https://api.github.com/users/groupsky","html_url":"https://github.com/groupsky","followers_url":"https://api.github.com/users/groupsky/followers","following_url":"https://api.github.com/users/groupsky/following{/other_user}","gists_url":"https://api.github.com/users/groupsky/gists{/gist_id}","starred_url":"https://api.github.com/users/groupsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groupsky/subscriptions","organizations_url":"https://api.github.com/users/groupsky/orgs","repos_url":"https://api.github.com/users/groupsky/repos","events_url":"https://api.github.com/users/groupsky/events{/privacy}","received_events_url":"https://api.github.com/users/groupsky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/groupsky/atom-sync-settings","description":"Synchronize all your settings and packages across atom instances","fork":true,"url":"https://api.github.com/repos/groupsky/atom-sync-settings","forks_url":"https://api.github.com/repos/groupsky/atom-sync-settings/forks","keys_url":"https://api.github.com/repos/groupsky/atom-sync-settings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/groupsky/atom-sync-settings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/groupsky/atom-sync-settings/teams","hooks_url":"https://api.github.com/repos/groupsky/atom-sync-settings/hooks","issue_events_url":"https://api.github.com/repos/groupsky/atom-sync-settings/issues/events{/number}","events_url":"https://api.github.com/repos/groupsky/atom-sync-settings/events","assignees_url":"https://api.github.com/repos/groupsky/atom-sync-settings/assignees{/user}","branches_url":"https://api.github.com/repos/groupsky/atom-sync-settings/branches{/branch}","tags_url":"https://api.github.com/repos/groupsky/atom-sync-settings/tags","blobs_url":"https://api.github.com/repos/groupsky/atom-sync-settings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/groupsky/atom-sync-settings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/groupsky/atom-sync-settings/git/refs{/sha}","trees_url":"https://api.github.com/repos/groupsky/atom-sync-settings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/groupsky/atom-sync-settings/statuses/{sha}","languages_url":"https://api.github.com/repos/groupsky/atom-sync-settings/languages","stargazers_url":"https://api.github.com/repos/groupsky/atom-sync-settings/stargazers","contributors_url":"https://api.github.com/repos/groupsky/atom-sync-settings/contributors","subscribers_url":"https://api.github.com/repos/groupsky/atom-sync-settings/subscribers","subscription_url":"https://api.github.com/repos/groupsky/atom-sync-settings/subscription","commits_url":"https://api.github.com/repos/groupsky/atom-sync-settings/commits{/sha}","git_commits_url":"https://api.github.com/repos/groupsky/atom-sync-settings/git/commits{/sha}","comments_url":"https://api.github.com/repos/groupsky/atom-sync-settings/comments{/number}","issue_comment_url":"https://api.github.com/repos/groupsky/atom-sync-settings/issues/comments{/number}","contents_url":"https://api.github.com/repos/groupsky/atom-sync-settings/contents/{+path}","compare_url":"https://api.github.com/repos/groupsky/atom-sync-settings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/groupsky/atom-sync-settings/merges","archive_url":"https://api.github.com/repos/groupsky/atom-sync-settings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/groupsky/atom-sync-settings/downloads","issues_url":"https://api.github.com/repos/groupsky/atom-sync-settings/issues{/number}","pulls_url":"https://api.github.com/repos/groupsky/atom-sync-settings/pulls{/number}","milestones_url":"https://api.github.com/repos/groupsky/atom-sync-settings/milestones{/number}","notifications_url":"https://api.github.com/repos/groupsky/atom-sync-settings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/groupsky/atom-sync-settings/labels{/name}","releases_url":"https://api.github.com/repos/groupsky/atom-sync-settings/releases{/id}","created_at":"2014-07-15T17:13:44Z","updated_at":"2014-07-15T17:27:46Z","pushed_at":"2015-07-09T07:16:21Z","git_url":"git://github.com/groupsky/atom-sync-settings.git","ssh_url":"git@github.com:groupsky/atom-sync-settings.git","clone_url":"https://github.com/groupsky/atom-sync-settings.git","svn_url":"https://github.com/groupsky/atom-sync-settings","homepage":null,"size":278,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","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":"Hackafe:master","ref":"master","sha":"4c4a911f6b023ad4874034cec6e7a269145152b6","user":{"login":"Hackafe","id":5607437,"avatar_url":"https://avatars.githubusercontent.com/u/5607437?v=3","gravatar_id":"","url":"https://api.github.com/users/Hackafe","html_url":"https://github.com/Hackafe","followers_url":"https://api.github.com/users/Hackafe/followers","following_url":"https://api.github.com/users/Hackafe/following{/other_user}","gists_url":"https://api.github.com/users/Hackafe/gists{/gist_id}","starred_url":"https://api.github.com/users/Hackafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hackafe/subscriptions","organizations_url":"https://api.github.com/users/Hackafe/orgs","repos_url":"https://api.github.com/users/Hackafe/repos","events_url":"https://api.github.com/users/Hackafe/events{/privacy}","received_events_url":"https://api.github.com/users/Hackafe/received_events","type":"Organization","site_admin":false},"repo":{"id":21868533,"name":"atom-sync-settings","full_name":"Hackafe/atom-sync-settings","owner":{"login":"Hackafe","id":5607437,"avatar_url":"https://avatars.githubusercontent.com/u/5607437?v=3","gravatar_id":"","url":"https://api.github.com/users/Hackafe","html_url":"https://github.com/Hackafe","followers_url":"https://api.github.com/users/Hackafe/followers","following_url":"https://api.github.com/users/Hackafe/following{/other_user}","gists_url":"https://api.github.com/users/Hackafe/gists{/gist_id}","starred_url":"https://api.github.com/users/Hackafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hackafe/subscriptions","organizations_url":"https://api.github.com/users/Hackafe/orgs","repos_url":"https://api.github.com/users/Hackafe/repos","events_url":"https://api.github.com/users/Hackafe/events{/privacy}","received_events_url":"https://api.github.com/users/Hackafe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Hackafe/atom-sync-settings","description":"Synchronize all your settings and packages across atom instances","fork":false,"url":"https://api.github.com/repos/Hackafe/atom-sync-settings","forks_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/forks","keys_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/teams","hooks_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/hooks","issue_events_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/issues/events{/number}","events_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/events","assignees_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/assignees{/user}","branches_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/branches{/branch}","tags_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/tags","blobs_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/statuses/{sha}","languages_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/languages","stargazers_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/stargazers","contributors_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/contributors","subscribers_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/subscribers","subscription_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/subscription","commits_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/contents/{+path}","compare_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/merges","archive_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/downloads","issues_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/issues{/number}","pulls_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls{/number}","milestones_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/milestones{/number}","notifications_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/labels{/name}","releases_url":"https://api.github.com/repos/Hackafe/atom-sync-settings/releases{/id}","created_at":"2014-07-15T17:11:24Z","updated_at":"2015-07-10T04:34:50Z","pushed_at":"2015-07-09T07:16:21Z","git_url":"git://github.com/Hackafe/atom-sync-settings.git","ssh_url":"git@github.com:Hackafe/atom-sync-settings.git","clone_url":"https://github.com/Hackafe/atom-sync-settings.git","svn_url":"https://github.com/Hackafe/atom-sync-settings","homepage":"https://atom.io/packages/sync-settings","size":792,"stargazers_count":143,"watchers_count":143,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":21,"forks":20,"open_issues":21,"watchers":143,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/89"},"html":{"href":"https://github.com/Hackafe/atom-sync-settings/pull/89"},"issue":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/issues/89"},"comments":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/Hackafe/atom-sync-settings/statuses/35eca1aa6e9287cdc3015e92acc941a7d6d2617c"}}}}