We are trying to automatically add our DevOps group as default PR reviewers whenever a PR to master is opened.
For this purpose, we have created a CODEOWNERS file in the master branch and added our DevOps group as reviewers. If we create a CODEOWNERS file in the dev branch, in which we will not specify our DevOps group as reviewers but the dev team instead (We only need DevOps for master), any time a PR from dev to master will be opened the CODEOWNERS would be overwritten on merge.
How can we prevent overwriting the CODEOWNERS file on PRs?