Allow code owners to review their own PRs #14866
Replies: 12 comments 4 replies
-
I agree this is very useful to have for very small teams |
Beta Was this translation helpful? Give feedback.
-
Users have been asking for this since Nov 2017: https://github.community/t/do-not-require-owner-approval-if-the-pull-request-is-from-an-owner/369 Also, we have a automated action, that sends a PR and approves it to be merged. We needed to create 2 different bot user accounts for being able to make the workflow work, because the bot needs to belong to the CODEOWNERS team of the folder that is sending the PR, but another different bot needs to aprove since users cannot approve their own PRs |
Beta Was this translation helpful? Give feedback.
-
+1 Has there been any movement on this? If there two codeowners on a group of files and one's on vacation, the other one is screwed. |
Beta Was this translation helpful? Give feedback.
-
Going through the same pain points described above, would be great to see some action on this |
Beta Was this translation helpful? Give feedback.
-
Same here. It would help us a lot, if we get this feature. 🙏 |
Beta Was this translation helpful? Give feedback.
-
+10000
So for each PR, the Techical Leader can Make de Code Review and aprobe PR's for production. But for example, in the case of an incident outside of working hours where he could make a Hot Fix, he cant't aprobe his own Pull Request. |
Beta Was this translation helpful? Give feedback.
-
I agree. For our small team that missing functionality is a problem. Being able to approve your own PRs would be a solution. Is there a lightweight workaround known at the moment? |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
+1 We also have a singe codeowner model, missing of this functionality lead us to always open to merge-for-everyone repo and a lot of disputes after merge. Creating "duplicated" user is not a choice for our organization, this way everyone should have duplicate |
Beta Was this translation helpful? Give feedback.
-
Please do this |
Beta Was this translation helpful? Give feedback.
-
It looks like a reasonable workaround for the model of this could be to use a Ruleset with a bypass list instead of a "classic branch protection rule". The Rulesets provide many of the same options for adding branch protections, such as "Require a pull request before merging" and "Require review from Code Owners". They also provide this bypass list feature that isn't available to the classic branch protection rules. By implementing the CODEOWNERS rule and granting CODEOWNERS the ability to bypass then only the CODEOWNERS can push without review, while everyone else needs a review by them. Individual users cannot be specified in the Bypass list, though you can get the effective equivalent if you had only one user with the repo admin role. Those in the bypass list will see the following checkbox: |
Beta Was this translation helpful? Give feedback.
-
See also #6292. |
Beta Was this translation helpful? Give feedback.
-
We have these boxes checked in a branch protection rule:
I would like to check this box:
To include admins in other branch protection rules, like waiting for actions, but that would also mean that admins would have to have their PRs approved by another code owner, which just isn't feasible for our setup. We also have some solo code owners.
Something along the lines of code owners approving their own PRs would solve this, which I've seen that Azure has in other discussions about this topic.
Beta Was this translation helpful? Give feedback.
All reactions