payload: {"action":"created","comment":{"url":"https://api.github.com/repos/dchbx/enroll/pulls/comments/275068517","pull_request_review_id":226293757,"id":275068517,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3NTA2ODUxNw==","diff_hunk":"@@ -520,9 +520,71 @@ def propagate_renewal\n     end\n   end\n \n-  def waive_coverage_by_benefit_group_assignment(waiver_reason)\n-    update_current(waiver_reason: waiver_reason)\n-    waive_coverage!\n+  def construct_waiver_enrollment(waiver_reason = nil)\n+    employee_role =  self.employee_role\n+    coverage_household = employee_role.person.primary_family.active_household.immediate_family_coverage_household\n+    waived_enrollment = coverage_household.household.new_hbx_enrollment_from(employee_role: employee_role, coverage_household: coverage_household, benefit_group: benefit_group, benefit_group_assignment: benefit_group_assignment, qle: (@change_plan == 'change_by_qle' or @enrollment_kind == 'sep'))\n+    waived_enrollment.coverage_kind = coverage_kind\n+    waived_enrollment.kind = 'employer_sponsored_cobra' if employee_role.present? && employee_role.is_cobra_status?\n+    waived_enrollment.terminate_reason = terminate_reason if self.terminate_reason\n+    waived_enrollment.waiver_reason = waiver_reason if waiver_reason\n+    waived_enrollment.predecessor_enrollment_id = self._id\n+    waived_enrollment.generate_hbx_signature\n+    if waived_enrollment.save!","path":"app/models/hbx_enrollment.rb","position":60,"original_position":60,"commit_id":"da1c423eb4128f961160e0b606155112d94e2065","original_commit_id":"da1c423eb4128f961160e0b606155112d94e2065","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.","created_at":"2019-04-12T21:22:27Z","updated_at":"2019-04-12T21:22:29Z","html_url":"https://github.com/dchbx/enroll/pull/2579#discussion_r275068517","pull_request_url":"https://api.github.com/repos/dchbx/enroll/pulls/2579","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dchbx/enroll/pulls/comments/275068517"},"html":{"href":"https://github.com/dchbx/enroll/pull/2579#discussion_r275068517"},"pull_request":{"href":"https://api.github.com/repos/dchbx/enroll/pulls/2579"}}},"pull_request":{"url":"https://api.github.com/repos/dchbx/enroll/pulls/2579","id":257588007,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU3NTg4MDA3","html_url":"https://github.com/dchbx/enroll/pull/2579","diff_url":"https://github.com/dchbx/enroll/pull/2579.diff","patch_url":"https://github.com/dchbx/enroll/pull/2579.patch","issue_url":"https://api.github.com/repos/dchbx/enroll/issues/2579","number":2579,"state":"open","locked":false,"title":"39976","user":{"login":"krbhavith","id":22402321,"node_id":"MDQ6VXNlcjIyNDAyMzIx","avatar_url":"https://avatars3.githubusercontent.com/u/22402321?v=4","gravatar_id":"","url":"https://api.github.com/users/krbhavith","html_url":"https://github.com/krbhavith","followers_url":"https://api.github.com/users/krbhavith/followers","following_url":"https://api.github.com/users/krbhavith/following{/other_user}","gists_url":"https://api.github.com/users/krbhavith/gists{/gist_id}","starred_url":"https://api.github.com/users/krbhavith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krbhavith/subscriptions","organizations_url":"https://api.github.com/users/krbhavith/orgs","repos_url":"https://api.github.com/users/krbhavith/repos","events_url":"https://api.github.com/users/krbhavith/events{/privacy}","received_events_url":"https://api.github.com/users/krbhavith/received_events","type":"User","site_admin":false},"body":"|Field|Value|\n|-----|-----|\n| Redmine Ticket Number | [39976](https://devops.dchbx.org/redmine/issues/39976) |\n| App-Dev Road Map # | n/a |\n| Start Date | n/a |\n| Due Date | n/a  |\n| App-Dev Priority | UP-Disqueued |\n| Development Story Points | n/a |\n| Peer Review Story Points | n/a |\n| Ticket Author | @raghuramg |","created_at":"2019-03-01T21:29:45Z","updated_at":"2019-04-12T21:22:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc8a923f11420439f515579350496c710addb3ad","assignee":{"login":"Battula","id":17408895,"node_id":"MDQ6VXNlcjE3NDA4ODk1","avatar_url":"https://avatars0.githubusercontent.com/u/17408895?v=4","gravatar_id":"","url":"https://api.github.com/users/Battula","html_url":"https://github.com/Battula","followers_url":"https://api.github.com/users/Battula/followers","following_url":"https://api.github.com/users/Battula/following{/other_user}","gists_url":"https://api.github.com/users/Battula/gists{/gist_id}","starred_url":"https://api.github.com/users/Battula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Battula/subscriptions","organizations_url":"https://api.github.com/users/Battula/orgs","repos_url":"https://api.github.com/users/Battula/repos","events_url":"https://api.github.com/users/Battula/events{/privacy}","received_events_url":"https://api.github.com/users/Battula/received_events","type":"User","site_admin":false},"assignees":[{"login":"Battula","id":17408895,"node_id":"MDQ6VXNlcjE3NDA4ODk1","avatar_url":"https://avatars0.githubusercontent.com/u/17408895?v=4","gravatar_id":"","url":"https://api.github.com/users/Battula","html_url":"https://github.com/Battula","followers_url":"https://api.github.com/users/Battula/followers","following_url":"https://api.github.com/users/Battula/following{/other_user}","gists_url":"https://api.github.com/users/Battula/gists{/gist_id}","starred_url":"https://api.github.com/users/Battula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Battula/subscriptions","organizations_url":"https://api.github.com/users/Battula/orgs","repos_url":"https://api.github.com/users/Battula/repos","events_url":"https://api.github.com/users/Battula/events{/privacy}","received_events_url":"https://api.github.com/users/Battula/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":511709097,"node_id":"MDU6TGFiZWw1MTE3MDkwOTc=","url":"https://api.github.com/repos/dchbx/enroll/labels/Mergeable:%20No","name":"Mergeable: No","color":"f9d0c4","default":false},{"id":442908634,"node_id":"MDU6TGFiZWw0NDI5MDg2MzQ=","url":"https://api.github.com/repos/dchbx/enroll/labels/Priority:%20Normal","name":"Priority: Normal","color":"c5def5","default":false},{"id":442918944,"node_id":"MDU6TGFiZWw0NDI5MTg5NDQ=","url":"https://api.github.com/repos/dchbx/enroll/labels/Status:%20Peer%20Review","name":"Status: Peer Review","color":"FFEF00","default":false},{"id":442912939,"node_id":"MDU6TGFiZWw0NDI5MTI5Mzk=","url":"https://api.github.com/repos/dchbx/enroll/labels/Tracker:%20App-Dev_Use%20Case","name":"Tracker: App-Dev_Use Case","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dchbx/enroll/pulls/2579/commits","review_comments_url":"https://api.github.com/repos/dchbx/enroll/pulls/2579/comments","review_comment_url":"https://api.github.com/repos/dchbx/enroll/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dchbx/enroll/issues/2579/comments","statuses_url":"https://api.github.com/repos/dchbx/enroll/statuses/da1c423eb4128f961160e0b606155112d94e2065","head":{"label":"dchbx:notice_engine_39976","ref":"notice_engine_39976","sha":"da1c423eb4128f961160e0b606155112d94e2065","user":{"login":"dchbx","id":4580217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1ODAyMTc=","avatar_url":"https://avatars1.githubusercontent.com/u/4580217?v=4","gravatar_id":"","url":"https://api.github.com/users/dchbx","html_url":"https://github.com/dchbx","followers_url":"https://api.github.com/users/dchbx/followers","following_url":"https://api.github.com/users/dchbx/following{/other_user}","gists_url":"https://api.github.com/users/dchbx/gists{/gist_id}","starred_url":"https://api.github.com/users/dchbx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchbx/subscriptions","organizations_url":"https://api.github.com/users/dchbx/orgs","repos_url":"https://api.github.com/users/dchbx/repos","events_url":"https://api.github.com/users/dchbx/events{/privacy}","received_events_url":"https://api.github.com/users/dchbx/received_events","type":"Organization","site_admin":false},"repo":{"id":28518679,"node_id":"MDEwOlJlcG9zaXRvcnkyODUxODY3OQ==","name":"enroll","full_name":"dchbx/enroll","private":false,"owner":{"login":"dchbx","id":4580217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1ODAyMTc=","avatar_url":"https://avatars1.githubusercontent.com/u/4580217?v=4","gravatar_id":"","url":"https://api.github.com/users/dchbx","html_url":"https://github.com/dchbx","followers_url":"https://api.github.com/users/dchbx/followers","following_url":"https://api.github.com/users/dchbx/following{/other_user}","gists_url":"https://api.github.com/users/dchbx/gists{/gist_id}","starred_url":"https://api.github.com/users/dchbx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchbx/subscriptions","organizations_url":"https://api.github.com/users/dchbx/orgs","repos_url":"https://api.github.com/users/dchbx/repos","events_url":"https://api.github.com/users/dchbx/events{/privacy}","received_events_url":"https://api.github.com/users/dchbx/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dchbx/enroll","description":"An ACA-compliant enrollment system for individual and SHOP markets, built on Ruby on Rails, with a Mongo database","fork":false,"url":"https://api.github.com/repos/dchbx/enroll","forks_url":"https://api.github.com/repos/dchbx/enroll/forks","keys_url":"https://api.github.com/repos/dchbx/enroll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dchbx/enroll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dchbx/enroll/teams","hooks_url":"https://api.github.com/repos/dchbx/enroll/hooks","issue_events_url":"https://api.github.com/repos/dchbx/enroll/issues/events{/number}","events_url":"https://api.github.com/repos/dchbx/enroll/events","assignees_url":"https://api.github.com/repos/dchbx/enroll/assignees{/user}","branches_url":"https://api.github.com/repos/dchbx/enroll/branches{/branch}","tags_url":"https://api.github.com/repos/dchbx/enroll/tags","blobs_url":"https://api.github.com/repos/dchbx/enroll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dchbx/enroll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dchbx/enroll/git/refs{/sha}","trees_url":"https://api.github.com/repos/dchbx/enroll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dchbx/enroll/statuses/{sha}","languages_url":"https://api.github.com/repos/dchbx/enroll/languages","stargazers_url":"https://api.github.com/repos/dchbx/enroll/stargazers","contributors_url":"https://api.github.com/repos/dchbx/enroll/contributors","subscribers_url":"https://api.github.com/repos/dchbx/enroll/subscribers","subscription_url":"https://api.github.com/repos/dchbx/enroll/subscription","commits_url":"https://api.github.com/repos/dchbx/enroll/commits{/sha}","git_commits_url":"https://api.github.com/repos/dchbx/enroll/git/commits{/sha}","comments_url":"https://api.github.com/repos/dchbx/enroll/comments{/number}","issue_comment_url":"https://api.github.com/repos/dchbx/enroll/issues/comments{/number}","contents_url":"https://api.github.com/repos/dchbx/enroll/contents/{+path}","compare_url":"https://api.github.com/repos/dchbx/enroll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dchbx/enroll/merges","archive_url":"https://api.github.com/repos/dchbx/enroll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dchbx/enroll/downloads","issues_url":"https://api.github.com/repos/dchbx/enroll/issues{/number}","pulls_url":"https://api.github.com/repos/dchbx/enroll/pulls{/number}","milestones_url":"https://api.github.com/repos/dchbx/enroll/milestones{/number}","notifications_url":"https://api.github.com/repos/dchbx/enroll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dchbx/enroll/labels{/name}","releases_url":"https://api.github.com/repos/dchbx/enroll/releases{/id}","deployments_url":"https://api.github.com/repos/dchbx/enroll/deployments","created_at":"2014-12-26T18:59:14Z","updated_at":"2019-04-08T15:11:09Z","pushed_at":"2019-04-12T21:22:08Z","git_url":"git://github.com/dchbx/enroll.git","ssh_url":"git@github.com:dchbx/enroll.git","clone_url":"https://github.com/dchbx/enroll.git","svn_url":"https://github.com/dchbx/enroll","homepage":"https://dchealthlink.com/","size":158704,"stargazers_count":20,"watchers_count":20,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":414,"license":null,"forks":30,"open_issues":414,"watchers":20,"default_branch":"master"}},"base":{"label":"dchbx:notice_engine_20345","ref":"notice_engine_20345","sha":"a29a5f70b40667a79684bd42e87888fe82f88521","user":{"login":"dchbx","id":4580217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1ODAyMTc=","avatar_url":"https://avatars1.githubusercontent.com/u/4580217?v=4","gravatar_id":"","url":"https://api.github.com/users/dchbx","html_url":"https://github.com/dchbx","followers_url":"https://api.github.com/users/dchbx/followers","following_url":"https://api.github.com/users/dchbx/following{/other_user}","gists_url":"https://api.github.com/users/dchbx/gists{/gist_id}","starred_url":"https://api.github.com/users/dchbx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchbx/subscriptions","organizations_url":"https://api.github.com/users/dchbx/orgs","repos_url":"https://api.github.com/users/dchbx/repos","events_url":"https://api.github.com/users/dchbx/events{/privacy}","received_events_url":"https://api.github.com/users/dchbx/received_events","type":"Organization","site_admin":false},"repo":{"id":28518679,"node_id":"MDEwOlJlcG9zaXRvcnkyODUxODY3OQ==","name":"enroll","full_name":"dchbx/enroll","private":false,"owner":{"login":"dchbx","id":4580217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1ODAyMTc=","avatar_url":"https://avatars1.githubusercontent.com/u/4580217?v=4","gravatar_id":"","url":"https://api.github.com/users/dchbx","html_url":"https://github.com/dchbx","followers_url":"https://api.github.com/users/dchbx/followers","following_url":"https://api.github.com/users/dchbx/following{/other_user}","gists_url":"https://api.github.com/users/dchbx/gists{/gist_id}","starred_url":"https://api.github.com/users/dchbx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchbx/subscriptions","organizations_url":"https://api.github.com/users/dchbx/orgs","repos_url":"https://api.github.com/users/dchbx/repos","events_url":"https://api.github.com/users/dchbx/events{/privacy}","received_events_url":"https://api.github.com/users/dchbx/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dchbx/enroll","description":"An ACA-compliant enrollment system for individual and SHOP markets, built on Ruby on Rails, with a Mongo database","fork":false,"url":"https://api.github.com/repos/dchbx/enroll","forks_url":"https://api.github.com/repos/dchbx/enroll/forks","keys_url":"https://api.github.com/repos/dchbx/enroll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dchbx/enroll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dchbx/enroll/teams","hooks_url":"https://api.github.com/repos/dchbx/enroll/hooks","issue_events_url":"https://api.github.com/repos/dchbx/enroll/issues/events{/number}","events_url":"https://api.github.com/repos/dchbx/enroll/events","assignees_url":"https://api.github.com/repos/dchbx/enroll/assignees{/user}","branches_url":"https://api.github.com/repos/dchbx/enroll/branches{/branch}","tags_url":"https://api.github.com/repos/dchbx/enroll/tags","blobs_url":"https://api.github.com/repos/dchbx/enroll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dchbx/enroll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dchbx/enroll/git/refs{/sha}","trees_url":"https://api.github.com/repos/dchbx/enroll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dchbx/enroll/statuses/{sha}","languages_url":"https://api.github.com/repos/dchbx/enroll/languages","stargazers_url":"https://api.github.com/repos/dchbx/enroll/stargazers","contributors_url":"https://api.github.com/repos/dchbx/enroll/contributors","subscribers_url":"https://api.github.com/repos/dchbx/enroll/subscribers","subscription_url":"https://api.github.com/repos/dchbx/enroll/subscription","commits_url":"https://api.github.com/repos/dchbx/enroll/commits{/sha}","git_commits_url":"https://api.github.com/repos/dchbx/enroll/git/commits{/sha}","comments_url":"https://api.github.com/repos/dchbx/enroll/comments{/number}","issue_comment_url":"https://api.github.com/repos/dchbx/enroll/issues/comments{/number}","contents_url":"https://api.github.com/repos/dchbx/enroll/contents/{+path}","compare_url":"https://api.github.com/repos/dchbx/enroll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dchbx/enroll/merges","archive_url":"https://api.github.com/repos/dchbx/enroll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dchbx/enroll/downloads","issues_url":"https://api.github.com/repos/dchbx/enroll/issues{/number}","pulls_url":"https://api.github.com/repos/dchbx/enroll/pulls{/number}","milestones_url":"https://api.github.com/repos/dchbx/enroll/milestones{/number}","notifications_url":"https://api.github.com/repos/dchbx/enroll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dchbx/enroll/labels{/name}","releases_url":"https://api.github.com/repos/dchbx/enroll/releases{/id}","deployments_url":"https://api.github.com/repos/dchbx/enroll/deployments","created_at":"2014-12-26T18:59:14Z","updated_at":"2019-04-08T15:11:09Z","pushed_at":"2019-04-12T21:22:08Z","git_url":"git://github.com/dchbx/enroll.git","ssh_url":"git@github.com:dchbx/enroll.git","clone_url":"https://github.com/dchbx/enroll.git","svn_url":"https://github.com/dchbx/enroll","homepage":"https://dchealthlink.com/","size":158704,"stargazers_count":20,"watchers_count":20,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":414,"license":null,"forks":30,"open_issues":414,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dchbx/enroll/pulls/2579"},"html":{"href":"https://github.com/dchbx/enroll/pull/2579"},"issue":{"href":"https://api.github.com/repos/dchbx/enroll/issues/2579"},"comments":{"href":"https://api.github.com/repos/dchbx/enroll/issues/2579/comments"},"review_comments":{"href":"https://api.github.com/repos/dchbx/enroll/pulls/2579/comments"},"review_comment":{"href":"https://api.github.com/repos/dchbx/enroll/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dchbx/enroll/pulls/2579/commits"},"statuses":{"href":"https://api.github.com/repos/dchbx/enroll/statuses/da1c423eb4128f961160e0b606155112d94e2065"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"houndci-bot"}}