we have the requirement for PRs to be approved by at least two teams, whereas one is the same for any case and the second is depending on the directory that has got changed in that PR.
The repository is about a GitOps implementation where we store declarative documents which describes namespace configurations per tenant.
As in the above example the tenant1 GitHub team should approve all changes made on that directory and tenant2 for their directory.
Nevertheless, in any case the operations team, who is taking care about the implementation of that changes into the namespaces should be the only one to add the final approval and merge it into the master branch to get affected into the cluster.
When I add the following to the CODEOWNERS file, only the last one will be requested as reviewer in the PR. When adding two teams on the directory lines, one of the two teams can approve, but it doesnt require both approvals.
* @operations-team /tenant1/ @tenant1-team /tenant2/ @tenant2-team
Any idea how I can achieve the above requirement?
When I configure the branch protection rules, I can limit the merging to the operations-team, but the approval should be there as well due to company policies.