Required CODEOWNER pull requests and notifications #22479
-
We have recently enabled required CODEOWNER reviews for pull requests in to our master branch from at least one developer on the team (we have a GitHub team set up to catch all files in the codeowners file). Example CODEOWNERS file is:
We want to require at least one code review from a member of the dev team and this does work with this set up, but it has the downside that now that the whole team is automatically assigned to new pull requests, meaning that every member of the team gets notifications for every pull request. Is there anyway to require an approval from a member of the team without automatically assigning the team to the pull request to prevent them getting the notifications? |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 1 reply
-
Hi @abutler, Thanks for being part of the GitHub Community Forum! I’ll help as best I can. You should be able to define CODEOWNERS as teams _or _individuals. So, instead of If I’m misunderstanding, please let me know and we’ll continue to help as much as possible. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for the response. Unfortuately no, I don’t want to switch to assigning individuals. I would like to prevent the auto-assignment of the code review to the team whilst still requiring that a code-review by one of the team is complete before merging. This will enforce the approval process by a member of the team but not assign the whole team to the pull request so the whole team doesn’t get every pull request notification emails. |
Beta Was this translation helpful? Give feedback.
-
For customized workflows like this, you may want to check out Probot. The Work in Progress Probot app gives an example of how to create a bot that can block the merging of PRs based on custom logic. |
Beta Was this translation helpful? Give feedback.
-
We also have this problem. We have a lot of repositories and now i’m spammed with tons of emails. There should be a way to disable automatic PR review request from code owners. |
Beta Was this translation helpful? Give feedback.
-
Agreed. We have the same issue. This is making what would otherwise be a terrific new feature (codeowners) into something problematic. You should separate these two features and not auto-assign codeowners to PRs. |
Beta Was this translation helpful? Give feedback.
-
Agree with this. My team is a CODEOWNER for a repo, and it would be nice to avoid the email spam that this results in for all team members. |
Beta Was this translation helpful? Give feedback.
-
We use the option to assign based on round robin. However, it doesn’t solve the filters problem. I want to be able to filter based on reviews that are assigned specifically to me, but I’m also getting PRs that are assigned to the codeowner team, making the filters almost useless to me as a reviewer. Is there a way to filter as I described? Maybe I’m missing something |
Beta Was this translation helpful? Give feedback.
-
Is there a solution where a repository has CODEOWNERS file without having each PR assigned to it causing all the team to be notified? |
Beta Was this translation helpful? Give feedback.
-
We have a different work style which we post our PR into a slack channel for our team to review. CODEOWNER file enforce codeowner to review the PR which is great. But some codeowners are not interested in the PR at all and they are getting spam! Is there a way that we can just disable the email notification entirely? |
Beta Was this translation helpful? Give feedback.
-
Same, feature is great but I don't want the emails it is too much. I still want emails when someone responds to my comment or someone pushes changes. Any option to enable this? |
Beta Was this translation helpful? Give feedback.
For customized workflows like this, you may want to check out Probot. The Work in Progress Probot app gives an example of how to create a bot that can block the merging of PRs based on custom logic.