Home > Software design >  Does commiting to one file revoke all approvals provided to github pull request or not?
Does commiting to one file revoke all approvals provided to github pull request or not?

Time:01-07

I have a pull request that makes changes to multiple files and codeowners of those files are different. Example:

File_1 has codeowners X,Y,Z File_2 has codeowners A,B

Initially X,Y and Z approved the PR but A and B suggested a change.

So, if I commit a change to File_2 will the approval of X,Y and Z be lost as well. (If i push a change to File_1 the approval does get lost)

Thanks.

CodePudding user response:

Yes, that is expected behavior, as it is stated in the branch protection policy. This goes for all approvals, even

Dismiss stale pull request approvals when new commits are pushed

CODEOWNERS are only used for adding the initial approvers as 'required' and don't do anything extra after that.

  • Related