Implement method to sync approved approvers after merge
Captures which users approved which rules for compliance.
Validate these requirements during implementation and adjust as needed:
- Add
sync_approved_approversmethod toMergeRequests::ApprovalRulemodel - Only runs after MR is merged (check
merge_request&.merged?andmerge_request.finalizing_rules.present?) - Uses
ApprovalWrappedRule.wrap(merge_request, self).approved_approversto get list of approvers - Populates
approved_approversjoin table viaapproved_approver_ids= - Used by existing
ApprovalRules::FinalizeService(no service changes needed)
Reference: POC implementation in poc/v2-approval-rules-complete branch
Edited by Gavin Hinfey