The current implementation check code owner from the PR's branch, but that introduce a problem: The user who make the PR can remove entries in the existing code owner file and add himself/herself in the file, then self-approved the PR.
Right now we work around this by usng github's native CODEOWNERS file to monitor .codeowners file changes, but this is not ideal. Can we check the ownership based on files in the base branch, rather than working branch?
The current implementation check code owner from the PR's branch, but that introduce a problem: The user who make the PR can remove entries in the existing code owner file and add himself/herself in the file, then self-approved the PR.
Right now we work around this by usng github's native
CODEOWNERSfile to monitor.codeownersfile changes, but this is not ideal. Can we check the ownership based on files in the base branch, rather than working branch?