Hi
I just learned about the CODEOWNERS. However, I'm struggling to achieve the functionality I need. That is, to require at least one approval from each user group for merging the PR (2 user groups, 2 approvals in total).
I have created a CODEOWNERS file, which has a single file pattern (*) mapped to two user groups. When I create a PR, I can see that one person from each team gets randomly added to the PR as a reviewer. In my repo settings, I have a "merge to branch" restriction, which requires at least 2 approvals. However, it doesn't force the approvals to be exactly from the same two people who have been randomly selected. In case ANY two people approve it, then it can be merged (this is what I want to avoid).
I have also tried setting the restriction not on reviewers, but specifically on default reviewers. In this case it also didn't work, because the randomly selected two people never become part of the default reviewers "on-the-fly". So, even if they approve the PR, it's still pending on default reviewers' approvals.
Is there any way at all to achieve this behavior? Am I missing anything?
Thanks