I just ran into this. Found this thread. 3 years people have been asking for this. Not a peep from GitHub? This is a must-have capability. We need this.
Can we also add feature allow as long as one code owner approve then is able to merge, currently require all code owners to approve to merge.
Seems like this request would also solve this issue here: https://github.com/isaacs/github/issues/1390.
Adding the option to allow code owners and administrators to override and approve would solve all of these problems.
I’m sure this wouldn’t answer all the questions, but personally, I would like it if an author could explicitly approve their own PR regardless of the requirements/rules (maybe with a note about whether or not it counts towards requirements):
And you could optionally count author approvals towards the review requirements for min approvals and code owners (or maybe those are two different settings?):
I’ve seen some people go so far as to create a bot account that leaves an approval when the author leaves a special kind of comment (because they can’t approve). In PullApprove we’ve always had an option like “author_value”, which works for a lot of people but there would still be times where an explicit approval from the author would be better than just implying that they actually reviewed and approve their own work.
Has anyone found a workaround? Gitlab has much nicer access controls
Just moving over from Azure Dev ops as well and been using this setting there for a while. I am astounded is doesn’t exist here on github.
Please add this optional functionality. This thread is full of people who need it and full of mock-ups for how to implement it. Anything would work, just please don’t make me switch back to Gitlab after how hard it’s been to convince my group to switch to GitHub.
Issue still exists as of 06/23/2021
Issue still exists as of 06/30/2021
Obviously GitHub is filtering out a Created in 2017 ticket with a “fix” applied as still needing attention.
They did not grasp the request.
The PR author should count as an implicit approver of changes made where they are also the owner of the changed code.
If they also touch something they don’t own, then they will need an appropriate approval from an owner.
If the setting is that a minimum 2 approvals are needed then the implicit approval counts 1 towards that.
codeowners file should also support options like no approval required, 1, 2 etc approvals required. The no approvals could apply for example to a end of file *.md pattern to let non-eng members contribute there.
In the case of a kind of mono repo, where the goal is to have teams not cross team boundaries in updates without approval, it isn’t at all reasonable to make all contributors admins just so that they can update their own team area without additional approvals. Like the original yiming9 the situation of having timezone separated team members, or single authority code paths, make the current lack of an implicit approval from the author a real sore point.
Frankly this is a half-functional attempt at replicating the Google owners file process by proxy from another’s attempt at it, married with git file patterns instead of directory placement of multiple owners files.
The inability to approve your own PRs is a problem for smaller teams where individuals play multiple roles.
I also don’t understand the purpose of this rule. If it is trying to prevent someone who has the permission to approve a PR from merging in their own code without any oversight, then this restriction doesn’t actually accomplish that anyways. All I would have to do (as a code owner) is find a closed PR that I didn’t create, reopen it, revert all the changes in it and push my own changes, then approve it and merge it.
Is there any plan to implement the functionality discussed in this thread?
I’m code owner is small team and agree that it is very annoying thing when I can’t megre my own PR in my own code
same here, i’m building a team and its just me still. Trying to setup/configure repos for projects but I can’t set it up for best practice when I can’t approve my own reviews.