{"action":"created","comment":{"url":"https://api.github.com/repos/Rezonans/xellar-door/pulls/comments/30749171","id":30749171,"diff_hunk":"@@ -0,0 +1,25 @@\n+'use strict';","path":"frontend/services/current-user.js","position":1,"original_position":1,"commit_id":"5c062441dc828f3c572db8c0cea7cc256ae6ead4","original_commit_id":"5c062441dc828f3c572db8c0cea7cc256ae6ead4","user":{"login":"Blaze34","id":3072720,"avatar_url":"https://avatars.githubusercontent.com/u/3072720?v=3","gravatar_id":"","url":"https://api.github.com/users/Blaze34","html_url":"https://github.com/Blaze34","followers_url":"https://api.github.com/users/Blaze34/followers","following_url":"https://api.github.com/users/Blaze34/following{/other_user}","gists_url":"https://api.github.com/users/Blaze34/gists{/gist_id}","starred_url":"https://api.github.com/users/Blaze34/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Blaze34/subscriptions","organizations_url":"https://api.github.com/users/Blaze34/orgs","repos_url":"https://api.github.com/users/Blaze34/repos","events_url":"https://api.github.com/users/Blaze34/events{/privacy}","received_events_url":"https://api.github.com/users/Blaze34/received_events","type":"User","site_admin":false},"body":"```\r\nangular.module('app')\r\n  .factory('CurrentUser', function($auth, Restangular) {\r\n    var promise;\r\n\r\n    return {\r\n      get: function() {\r\n        return promise || load();\r\n      },\r\n      reload: function() {\r\n        return load();\r\n      },\r\n      reset: function() {\r\n        promise = undefined;\r\n      },\r\n      id: function() {\r\n        return userId();\r\n      }\r\n    };\r\n\r\n    function load() {\r\n      return (promise = Restangular.one('users', userId()).get());\r\n    }\r\n\r\n    function userId() {\r\n      return _.result($auth.getPayload().user, 'id');\r\n    }\r\n  });\r\n```","created_at":"2015-05-20T21:04:05Z","updated_at":"2015-05-20T21:04:05Z","html_url":"https://github.com/Rezonans/xellar-door/pull/6#discussion_r30749171","pull_request_url":"https://api.github.com/repos/Rezonans/xellar-door/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/Rezonans/xellar-door/pulls/comments/30749171"},"html":{"href":"https://github.com/Rezonans/xellar-door/pull/6#discussion_r30749171"},"pull_request":{"href":"https://api.github.com/repos/Rezonans/xellar-door/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Rezonans/xellar-door/pulls/6","id":35619831,"html_url":"https://github.com/Rezonans/xellar-door/pull/6","diff_url":"https://github.com/Rezonans/xellar-door/pull/6.diff","patch_url":"https://github.com/Rezonans/xellar-door/pull/6.patch","issue_url":"https://api.github.com/repos/Rezonans/xellar-door/issues/6","number":6,"state":"open","locked":false,"title":"SignIn","user":{"login":"thykos","id":9087701,"avatar_url":"https://avatars.githubusercontent.com/u/9087701?v=3","gravatar_id":"","url":"https://api.github.com/users/thykos","html_url":"https://github.com/thykos","followers_url":"https://api.github.com/users/thykos/followers","following_url":"https://api.github.com/users/thykos/following{/other_user}","gists_url":"https://api.github.com/users/thykos/gists{/gist_id}","starred_url":"https://api.github.com/users/thykos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thykos/subscriptions","organizations_url":"https://api.github.com/users/thykos/orgs","repos_url":"https://api.github.com/users/thykos/repos","events_url":"https://api.github.com/users/thykos/events{/privacy}","received_events_url":"https://api.github.com/users/thykos/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-18T10:21:54Z","updated_at":"2015-05-20T21:04:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f4201270f1cd360a449b99ce40f93bb3f786291","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Rezonans/xellar-door/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Rezonans/xellar-door/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Rezonans/xellar-door/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Rezonans/xellar-door/issues/6/comments","statuses_url":"https://api.github.com/repos/Rezonans/xellar-door/statuses/5c062441dc828f3c572db8c0cea7cc256ae6ead4","head":{"label":"Rezonans:auth-page","ref":"auth-page","sha":"5c062441dc828f3c572db8c0cea7cc256ae6ead4","user":{"login":"Rezonans","id":1716664,"avatar_url":"https://avatars.githubusercontent.com/u/1716664?v=3","gravatar_id":"","url":"https://api.github.com/users/Rezonans","html_url":"https://github.com/Rezonans","followers_url":"https://api.github.com/users/Rezonans/followers","following_url":"https://api.github.com/users/Rezonans/following{/other_user}","gists_url":"https://api.github.com/users/Rezonans/gists{/gist_id}","starred_url":"https://api.github.com/users/Rezonans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rezonans/subscriptions","organizations_url":"https://api.github.com/users/Rezonans/orgs","repos_url":"https://api.github.com/users/Rezonans/repos","events_url":"https://api.github.com/users/Rezonans/events{/privacy}","received_events_url":"https://api.github.com/users/Rezonans/received_events","type":"Organization","site_admin":false},"repo":{"id":35479557,"name":"xellar-door","full_name":"Rezonans/xellar-door","owner":{"login":"Rezonans","id":1716664,"avatar_url":"https://avatars.githubusercontent.com/u/1716664?v=3","gravatar_id":"","url":"https://api.github.com/users/Rezonans","html_url":"https://github.com/Rezonans","followers_url":"https://api.github.com/users/Rezonans/followers","following_url":"https://api.github.com/users/Rezonans/following{/other_user}","gists_url":"https://api.github.com/users/Rezonans/gists{/gist_id}","starred_url":"https://api.github.com/users/Rezonans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rezonans/subscriptions","organizations_url":"https://api.github.com/users/Rezonans/orgs","repos_url":"https://api.github.com/users/Rezonans/repos","events_url":"https://api.github.com/users/Rezonans/events{/privacy}","received_events_url":"https://api.github.com/users/Rezonans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Rezonans/xellar-door","description":"","fork":false,"url":"https://api.github.com/repos/Rezonans/xellar-door","forks_url":"https://api.github.com/repos/Rezonans/xellar-door/forks","keys_url":"https://api.github.com/repos/Rezonans/xellar-door/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rezonans/xellar-door/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rezonans/xellar-door/teams","hooks_url":"https://api.github.com/repos/Rezonans/xellar-door/hooks","issue_events_url":"https://api.github.com/repos/Rezonans/xellar-door/issues/events{/number}","events_url":"https://api.github.com/repos/Rezonans/xellar-door/events","assignees_url":"https://api.github.com/repos/Rezonans/xellar-door/assignees{/user}","branches_url":"https://api.github.com/repos/Rezonans/xellar-door/branches{/branch}","tags_url":"https://api.github.com/repos/Rezonans/xellar-door/tags","blobs_url":"https://api.github.com/repos/Rezonans/xellar-door/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rezonans/xellar-door/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rezonans/xellar-door/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rezonans/xellar-door/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rezonans/xellar-door/statuses/{sha}","languages_url":"https://api.github.com/repos/Rezonans/xellar-door/languages","stargazers_url":"https://api.github.com/repos/Rezonans/xellar-door/stargazers","contributors_url":"https://api.github.com/repos/Rezonans/xellar-door/contributors","subscribers_url":"https://api.github.com/repos/Rezonans/xellar-door/subscribers","subscription_url":"https://api.github.com/repos/Rezonans/xellar-door/subscription","commits_url":"https://api.github.com/repos/Rezonans/xellar-door/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rezonans/xellar-door/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rezonans/xellar-door/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rezonans/xellar-door/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rezonans/xellar-door/contents/{+path}","compare_url":"https://api.github.com/repos/Rezonans/xellar-door/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rezonans/xellar-door/merges","archive_url":"https://api.github.com/repos/Rezonans/xellar-door/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rezonans/xellar-door/downloads","issues_url":"https://api.github.com/repos/Rezonans/xellar-door/issues{/number}","pulls_url":"https://api.github.com/repos/Rezonans/xellar-door/pulls{/number}","milestones_url":"https://api.github.com/repos/Rezonans/xellar-door/milestones{/number}","notifications_url":"https://api.github.com/repos/Rezonans/xellar-door/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rezonans/xellar-door/labels{/name}","releases_url":"https://api.github.com/repos/Rezonans/xellar-door/releases{/id}","created_at":"2015-05-12T09:37:50Z","updated_at":"2015-05-15T09:55:23Z","pushed_at":"2015-05-20T18:10:36Z","git_url":"git://github.com/Rezonans/xellar-door.git","ssh_url":"git@github.com:Rezonans/xellar-door.git","clone_url":"https://github.com/Rezonans/xellar-door.git","svn_url":"https://github.com/Rezonans/xellar-door","homepage":null,"size":648,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"develop"}},"base":{"label":"Rezonans:develop","ref":"develop","sha":"b144df94f9b11f73cdd1bf94cc9a9a272e25bc88","user":{"login":"Rezonans","id":1716664,"avatar_url":"https://avatars.githubusercontent.com/u/1716664?v=3","gravatar_id":"","url":"https://api.github.com/users/Rezonans","html_url":"https://github.com/Rezonans","followers_url":"https://api.github.com/users/Rezonans/followers","following_url":"https://api.github.com/users/Rezonans/following{/other_user}","gists_url":"https://api.github.com/users/Rezonans/gists{/gist_id}","starred_url":"https://api.github.com/users/Rezonans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rezonans/subscriptions","organizations_url":"https://api.github.com/users/Rezonans/orgs","repos_url":"https://api.github.com/users/Rezonans/repos","events_url":"https://api.github.com/users/Rezonans/events{/privacy}","received_events_url":"https://api.github.com/users/Rezonans/received_events","type":"Organization","site_admin":false},"repo":{"id":35479557,"name":"xellar-door","full_name":"Rezonans/xellar-door","owner":{"login":"Rezonans","id":1716664,"avatar_url":"https://avatars.githubusercontent.com/u/1716664?v=3","gravatar_id":"","url":"https://api.github.com/users/Rezonans","html_url":"https://github.com/Rezonans","followers_url":"https://api.github.com/users/Rezonans/followers","following_url":"https://api.github.com/users/Rezonans/following{/other_user}","gists_url":"https://api.github.com/users/Rezonans/gists{/gist_id}","starred_url":"https://api.github.com/users/Rezonans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rezonans/subscriptions","organizations_url":"https://api.github.com/users/Rezonans/orgs","repos_url":"https://api.github.com/users/Rezonans/repos","events_url":"https://api.github.com/users/Rezonans/events{/privacy}","received_events_url":"https://api.github.com/users/Rezonans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Rezonans/xellar-door","description":"","fork":false,"url":"https://api.github.com/repos/Rezonans/xellar-door","forks_url":"https://api.github.com/repos/Rezonans/xellar-door/forks","keys_url":"https://api.github.com/repos/Rezonans/xellar-door/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rezonans/xellar-door/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rezonans/xellar-door/teams","hooks_url":"https://api.github.com/repos/Rezonans/xellar-door/hooks","issue_events_url":"https://api.github.com/repos/Rezonans/xellar-door/issues/events{/number}","events_url":"https://api.github.com/repos/Rezonans/xellar-door/events","assignees_url":"https://api.github.com/repos/Rezonans/xellar-door/assignees{/user}","branches_url":"https://api.github.com/repos/Rezonans/xellar-door/branches{/branch}","tags_url":"https://api.github.com/repos/Rezonans/xellar-door/tags","blobs_url":"https://api.github.com/repos/Rezonans/xellar-door/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rezonans/xellar-door/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rezonans/xellar-door/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rezonans/xellar-door/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rezonans/xellar-door/statuses/{sha}","languages_url":"https://api.github.com/repos/Rezonans/xellar-door/languages","stargazers_url":"https://api.github.com/repos/Rezonans/xellar-door/stargazers","contributors_url":"https://api.github.com/repos/Rezonans/xellar-door/contributors","subscribers_url":"https://api.github.com/repos/Rezonans/xellar-door/subscribers","subscription_url":"https://api.github.com/repos/Rezonans/xellar-door/subscription","commits_url":"https://api.github.com/repos/Rezonans/xellar-door/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rezonans/xellar-door/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rezonans/xellar-door/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rezonans/xellar-door/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rezonans/xellar-door/contents/{+path}","compare_url":"https://api.github.com/repos/Rezonans/xellar-door/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rezonans/xellar-door/merges","archive_url":"https://api.github.com/repos/Rezonans/xellar-door/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rezonans/xellar-door/downloads","issues_url":"https://api.github.com/repos/Rezonans/xellar-door/issues{/number}","pulls_url":"https://api.github.com/repos/Rezonans/xellar-door/pulls{/number}","milestones_url":"https://api.github.com/repos/Rezonans/xellar-door/milestones{/number}","notifications_url":"https://api.github.com/repos/Rezonans/xellar-door/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rezonans/xellar-door/labels{/name}","releases_url":"https://api.github.com/repos/Rezonans/xellar-door/releases{/id}","created_at":"2015-05-12T09:37:50Z","updated_at":"2015-05-15T09:55:23Z","pushed_at":"2015-05-20T18:10:36Z","git_url":"git://github.com/Rezonans/xellar-door.git","ssh_url":"git@github.com:Rezonans/xellar-door.git","clone_url":"https://github.com/Rezonans/xellar-door.git","svn_url":"https://github.com/Rezonans/xellar-door","homepage":null,"size":648,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Rezonans/xellar-door/pulls/6"},"html":{"href":"https://github.com/Rezonans/xellar-door/pull/6"},"issue":{"href":"https://api.github.com/repos/Rezonans/xellar-door/issues/6"},"comments":{"href":"https://api.github.com/repos/Rezonans/xellar-door/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Rezonans/xellar-door/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Rezonans/xellar-door/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Rezonans/xellar-door/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Rezonans/xellar-door/statuses/5c062441dc828f3c572db8c0cea7cc256ae6ead4"}}}}