{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/comments/147171296","pull_request_review_id":72228226,"id":147171296,"diff_hunk":"@@ -10,7 +10,9 @@ class Targeting < ActiveRecord::Base\n \n   has_many :targeting_hosts, :dependent => :destroy\n   has_many :hosts, :through => :targeting_hosts\n+  # rubocop:disable Rails/HasManyOrHasOneDependent","path":"app/models/targeting.rb","position":4,"original_position":4,"commit_id":"2be6e23598e725f4f23f9b91980af2deec1fb444","original_commit_id":"2be6e23598e725f4f23f9b91980af2deec1fb444","user":{"login":"iNecas","id":190443,"avatar_url":"https://avatars3.githubusercontent.com/u/190443?v=4","gravatar_id":"","url":"https://api.github.com/users/iNecas","html_url":"https://github.com/iNecas","followers_url":"https://api.github.com/users/iNecas/followers","following_url":"https://api.github.com/users/iNecas/following{/other_user}","gists_url":"https://api.github.com/users/iNecas/gists{/gist_id}","starred_url":"https://api.github.com/users/iNecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iNecas/subscriptions","organizations_url":"https://api.github.com/users/iNecas/orgs","repos_url":"https://api.github.com/users/iNecas/repos","events_url":"https://api.github.com/users/iNecas/events{/privacy}","received_events_url":"https://api.github.com/users/iNecas/received_events","type":"User","site_admin":false},"body":"Do you have any insights on why this has happened? Is there a risk this would affect behavior in other places that we have the `:dependent` specified? Why is it raising this? Why it complains it wants to crate something, when we are actually deleting\r\n\r\n```\r\nActiveRecord::RecordNotSaved: You cannot call create unless the parent is saved\r\n    test_after_commit (1.1.0) lib/test_after_commit/database_statements.rb:11:in `block in transaction'\r\n    test_after_commit (1.1.0) lib/test_after_commit/database_statements.rb:5:in `transaction'\r\n    test_after_commit (1.1.0) lib/test_after_commit/database_statements.rb:11:in `block in transaction'\r\n    test_after_commit (1.1.0) lib/test_after_commit/database_statements.rb:5:in `transaction'\r\n    test_after_commit (1.1.0) lib/test_after_commit/database_statements.rb:11:in `block in transaction'\r\n    test_after_commit (1.1.0) lib/test_after_commit/database_statements.rb:5:in `transaction'\r\n    /var/lib/workspace/workspace/test_plugin_pull_request/database/mysql/label/fast/ruby/2.2/plugin/app/models/concerns/foreman_remote_execution/foreman_tasks_cleaner_extensions.rb:29:in `delete_job_invocations'\r\n    /var/lib/workspace/workspace/test_plugin_pull_request/database/mysql/label/fast/ruby/2.2/plugin/app/models/concerns/foreman_remote_execution/foreman_tasks_cleaner_extensions.rb:25:in `delete_tasks'\r\n    foreman-tasks (0.10.4) lib/foreman_tasks/cleaner.rb:104:in `delete'\r\n    /var/lib/workspace/workspace/test_plugin_pull_request/database/mysql/label/fast/ruby/2.2/plugin/app/models/concerns/foreman_remote_execution/foreman_tasks_cleaner_extensions.rb:12:in `delete' (ActiveRecord::RecordNotSaved)\r\n/usr/local/rvm/gems/ruby-2.2.5@test_plugin_pull_request-1/gems/activerecord-4.2.9/lib/active_record/associations/collection_association.rb:497    \r\n```","created_at":"2017-10-26T15:04:10Z","updated_at":"2017-10-26T15:04:11Z","html_url":"https://github.com/theforeman/foreman_remote_execution/pull/292#discussion_r147171296","pull_request_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/292","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/comments/147171296"},"html":{"href":"https://github.com/theforeman/foreman_remote_execution/pull/292#discussion_r147171296"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/292"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/292","id":148908472,"html_url":"https://github.com/theforeman/foreman_remote_execution/pull/292","diff_url":"https://github.com/theforeman/foreman_remote_execution/pull/292.diff","patch_url":"https://github.com/theforeman/foreman_remote_execution/pull/292.patch","issue_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/issues/292","number":292,"state":"open","locked":false,"title":"Fixes #21477 - Deal with rubocop 0.51","user":{"login":"adamruzicka","id":7326770,"avatar_url":"https://avatars0.githubusercontent.com/u/7326770?v=4","gravatar_id":"","url":"https://api.github.com/users/adamruzicka","html_url":"https://github.com/adamruzicka","followers_url":"https://api.github.com/users/adamruzicka/followers","following_url":"https://api.github.com/users/adamruzicka/following{/other_user}","gists_url":"https://api.github.com/users/adamruzicka/gists{/gist_id}","starred_url":"https://api.github.com/users/adamruzicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamruzicka/subscriptions","organizations_url":"https://api.github.com/users/adamruzicka/orgs","repos_url":"https://api.github.com/users/adamruzicka/repos","events_url":"https://api.github.com/users/adamruzicka/events{/privacy}","received_events_url":"https://api.github.com/users/adamruzicka/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-26T11:31:40Z","updated_at":"2017-10-26T15:04:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d357345a5f260e881eb48f5cca05007039c58819","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/292/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/292/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/issues/292/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/statuses/2be6e23598e725f4f23f9b91980af2deec1fb444","head":{"label":"adamruzicka:rubocop","ref":"rubocop","sha":"2be6e23598e725f4f23f9b91980af2deec1fb444","user":{"login":"adamruzicka","id":7326770,"avatar_url":"https://avatars0.githubusercontent.com/u/7326770?v=4","gravatar_id":"","url":"https://api.github.com/users/adamruzicka","html_url":"https://github.com/adamruzicka","followers_url":"https://api.github.com/users/adamruzicka/followers","following_url":"https://api.github.com/users/adamruzicka/following{/other_user}","gists_url":"https://api.github.com/users/adamruzicka/gists{/gist_id}","starred_url":"https://api.github.com/users/adamruzicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamruzicka/subscriptions","organizations_url":"https://api.github.com/users/adamruzicka/orgs","repos_url":"https://api.github.com/users/adamruzicka/repos","events_url":"https://api.github.com/users/adamruzicka/events{/privacy}","received_events_url":"https://api.github.com/users/adamruzicka/received_events","type":"User","site_admin":false},"repo":{"id":37916189,"name":"foreman_remote_execution","full_name":"adamruzicka/foreman_remote_execution","owner":{"login":"adamruzicka","id":7326770,"avatar_url":"https://avatars0.githubusercontent.com/u/7326770?v=4","gravatar_id":"","url":"https://api.github.com/users/adamruzicka","html_url":"https://github.com/adamruzicka","followers_url":"https://api.github.com/users/adamruzicka/followers","following_url":"https://api.github.com/users/adamruzicka/following{/other_user}","gists_url":"https://api.github.com/users/adamruzicka/gists{/gist_id}","starred_url":"https://api.github.com/users/adamruzicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamruzicka/subscriptions","organizations_url":"https://api.github.com/users/adamruzicka/orgs","repos_url":"https://api.github.com/users/adamruzicka/repos","events_url":"https://api.github.com/users/adamruzicka/events{/privacy}","received_events_url":"https://api.github.com/users/adamruzicka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adamruzicka/foreman_remote_execution","description":"A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality","fork":true,"url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution","forks_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/forks","keys_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/teams","hooks_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/hooks","issue_events_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/issues/events{/number}","events_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/events","assignees_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/assignees{/user}","branches_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/branches{/branch}","tags_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/tags","blobs_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/git/refs{/sha}","trees_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/statuses/{sha}","languages_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/languages","stargazers_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/stargazers","contributors_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/contributors","subscribers_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/subscribers","subscription_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/subscription","commits_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/commits{/sha}","git_commits_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/git/commits{/sha}","comments_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/comments{/number}","issue_comment_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/issues/comments{/number}","contents_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/contents/{+path}","compare_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/merges","archive_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/downloads","issues_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/issues{/number}","pulls_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/pulls{/number}","milestones_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/milestones{/number}","notifications_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/labels{/name}","releases_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/releases{/id}","deployments_url":"https://api.github.com/repos/adamruzicka/foreman_remote_execution/deployments","created_at":"2015-06-23T11:58:49Z","updated_at":"2016-11-15T08:53:06Z","pushed_at":"2017-10-26T13:10:55Z","git_url":"git://github.com/adamruzicka/foreman_remote_execution.git","ssh_url":"git@github.com:adamruzicka/foreman_remote_execution.git","clone_url":"https://github.com/adamruzicka/foreman_remote_execution.git","svn_url":"https://github.com/adamruzicka/foreman_remote_execution","homepage":"","size":2539,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"theforeman:master","ref":"master","sha":"3df6f1164d7c2532834a8432d772bdbef74f34a4","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars2.githubusercontent.com/u/1439844?v=4","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":34800230,"name":"foreman_remote_execution","full_name":"theforeman/foreman_remote_execution","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars2.githubusercontent.com/u/1439844?v=4","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_remote_execution","description":"A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality","fork":false,"url":"https://api.github.com/repos/theforeman/foreman_remote_execution","forks_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/forks","keys_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/events","assignees_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/merges","archive_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/releases{/id}","deployments_url":"https://api.github.com/repos/theforeman/foreman_remote_execution/deployments","created_at":"2015-04-29T14:57:15Z","updated_at":"2017-10-26T14:09:23Z","pushed_at":"2017-10-26T13:10:56Z","git_url":"git://github.com/theforeman/foreman_remote_execution.git","ssh_url":"git@github.com:theforeman/foreman_remote_execution.git","clone_url":"https://github.com/theforeman/foreman_remote_execution.git","svn_url":"https://github.com/theforeman/foreman_remote_execution","homepage":"","size":2587,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":15,"forks":36,"open_issues":15,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/292"},"html":{"href":"https://github.com/theforeman/foreman_remote_execution/pull/292"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/issues/292"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/issues/292/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/292/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/pulls/292/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman_remote_execution/statuses/2be6e23598e725f4f23f9b91980af2deec1fb444"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"iNecas"}}