Implement mergeability check for code owner file changes
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=569920) </details> <!--IssueSummary end--> ## Problem to Solve CODEOWNERS files have a complicated syntax coupled with unique permission requirements that can make it hard to know if the file is configured correctly for users. While provide feedback in the UI: ![image](/uploads/a030a89619c557b5bc64c941dbdadb21/image.png) It would be much more appropriate to provide this feedback in the merge request when changes are being proposed. ## Proposal We should introduce a new merge check that helps to validate the CODEOWNERS file in a merge request. | Merge Check | Linked Blob View | | ------ | ------ | | ![image](/uploads/11d89c9789426410b569a35c5078e2f3/image.png) | ![image](/uploads/ba2db577aa6c27d2f5fba53bfdf87784/image.png) | ### Additional Details The merge check should: 1. Only run when the CODEOWNERS file (in a valid path) is changed in a given merge request. It **SHOULD NOT** always run on a project. 2. Should block the merge request from proceeding as a failed merge check Initially we do not need additional configuration (option to bypass, or allow whether or not failures should block), but we should evaluate feedback to see if these should be added. ### Inspiration https://gitlab.com/gitlab-org/gitlab/-/merge_requests/160929+
issue