Validate actor/user against CODEOWNERS
Summary
I discovered this bug while working on #118807. CODEOWNERS
validations do not properly check the current actor/user for validation, instead returning an error and blocking the action if any file from the current MR diff file paths matches a protected path from CODEOWNERS
.
Steps to reproduce
- mark a branch as protected and requiring CODEOWNERS approval (Settings -> Repository -> Protected Branches
- ensure that
@your_CLI_git_user_name
is marked as a owner of*
- make a change to a file locally, commit, and attempt to push to the protected branch on the remote repository
What is the current bug behavior?
Current behavior is that this will fail despite your CLI user being marked as a code owner.
What is the expected correct behavior?
The user's push request should be honored, as they have code owner "rights" per CODEOWNERS