I'm using the codeowners file to require PR approvals before they can be merged. What I'd like to do is:
It seems like the code owners file does a hierarchical thing where only one group owns the code and you can create rules for certain directories but those will just override the default code owner.
My current .github/CODEOWNERS
file looks like this:
* @my-org/engineer-code-owners
Is there a way to require at least one approval from two different groups?
You can list multiple users/groups on a single line (separated by a single space) to request multiple reviews.
* @my-org/engineer-code-owners @my-org/qa-code-owners
As of time of writing, there’s no way to require a review from all code owners assigned to a pull request.
Is there any way to require all of the listed people to approve?
No, there currently isn’t a way to do that built-in to the CODEOWNERS feature.
See CODEOWNERS reference and thread on required reviews.
On one line of CODEOWNERS, you can request reviews from multiple reviewers but you can't require approvals.
In the repo settings, branch protection, you can require a certain number of approvals but you can't specify who.
I was really hoping I could stop myself merging without QA approval!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With