{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/39024098","id":39024098,"diff_hunk":"@@ -159,7 +159,7 @@ def hg_class_ids\n   end\n \n   def host_class_ids\n-    is_a?(Host::Base) ? host_classes.pluck(:puppetclass_id) : []\n+    (is_a?(Host::Base) ? host_classes : hostgroup_classes).map(&:puppetclass_id)","path":"app/models/concerns/host_common.rb","position":5,"original_position":5,"commit_id":"875815f727047686b2e709adc67b8b48534de1ac","original_commit_id":"875815f727047686b2e709adc67b8b48534de1ac","user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"body":"To avoid repeating the .map call.","created_at":"2015-09-09T09:42:06Z","updated_at":"2015-09-09T09:42:06Z","html_url":"https://github.com/theforeman/foreman/pull/2588#discussion_r39024098","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/2588","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/39024098"},"html":{"href":"https://github.com/theforeman/foreman/pull/2588#discussion_r39024098"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2588"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2588","id":41351686,"html_url":"https://github.com/theforeman/foreman/pull/2588","diff_url":"https://github.com/theforeman/foreman/pull/2588.diff","patch_url":"https://github.com/theforeman/foreman/pull/2588.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2588","number":2588,"state":"open","locked":false,"title":"fixes #8521 - fix classes accessors, copy overrides on host clone","user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"body":"This PR should make host and host group cloning properly copy all class and config group associations, parameters and overrides.\r\n\r\nIt's wrapping up #2563, which itself was pretty much ready to go.  I noticed that it now wasn't cloning Puppet class associations since the deep_clone change, and realised that this was the same bug as http://projects.theforeman.org/issues/8521.  I fixed that general issue, added the commit from #2563 to fix host group cloning, and then fixed the last bit of host group + class cloning in the third commit (I suggest that this last one can be squashed into @cfouant's).","created_at":"2015-07-31T15:35:48Z","updated_at":"2015-09-09T09:42:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"734acc865fd376be5ea210adc5017d064541f84c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/2588/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/2588/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2588/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/875815f727047686b2e709adc67b8b48534de1ac","head":{"label":"domcleal:8521-host-cloning","ref":"8521-host-cloning","sha":"875815f727047686b2e709adc67b8b48534de1ac","user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"repo":{"id":6577737,"name":"foreman","full_name":"domcleal/foreman","owner":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/domcleal/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/domcleal/foreman","forks_url":"https://api.github.com/repos/domcleal/foreman/forks","keys_url":"https://api.github.com/repos/domcleal/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/domcleal/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/domcleal/foreman/teams","hooks_url":"https://api.github.com/repos/domcleal/foreman/hooks","issue_events_url":"https://api.github.com/repos/domcleal/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/domcleal/foreman/events","assignees_url":"https://api.github.com/repos/domcleal/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/domcleal/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/domcleal/foreman/tags","blobs_url":"https://api.github.com/repos/domcleal/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/domcleal/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/domcleal/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/domcleal/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/domcleal/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/domcleal/foreman/languages","stargazers_url":"https://api.github.com/repos/domcleal/foreman/stargazers","contributors_url":"https://api.github.com/repos/domcleal/foreman/contributors","subscribers_url":"https://api.github.com/repos/domcleal/foreman/subscribers","subscription_url":"https://api.github.com/repos/domcleal/foreman/subscription","commits_url":"https://api.github.com/repos/domcleal/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/domcleal/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/domcleal/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/domcleal/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/domcleal/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/domcleal/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/domcleal/foreman/merges","archive_url":"https://api.github.com/repos/domcleal/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/domcleal/foreman/downloads","issues_url":"https://api.github.com/repos/domcleal/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/domcleal/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/domcleal/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/domcleal/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/domcleal/foreman/labels{/name}","releases_url":"https://api.github.com/repos/domcleal/foreman/releases{/id}","created_at":"2012-11-07T10:48:14Z","updated_at":"2014-11-25T12:48:14Z","pushed_at":"2015-09-09T09:15:09Z","git_url":"git://github.com/domcleal/foreman.git","ssh_url":"git@github.com:domcleal/foreman.git","clone_url":"https://github.com/domcleal/foreman.git","svn_url":"https://github.com/domcleal/foreman","homepage":"http://theforeman.org","size":33178,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"45e004cfd3d7a9a0cb6df9d1afacc0ca3252b524","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","created_at":"2009-07-23T15:07:00Z","updated_at":"2015-09-07T01:51:17Z","pushed_at":"2015-09-09T09:23:58Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":90211,"stargazers_count":840,"watchers_count":840,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":426,"mirror_url":null,"open_issues_count":73,"forks":426,"open_issues":73,"watchers":840,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2588"},"html":{"href":"https://github.com/theforeman/foreman/pull/2588"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2588"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2588/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2588/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2588/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/875815f727047686b2e709adc67b8b48534de1ac"}}}}