{"action":"closed","number":3014,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback/pulls/3014","id":97299940,"html_url":"https://github.com/strongloop/loopback/pull/3014","diff_url":"https://github.com/strongloop/loopback/pull/3014.diff","patch_url":"https://github.com/strongloop/loopback/pull/3014.patch","issue_url":"https://api.github.com/repos/strongloop/loopback/issues/3014","number":3014,"state":"closed","locked":false,"title":"Fix registration of operation hooks in User model","user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"body":"Operation hooks are inherited by subclassed models, therefore they must be registered outside of `Model.setup()` function.\r\n\r\nThis commit fixes this problem in the built-in User model.\r\n\r\nThere are not tests verifying this change, as writing a test would be\r\ntoo cumbersome and not worth the cost IMO.\r\n\r\nRelated: #2665 \r\n\r\ncc @loay ","created_at":"2016-12-09T12:18:32Z","updated_at":"2016-12-09T13:09:13Z","closed_at":"2016-12-09T13:09:13Z","merged_at":"2016-12-09T13:09:13Z","merge_commit_sha":"57a053bbf213e4b1166b03fef9d05579197c924b","assignee":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"assignees":[{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback/pulls/3014/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback/pulls/3014/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strongloop/loopback/issues/3014/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback/statuses/4edce47b24a4d819a347d9343bd83c2eaadcda34","head":{"label":"strongloop:fix/repeated-user-hooks","ref":"fix/repeated-user-hooks","sha":"4edce47b24a4d819a347d9343bd83c2eaadcda34","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":9325315,"name":"loopback","full_name":"strongloop/loopback","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback","description":"LoopBack is an open source Node.js framework built on top of Express optimized for building APIs for mobile, web, and other devices. Connect to multiple data sources, write business logic in Node.js, glue on top of your existing services and data, connect using JS, iOS & Android SDKs.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback","forks_url":"https://api.github.com/repos/strongloop/loopback/forks","keys_url":"https://api.github.com/repos/strongloop/loopback/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback/events","assignees_url":"https://api.github.com/repos/strongloop/loopback/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback/merges","archive_url":"https://api.github.com/repos/strongloop/loopback/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback/deployments","created_at":"2013-04-09T16:02:18Z","updated_at":"2016-12-09T12:03:11Z","pushed_at":"2016-12-09T13:09:13Z","git_url":"git://github.com/strongloop/loopback.git","ssh_url":"git@github.com:strongloop/loopback.git","clone_url":"https://github.com/strongloop/loopback.git","svn_url":"https://github.com/strongloop/loopback","homepage":"http://loopback.io","size":10493,"stargazers_count":7878,"watchers_count":7878,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":750,"mirror_url":null,"open_issues_count":496,"forks":750,"open_issues":496,"watchers":7878,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"63beaa21fe270d6dc2f0fa5d6cf17d13048a3065","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":9325315,"name":"loopback","full_name":"strongloop/loopback","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback","description":"LoopBack is an open source Node.js framework built on top of Express optimized for building APIs for mobile, web, and other devices. Connect to multiple data sources, write business logic in Node.js, glue on top of your existing services and data, connect using JS, iOS & Android SDKs.","fork":false,"url":"https://api.github.com/repos/strongloop/loopback","forks_url":"https://api.github.com/repos/strongloop/loopback/forks","keys_url":"https://api.github.com/repos/strongloop/loopback/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback/events","assignees_url":"https://api.github.com/repos/strongloop/loopback/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback/issues/comments{/number}","contents_url":"https://api.github.com/repos/strongloop/loopback/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback/merges","archive_url":"https://api.github.com/repos/strongloop/loopback/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback/releases{/id}","deployments_url":"https://api.github.com/repos/strongloop/loopback/deployments","created_at":"2013-04-09T16:02:18Z","updated_at":"2016-12-09T12:03:11Z","pushed_at":"2016-12-09T13:09:13Z","git_url":"git://github.com/strongloop/loopback.git","ssh_url":"git@github.com:strongloop/loopback.git","clone_url":"https://github.com/strongloop/loopback.git","svn_url":"https://github.com/strongloop/loopback","homepage":"http://loopback.io","size":10493,"stargazers_count":7878,"watchers_count":7878,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":750,"mirror_url":null,"open_issues_count":496,"forks":750,"open_issues":496,"watchers":7878,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback/pulls/3014"},"html":{"href":"https://github.com/strongloop/loopback/pull/3014"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback/issues/3014"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback/issues/3014/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback/pulls/3014/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback/pulls/3014/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback/statuses/4edce47b24a4d819a347d9343bd83c2eaadcda34"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":1,"additions":48,"deletions":43,"changed_files":1}}
{"actor":{"display_login":"bajtos"}}