Team being removed as a Pull Request reviewer after one member has reviewed

Hello,

We have applied a CODEOWNERS file to our code, which contains the name of a team, in the following format.

* @Org-Name/Team-Name

We’ve also given that team write permissions to the repository, ensuring that the team is added as a reviewer when a Pull Request is created.

When a Pull Request is created, every member of the code owning team gets an email, which is expected. However, once one member of the team has completed their review of the Pull Request, the team is removed as a reviewer and the individual is added.

This is very undesirable, as now the rest of the code owning team loses visibility of the Pull Request through https://github.com/pulls.

Is there any way to change this behaviour?

Thanks,
David

Hi @dgard1981,

Thank you for being here. Is the  Require review from Code Owners  setting is enabled for the repo in question? The individual approvals won’t satisfy the requirement for code owner approval in a protected branch. Here is a link to our documentation on this setting: https://help.github.com/en/github/administering-a-repository/enabling-required-reviews-for-pull-requests

1 Like

Hi @andreagriffiths11,

Thanks for your reply, however I think you may have misunderstood the issue.

Yes, we require review from code owners. To that end we have create a CODEOWNERS file which specifies a single team. This team has been given explicit write permissions to the repository, as described in the documentation, meaning that upon creation of a Pull Request the specified team is added as a reviewer.

So far, so good.

However, when one member of the specified team approves the Pull Request, that member replaces the team as the reviewer for the Pull Request. This means that every other member of the team loses visibility of the Pull Request and won’t be notified about further interactions.

In this case we require two reviews for a Pull Request, so this means that as well as the code owener team we have to manually specify members of that team as individual reviewers. This is both time consuming and inconvinient.

I hope that better explains my issue.

Thanks,

David

2 Likes

+1 For this issue.
andreagriffiths11 are you aware of a setting that can stop the behavior dgard1981 is describing?

1 Like

@andreagriffiths11 - To confirm, this is still an issue.

GitHub has no concept of ‘default’ reviewers, and the ‘suggestions’ for reviewers when creating a PR are entirely inadequate. So unless we manually add every reviewer individually to every PR, all but one user loses visibility of the PR after an approval - it’s an awful user experience.

1 Like

@andreagriffiths11 This is a major issue for me as well

Joining in to say it would be nice if this could be toggled

Ran into this issue as well…was wondering if I created a second team with all the same people if I could at least get 2 people to be able to review and approve. I have a requirement that I need 2 reviewers and so having the team removed means that I can’t satisfy that requirement

@irwindouglas - We considered that, but then both teams would need to be added as code owners and granted explicit write access to the repository, and we’d have to maintain members in two teams. An ugly solution to be sure.