Use patch-id to match CODEOWNER paths for enhanced selective resets
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to Solve
GitLab currently supports only removing CODEOWNER approvals if their files change. However, due to the way GitLab approvals work the resets impact the users of those rules who might have approved other CODEOWNER (or other) approval rules. This creates a situation where a user might have been brought in to approve a database change, but is also able to approve backend changes to the application. If a change is then pushed to the backend, but not the database... both of the approvals will be removed.
Proposal
We currently define a patch-id for each version of a merge request. If we also generated a patch-id for each matching CODEOWNERS path, we could selectively remove specific CODEOWNER approvals (without resetting the entire approval for the user) based on changes to the computed patch-id.