Coverage-Check Rule does not apply
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary Code Coverage Approval Rule is overwritten and not working ### Steps to reproduce 1. Enable Coverage-Check Rule 2. Create a pipeline on `main` with code coverage 3. Create another branch off `main` 4. With another user 5. Edit the gitlab-ci.yml file of that branch to reduce the code coverage 6. MR can still be merged w/o approval ### Example Project https://gitlab.com/mfanGitLab/simplecodecoverage/-/merge_requests/3 ### What is the current *bug* behavior? MergeRequest is able to merge w/o approvals ### What is the expected *correct* behavior? Approvals are needed because code coverage quality decreased ### Relevant logs and/or screenshots ### ![image.png](/uploads/2629774f176a99cf75b5f28f5b3847a2/image.png) ![image.png](/uploads/1f0e81851d220e0f99e1d6fd3dad3ca6/image.png) ### Output of checks <!--If you are reporting a bug on GitLab.com, uncomment below--> <!--This bug happens on GitLab.com--> <!--and uncomment below if you have /label privileges--> <!--/label ~"reproduced on GitLab.com"--> <!--or follow up with an issue comment of `@gitlab-bot label ~"reproduced on GitLab.com"` if you do not--> #### Results of GitLab environment info <!--Input any relevant GitLab environment information if needed.--> <details> <summary>Expand for output related to GitLab environment info</summary> <pre> (For installations with omnibus-gitlab package run and paste the output of: \\\\\\\`sudo gitlab-rake gitlab:env:info\\\\\\\`) (For installations from source run and paste the output of: \\\\\\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\\\\\`) </pre> </details> #### Results of GitLab application Check <!--Input any relevant GitLab application check information if needed.--> <details> <summary>Expand for output related to the GitLab application check</summary> <pre> (For installations with omnibus-gitlab package run and paste the output of: \\\`sudo gitlab-rake gitlab:check SANITIZE=true\\\`) (For installations from source run and paste the output of: \\\`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\\\`) (we will only investigate if the tests are passing) </pre> </details> ### Possible fixes <!--If you can, link to the line of code that might be responsible for the problem.--> <!--If you don't have /label privileges, follow up with an issue comment of `@gitlab-bot label ~"type::bug"`-->
issue