Automatic code review assignment not working with CODEOWNERS & teams

I’m having some issues with the automatic code review assignment feature as it relates to the CODEOWNERS file, and I’m trying to determine if this is intended behavior or if I’m doing something wrong.

I’ve configured automatic code review assignment for my GH team, as outlined here, and if I create a pull request and manually assign the team as a reviewer, the team is automatically removed and random team members are assigned as expected. This is great! 

However, I’m trying to automate the assignment of the team by declaring the team as a code owner for all files in our repository (so that random team members are assigned as code reviewers for all of our pull requests). 
I’ve added the following line in our CODEOWNERS file:

*   @myorg/my-team-name

This doesn’t seem to work as I expect it to: the CODEOWNERS declaration will automatically add the team as a reviewer, but that action won’t also remove the team and automatically assign team members - that only seems to work if I manually add the team as a reviewer.

Is this expected behavior, or is there a way to use both the CODEOWNERS automatic assignment & round-robin team member assignment together? 


Hey! In our case we’re seeing a similar scenario. We add a team as a CODEOWNER and when the auto assignment runs, the individual reviewer in which the review is delegated overrides the team but not as a CODEOWNER. I know tat this is the expected behaviour as seen here but would like to know if there’s any workaround to make sure that we preserve the CODEOWNER configuration for delegated reviews.


Hey all, I’m facing the exact same issue with @mitchware-cfa.

Can’t believe it’s past one year now and there’s still no reply from the Github team?

Same issue as reported above

Hi! Can we please get a response to this? CODEOWNERS + Code review assignment is not working as described here and this is causing issues for us in getting the right people to review PRs. Thank you.

cc: @andreagriffiths11 :slight_smile:
Got your handle from this issue.