CODEOWNERS review only for PRs from read-only users?

We have a lot of open source repos and want to make sure that PRs from contributors get noticed. I tried setting up Codeowners but that automatically triggers a review request no matter who opened the PR. I’d like to avoid that, as different members of our team review code depending on who’s working on a specific project at a given time. As such, if I set it to a specific person, they might get unnecessarily spammed with review requests.

Is there a way to trigger CODEOWNER-based review requests only when the PR is made by someone who doesn’t have write permission on the repo?

Hey there …

To my knowledge, there currently isn’t a way to do what you’re asking. The CODEOWNERS support was designed to mimic code review tools that require reviews from specific people no matter who is submitting the code. The built-in review system isn’t conditional in the way you’re asking for.

On the other hand, it sounds like an interesting feature. You may want to consider submitting it as a feature request by using the GitHub contact form.

Thanks for the question. I hope that helps!